[Gllug] One liner challenge
Steve Cobrin
cobrin at highbury.net
Thu Jan 30 12:08:17 UTC 2003
On Thursday 30 Jan 2003 09:31, robin.c.smith at bt.com wrote:
> I use
>
> find . -exec ls -ld {} \;
>
> to list all the files and directories as I don't like the output of
> ls -lR
>
> However I would like to have the output changed so that it lists
> everything but sorted by date with the most recent file last.
> There must be a simple one liner to do this.
>
> Who is up to the challenge?
>
> Robin
Just had to do this last night :-)
( export LC_TIME=en_GB; find lib -type f ! -type l -exec ls -ld {} \; ) | sort -k 6 -k 7
Setting LC_TIME affects the way "ls -l" displays, I don't use "-ls" in find
command, as it doesn't comply with standards.
-- Steve
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list