On Wed, July 25, 2007 12:37 pm, Roger Searle wrote:
> Hi, thanks to everyone for their replies.
>
> Steve Holdoway wrote:
>> Need more coffee.
>>
>> ls -1tr - 1 entry per line, t ime order, r eversed.
>>
>>> Sorry, that should be ls -ltr to put them in reverse time order. Of
>>> course, you can use ls -lt and head as an alternative (:
>>>
> for the deletes I am doing:
> ls -1t | tail -n 7 | xargs rm -f

One thing about this thread. I find that when ls is piped to another
command, -1 (one entry per line) is assumed. Contrast the output of ls and
ls|less or ls|more

Perhaps the -1 is needed for portability, although it seems to be the
default output of ls on FreeBSD anyway.

-- 
Nick Rout

Reply via email to