[Gllug] One liner challenge

Paul Nasrat pauln at truemesh.com
Thu Jan 30 11:29:26 UTC 2003


On Thu, Jan 30, 2003 at 10:46:40AM -0000, robin.c.smith at bt.com wrote:
> Close but not what I need :-)
> 
> I'm looking for something that traverses the directories as well so would
> display all the files and directories under a point and prints them out in
> date order.

Play with -printf here is a basic example which seems to work

find . -type f -printf "%A@ %h/%f\n"  | sort  -n


Sample output 
1043770354 ./BUILD/irssi-0.8.6/README
1043770354 ./BUILD/irssi-0.8.6/TODO
1043770358 ./SOURCES/irssi-0.8.6.tar.bz2
1043770358 ./SPECS/irssi.spec
1043770358 ./SRPMS/irssi-0.8.6-1.src.rpm
1043770649 ./RPMS/i386/irssi-0.8.6-1.i386.rpm
1043771181 ./BUILD/modutils-2.4.21/module-init-tools-0.9.8/README
1043772598 ./SPECS/modutils.spec

Then you can cut/awk the first column off.

Probably not v. efficient though.

Paul

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list