TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:6388] Finding files quickly



Well here is a work around..

locate /tar | egrep tar$

The "/" makes sure the filename starts with tar in the path
and the "$" in the egrep makes sure that there is nothing following tar.

Kludgy I guess !

You could alias this to something you like and I am sure there are
bugs in it :-)

regards,
sandipan


Bob Tanner wrote:
> 
> Quoting Yaron (jethro@yaron.org):
> >   Hi,
> >
> > On Mon, 7 Jun 1999, Bob Tanner wrote:
> >
> > > How do I use the updatedb stuff to find files quickly?
> > >
> > > I normally use find / -name "*filename*", is there a quicker way?
> >
> > Well, if updatedb is run occasionally from cron etc, you can go "locate
> > filename".
> >
> > Red Hat automatically have this in /etc/cron.daily/
> 
> That is what I thought, but when I do a locate tar, I get a TON of files with
> tar in the name:
> 
> /usr/X11R6/lib/X11/xfm/bitmaps/app_tar.xbm
> /usr/X11R6/lib/X11/xfm/bitmaps/xfm_tar.xbm
> /usr/X11R6/lib/X11/xfm/pixmaps/app_tar.xpm
> /usr/X11R6/lib/X11/xfm/pixmaps/xfm_tar.xpm
> 
> Anyway to get just the file called tar?
> --
> Bob Tanner <tanner@real-time.com>       | Phone : (612)943-8700
> http://www.real-time.com                | Fax   : (612)943-8500
> Key fingerprint =  6C E9 51 4F D5 3E 4C 66 62 A9 10 E5 35 85 39 D9
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe@listserv.real-time.com
> For additional commands, e-mail: tclug-list-help@listserv.real-time.com
> Try our website: http://tclug.real-time.com