[Cialug] Help finding file?

David Bierce david at bierce.org
Mon Jan 2 16:15:36 CST 2012


I used to be of the:

find / | grep -i partialname

Most distros have slocate, but you have to be root and its generally not what I mean because I'm usually looking for something thats changed in the past few minutes, not something that would be picked up by a nightly index.

find is the best option for finding something right away.  For example, here is the last find command I ran in my history.  I wanted to find an uninstall script I couldn't remember where in my directory I put it.

find /home/primechuck/order_source -xdev -type f -iname '*uninstall*' 

Which means

find PATH -xdev (Don't cross filesystems) -type f (only look for files not directories) -iname '*uninstall*' match the pattern ignoring case.


On Jan 2, 2012, at 3:37 PM, Tom Sellers wrote:

> What is the Ubuntu linux command to locate a file anywhere on the disk?  I need to have it search the whole directory structure not just the current directory for the file.  
> 
> If I use find by itself it lists all directory items but it I list the file name after the find command it only seems to search the local directory and tells me that it is not there.  
> 
> Surely there is a command to do this.  I just haven't been able to find it.
> 
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cialug.org/pipermail/cialug/attachments/20120102/92f1ef97/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://cialug.org/pipermail/cialug/attachments/20120102/92f1ef97/attachment.pgp>


More information about the Cialug mailing list