bergman on 11 Apr 2012 09:46:51 -0700 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] Sort a file tree by last modified time |
In the message dated: Wed, 11 Apr 2012 12:13:31 EDT, The pithy ruminations from Paul Jungwirth on <Re: [PLUG] Sort a file tree by last modified time> were: => >> Try: => >> Â Â Â Â find content -type f -print0 | xargs -0 ls -ltr => > => > Wow, that's perfect. Thanks! => => I suppose one caveat with this approach is that it will give incorrect => results on large trees, because files will only be sorted within each => invocation of `ls`. So some recently-changed files are going to be => buried up in the middle of the results. Hmm. If you want the 'perfect' version: find /path/to/content -type f -print0 | \ xargs -0 stat --format="%Z, %z, %F, %n" | sort -nr Mark => => 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 =>
___________________________________________________________________________ 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