Q. How do I search Linux box for a file?
A. You need to use find command, which search for files in a directory hierarchy (file system) and prints information about the files it found. It is run like as follows:
find {dir-name} -name {file-name}
Find command examples
Find out file called foo.txt:
# find / -name foo.txt
Find out httpd.log file:
# find / -type f -name httpd.log
See also:
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop










![HowTo: Use grep Command In Linux / UNIX [ Examples ]](http://s13.cyberciti.org/images/shared/rp/3/10.jpg)


{ 9 comments… read them below or add one }
Make it more easy. i did not understan nothing. can you tell people simply things? I still doo not know who you areß what are you dooing? nothing is that what you want? think abaut. Young People may know this, but what abaut the 50-60 generation.
Obvious, but still pretty funny… *and* you fell for it. Didn’t you think it was a bit odd he could spell “generation” but not “do”?? Uh, herr-o?
If you can’t construct a sentence Dr M Barmann, you shouldn’t even bother.
The answer is simple enough to understand although the Doc’s comment isn’t. Thanks for the tip.
I have a new freespire program and like it , but I do have issues , I can not seam to get my lexmark x3550 printer to work the soft ware disk will not run , an other issue is the yahoo messanger I get is yahoo beta I would like the stanard messager 10 , the last issue is I can not find the clock , thank you for your time bob
I still can not find the clock on freespire
Thanks for this command. It was quite useful.
Exactly what i was looking for! thanks!
Please step away from the linux server. You will crash the box and hurt yourself. Call your grandkids they will help you.
Thanks for the chuckle…..