Nick Rout wrote:
> 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.
>
In my final version I am omitting the 1 and just doing ls -t, I have not
found there to be any difference with or without on this suse machine.