searching a file in a unix server


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers searching a file in a unix server
# 1  
Old 04-13-2005
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.
# 2  
Old 04-13-2005
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.
# 3  
Old 04-13-2005
if you make a search in the above button, you will get whole bunch of topics and sufficient information on using find in Unix.
# 4  
Old 04-14-2005
# 5  
Old 06-26-2005
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"
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Update/Download file from FTP server to UNIX Server

HI Guys, I want to download files from FTP Server to my Unix server. I have tried , buy No Luck . Below Command i have tried. 1-Wget - Error "wget' not found" 2.ftp -n $HOST ...Not Working. 3.scp -i ftp://user:passowrd@hostname:21/ran/on/test.txt Any Suggestion (2 Replies)
Discussion started by: pareshkp
2 Replies

2. Shell Programming and Scripting

Fetch the different data by searching with a same variable from a file in AIX server

Hi, I am trying to fetch the different values in an xml file by searching with the same variable in AIX Server. <name>SharedResources/Shared/JNDI/Username</name> <value>admin</value> <name>SharedResources/Shared/JNDI/Username</name> ... (1 Reply)
Discussion started by: tejastrikez
1 Replies

3. Shell Programming and Scripting

searching a file with a specified text without using conventional file searching commands

without using conventional file searching commands like find etc, is it possible to locate a file if i just know that the file that i'm searching for contains a particular text like "Hello world" or something? (5 Replies)
Discussion started by: arindamlive
5 Replies

4. Shell Programming and Scripting

Perl: Sending file from UNIX server to Windows server

I'm trying to write a Perl script where a file from a UNIX server box connects to a Windows server box and copies that file into the Window box. The main problem I have right now is that whenever I try to connect to the Windows box, the connection is refused. The error message that always pops... (2 Replies)
Discussion started by: kooshi
2 Replies

5. UNIX for Dummies Questions & Answers

To copy a file from one unix server to another unix server through scripts

I am getting the fallowing error when i am trying to execute the scp commomd in shell script warning: You have no controlling tty. Cannot read confirmation. warning: Authentication failed. Disconnected; key exchange or algorithm negotiation failed (Key exchange failed.). scp2: warning: ssh2... (1 Reply)
Discussion started by: manit
1 Replies

6. Shell Programming and Scripting

searching thru or combining multiple lines in a unix file

This is the problem actually: This regex: egrep "low debug.*\".*\"" $dbDir/alarmNotification.log is looking for data between the two quotation marks: ".*\" When I hate data like this: low debug 2009/3/9 8:30:20.47 ICSNotificationAlarm Prodics01ics0003 IC... (0 Replies)
Discussion started by: ndedhia1
0 Replies

7. Shell Programming and Scripting

Transfer file from local unix server to remote server

want to remove this thread. thanks (2 Replies)
Discussion started by: indira
2 Replies

8. HP-UX

Transfer file from local unix server to remote server

want to remove the thread thanks (2 Replies)
Discussion started by: indira
2 Replies

9. UNIX for Dummies Questions & Answers

Find file on server, searching thru many folders

Hi all, Is it possible to find a file on a server without knowing the file path? And when the file is found is it possible to find out the file path? I would like to find a file by typing: find server/ -name "filename" Instead of: find server/folder1/folder2/folder3/ -name "filename" Can... (5 Replies)
Discussion started by: Snakehead
5 Replies

10. UNIX for Dummies Questions & Answers

Searching for a specific phrase on Unix server

Is it possible to search all the file systems on a Unix server for a specific phrase? (1 Reply)
Discussion started by: mmcaleer
1 Replies
Login or Register to Ask a Question