Created
May 31, 2013 09:54
-
-
Save fedir/5684002 to your computer and use it in GitHub Desktop.
Find files detailed statistics in shell : filesize, path, date of last access, date of last status change, date of last modification (in locale format; in unixstamp), ordering by size
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # ref. : man find | |
| # printf options | |
| # %p Files name. | |
| # %P Files name with the name of the command line argument under which it was found removed. | |
| # %s Files size in bytes. | |
| # %Ak Files last access time in the format specified by k | |
| # %Ck Files last status change time | |
| # %Tk Files last modification time | |
| # Time options k | |
| # c locales date and time (Sat Nov 04 12:02:33 EST 1989) | |
| # @ seconds since Jan. 1, 1970, 00:00 GMT. | |
| find $1 -type f -printf '%s\t%P\t%Ac\t%Cc\t%Tc\t%A@\t%C@\t%T@\t\n' | sort -n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment