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

Re: general linux questions



On 2000-10-05 16:26:40, will trillich wrote:
> On Thu, Oct 05, 2000 at 04:40:52PM +0100, Colin Watson wrote:
> > Ethan Benson <erbenson@alaska.net> wrote:
> > >On Thu, Oct 05, 2000 at 04:22:06PM +0200, robert_wilhelm_land wrote:
> > >> When searching for filenames using "locate" and displaying them in
> > >> the order of their date something like "locate <file> | <sort_them>",
> > >> (does the database include other parameters than just filenames?)
> > >
> > >not sure on this one.
> > 
> > You could try something like:
> > 
> >   locate <file> | xargs ls -dl
> > 
> > ... and then work out how to sort the resulting list by date.
> 
> i keep forgetting about xargs. very clever gizmo!
> 
> to sort the output by date, it's rather simple:
> 
> 	locate <path-match-string> | xargs ls -dlt

This will fail when you exhaust the command buffer (e.g. when xargs will invoke ls multiple times).


/Allan
-- 
Allan M. Wind			email: allanwind@mediaone.net
P.O. Box 2022			finger: awind@digit-safe.dyndns.org (GPG/PGP)
Woburn, MA 01888-0022		icq: 44214251
USA



Reply to: