Skip to content

Instantly share code, notes, and snippets.

@dnsang
Created June 22, 2015 04:03
Show Gist options
  • Save dnsang/5f2e0196ce1a8ef0aa83 to your computer and use it in GitHub Desktop.
Save dnsang/5f2e0196ce1a8ef0aa83 to your computer and use it in GitHub Desktop.
Sort file by date
find . -printf "%T@ %Tc %p\n" | sort -n
printf arguments from man find:
%Tk: File's last modification time in the format specified by k.
@: seconds since Jan. 1, 1970, 00:00 GMT, with fractional part.
c: locale's date and time (Sat Nov 04 12:02:33 EST 1989).
%p: File's name.
Ref from: http://superuser.com/questions/294161/unix-linux-find-and-sort-by-date-modified
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment