The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Transfer file from local unix server to remote server indira Shell Programming and Scripting 2 05-03-2007 03:35 AM
Transfer file from local unix server to remote server indira HP-UX 2 05-02-2007 02:15 PM
FTP script for sending a file from one unix directory to another unix server director raja_1234 Shell Programming and Scripting 1 11-30-2006 03:57 AM
Find file on server, searching thru many folders Snakehead UNIX for Dummies Questions & Answers 5 07-06-2006 03:39 PM
Searching for a specific phrase on Unix server mmcaleer UNIX for Dummies Questions & Answers 1 02-07-2005 12:18 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-13-2005
Registered User
 

Join Date: Mar 2005
Posts: 11
Stumble this Post!
searching a file in a unix server

Please let me know which command and its format to use to search for a file.

Windows provides a find option but i would like to know the equivalent in UNIX.

for example i need to search for a file called uv.config and where exactly it is located in a unix server.

TIA.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-13-2005
Registered User
 

Join Date: Apr 2005
Location: Antarctica
Posts: 12
Stumble this Post!
find <start_location> -name "pattern"

here's a couple quick examples:

find . -name "*.txt" (this will return all text files it finds starting in the current directory and going through all subdirectories)

find / -name "*.xml" (this will find all xml files starting from root directory).

man find for more details on the other options.
Reply With Quote
  #3 (permalink)  
Old 04-13-2005
milhan's Avatar
Registered User
 

Join Date: Oct 2002
Location: /home
Posts: 121
Stumble this Post!
if you make a search in the above button, you will get whole bunch of topics and sufficient information on using find in Unix.
Reply With Quote
  #4 (permalink)  
Old 04-13-2005
Registered User
 

Join Date: Apr 2005
Posts: 2
Stumble this Post!
try this link http://www.onlamp.com/pub/a/bsd/2002...SD_Basics.html

http://www.onlamp.com/pub/a/bsd/2002...SD_Basics.html
Reply With Quote
  #5 (permalink)  
Old 06-26-2005
Registered User
 

Join Date: Jun 2005
Posts: 24
Stumble this Post!
1: cd /
2: find . -name "uv.config"

Line 1 takes you to base directory
Line 2 searches anywhere below current (which is base direectory) for any files which are match 'uv.config'

or

1: find / -name "uv.config"

Line 1 and 2 combined into 1 line above.

or

1: cd /
2: ls -R | grep 'uv.config'

Line 1 takes you to base directory
Line 2 searches lists all files and below and displays the ones matching "uv.config"
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:13 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0