Walt Mankowski on 12 Apr 2012 13:18:01 -0700


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

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


On Thu, Apr 12, 2012 at 03:57:10PM -0400, jeff wrote:
> On 04/12/2012 03:29 PM, JP Vossen wrote:
> >Seriously, I meant "simple" as in the fewest moving parts. :-) It's all
> >just the one 'find' command, except for sorting,
> 
> find /path/to/files -printf '%TY-%Tm-%Td_%TH:%TM:%TS\t%y\t%s\t%p\n' |
> sort -r
> 
> I love me some CLI, seriously, BUT....  in my (rather cloudy)
> universe, that's why there are GUIs.  I can remember just so many
> switches.

On the contrary, this is the sort of thing that's really difficult to
do in GUI file managers.  I can't think of a file manager that will
give you a single list of all the files in one folder and all the
other folders below it.  Nearly all of the ugliness there is in
formatting the modification dates so that they can be sorted easily.
And as many of the previous examples demonstrated, even that can be
made a lot more readable if you're willing to add xargs to the
pipeline.

Attachment: signature.asc
Description: Digital signature

___________________________________________________________________________
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