That works yes.
A bit much to typw though. Don't know if I'd save much time from first doing a locate and the manually typing the cd [result] string :)
Martin S
On Fri, 11 May 2007 14:34:44 +0200, Martin S wrote:
> Just recently tried using
>
> locate foo.conf | cd
>
> to automagically move to the directory in which I've saved foo.conf
> Of course it didn't work as you can't cd to /bar/foo.conf
>
> I didn't find a way to dropping the actual file name from the result of
> locate.
cd $(dirname $(locate foo.conf))
--
Neil Bothwick
WinErr 010: Reserved for future mistakes by our developers