Paul Jungwirth on 11 Apr 2012 09:58:46 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Sort a file tree by last modified time


>        find content -type f -print0 | xargs -0 ls -l --time-style='+%s' | sort -n -k 6
>
> Â Â Â Âfind /path/to/content -type f -print0 | \
> Â Â Â Â Â Â Â Âxargs -0 stat --format="%Z, %z, %F, %n" | sort -nr

These are both really nice. For the date formatting I think I prefer

    find content -type f -print0 | xargs -0 ls -l
--time-style='+%Y-%m-%dT%H:%M:%S' | sort -k 6

Thanks again everyone!
Paul

-- 
_________________________________
Pulchritudo splendor veritatis.
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug