![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
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. |
| Forum Sponsor | ||
|
|
|
|||
|
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. |
|
|||
|
|||
|
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" |
|||
| Google The UNIX and Linux Forums |