News for hackers. Stuff that matters.
Re:Ask HN: How do you organize your home directory? by oftenwrong on Friday September 14, 2018 @09:08AM (#17986910)
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!
Re:Ask HN: How do you organize your home directory? by b_rodriguez on Friday September 14, 2018 @06:23PM (#17991540)
I 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