Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Directory Search

Status
Not open for further replies.
Oct 18, 2000
72
US
I just have a really basic question. How do you do a directory search at the linux command line? ls will only give me listings in the present directory. Is there a switch that I am missing to have it search all subdirectories? Thanks in advance from this Linux newbie.

 
Hi,

You probably want the 'find' command. By default it searches from the current directory down to all subdirectories -e.g.:

cd /etc
find -name 'httpd*'

or you can put the 'start' path in :

find /home/joeuser -name '*.pl'

See 'man find' for more (assuming you installed the documentation!)

Regards




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top