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

Re: OT: Alternatives to ls for sorting files by modification time



Hi!

Thanks to all who responded to my question(s)! It's working now. I use the
suggestion made by Miquel, as shown below, though I will be happy to try
the others as well. I've got some scripting tricks to play with now :-)

(The reason I was using this method is that it integrates well in my
present script. I ommitted the "grep" since all my files in there end in
".arc", which I wasn't aware of at first, so I wanted to be sure and look
only for ".arc" files.)

On Wed, 25 Sep 2002, Miquel van Smoorenburg wrote:

> [...] 
> $LS -t1 $BACKUP_DIR/arc | grep '\.arc$' | $TAIL -$NUM_OF_FILES |
> while read i
> do
>   $RM -f $i
> done
> [...]

Kind regards,

	Holger




Reply to: