Computing.Net > Forums > Linux > find file in linux

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

find file in linux

Reply to Message Icon

Name: Kiryl
Date: May 3, 2002 at 11:20:49 Pacific
Comment:

Hello,
I need to find file in Linux.
Grep is looking for a pattern inside the file. I don't need any pattern, I just need to find file with a certain name.

Can anybody help?

Thanks, Kiryl.




Sponsored Link
Ads by Google

Response Number 1
Name: regal
Date: May 3, 2002 at 11:30:55 Pacific
Reply:

there are a few different ways, i perfer "locate"

"locate filename" (you can use wildcards)

also, try find, whereis

if it is a new file just put on, use "updatedb" to update the file database (this will take a few minutes)


0

Response Number 2
Name: Kurt Lieber
Date: May 3, 2002 at 12:05:48 Pacific
Reply:

another option:

'find / -name filename'

tells find to search recursively for filename.

hth.



0

Response Number 3
Name: Jake
Date: May 3, 2002 at 12:17:40 Pacific
Reply:

find has many advanced options, but to do what you want, do
find /path/to/search -name filename

If your not root, depending on where you search (like /), you may want to tack a 2> /dev/null on the end so you don't see "Permission denied" messages.

Look in the find man page for other uses.


0

Response Number 4
Name: jon
Date: May 3, 2002 at 17:14:40 Pacific
Reply:

one i like and is very powerful is in the root dir

find | grep {file name/portion of name}


j


0

Response Number 5
Name: NetSam20
Date: May 4, 2002 at 07:50:16 Pacific
Reply:

find /path/to/search -name filename

is good, but ownly shows that there's a file with this name

find /path/to/search -name filename -print

-print shows the path of the file

less | find /path/to/search -name filename -print

gives you the possibility to scroll if there are more results your screen can show


0

Related Posts

See More



Response Number 6
Name: Kiryl
Date: May 4, 2002 at 12:28:49 Pacific
Reply:

thanks, everybody


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: find file in linux

How to OPEN+RUN .exe files in Linux www.computing.net/answers/linux/how-to-openrun-exe-files-in-linux/16329.html

playing WMV files in Linux? www.computing.net/answers/linux/playing-wmv-files-in-linux/2576.html

.bin file in linux www.computing.net/answers/linux/bin-file-in-linux/20462.html