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

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



* Holger Rauch (Holger.Rauch@heitec.de) [020925 00:47]:
> Hi!
> 
> I admit that this is off-topic since it's a general shell scripting
> question, but what alternative commands instead of ls can be used to sort
> files by modification time? I'm not interested in the modification times,
> just the file names. So, actually in something that emulates "ls
> -lt1" behavior.
> 
> (When I used "ls -lt1" I got an "argument list too long" error, so I need
> to use something else, but to be honest, I don't know what.)

I'd say ls is the right tool for the job.  If you're getting an error
about a list being too long, maybe you can rework the way you're
processing the list, i.e. with xargs?  It's hard to make suggestions
without seeing what you're trying to do...

good times,
Vineet
-- 
http://www.doorstop.net/

Attachment: pgpe73tav3svm.pgp
Description: PGP signature


Reply to: