Skip to content

Instantly share code, notes, and snippets.

@focustrate
Created August 16, 2013 17:35
Show Gist options
  • Save focustrate/6251873 to your computer and use it in GitHub Desktop.
Save focustrate/6251873 to your computer and use it in GitHub Desktop.
find number of days between now and modified date on folders in a directory -- ordered by longest since modified
$ end_date=`date '+%s'`; stat -f "%m;%N" * | awk -F\; -v e=$end_date '{print int((e-$1)/86400), "days \t", $2}' | sort -rn
@focustrate
Copy link
Author

displays:
x days filename

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment