4 ms·
Just for fun, I tried to do something similar with a shell script: set -eu AGE_LIMIT=$(( `date +%s` - (14 * 86400) )) for FILE in ~/Downloads/*
by oftenwrong 8y ago
Just for fun, I tried to do something similar with a shell script:
set -eu
AGE_LIMIT=$(( `date +%s` - (14 * 86400) ))
for FILE in ~/Downloads/*
do
if [ -e "$FILE" ]
then
export `stat -s "$FILE"`
if [ $st_birthtime -lt $AGE_LIMIT ]
then
mv "$FILE" "~/Needing review/"
fi
fi
done
Run it from cron. Typical caveats of shell scripts apply!
- b_rodriguez 8y agoI imagine you could instead do it like this: find ~/Downloads -Btime +14d -exec mv {} ~/Needing\ review \; Some changes may be necessary as I am not able to test it right now