Find file on server, searching thru many folders


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Find file on server, searching thru many folders
# 1  
Old 07-06-2006
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 someone help me?

thanks
# 2  
Old 07-06-2006
Find / -name “name_of_file” would work as it searches the root and down. It would also supply the absolute path within its std output.
# 3  
Old 07-06-2006
What if I needed to direct my search at a server? Could I use the following?
Find server/ -name “name_of_file”
# 4  
Old 07-06-2006
oh right, i see. you can use a remote shell:

rsh server find / -name "name of file"

or on HP-UX

remsh server find / -name "name of file"

hush
# 5  
Old 07-06-2006
Hush,

The code you posted doesn't seem to work with what I'm doing.

I'm trying to go through the terminal on an OSX operating system to search on a server. Spotlight is too slow so I'm trying to find other methods of searching.

Also something I forgot to mention. I would only have the beginning portion of the files' name.

Thanks for your help!!

Snakehead
# 6  
Old 07-06-2006
i know very little about mac's, the command must be different. I can say that if you only have a part of the file name then you can use wild cards e.g *.

http://sillydog.org/unix/tasks/defining.php
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash to move specific files from folders in find file

I have a directory /home/cmccabe/nfs/exportedReports that contains multiple folders in it. The find writes the name of each folder to out.txt. A new directory is then created in a new location /home/cmccabe/Desktop/NGS/API, named with the date. What I am trying to do, unsuccessfully at the moment,... (7 Replies)
Discussion started by: cmccabe
7 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

Find and delete files and folders which are n days older from one unix server to another unix server

Hi All, Let me know how can i find and delete files from one unix server to another unix server which are 'N' days older. Please note that I need to delete files on remote unix server.So, probably i will need to use sftp, but question is how can i identify files and folders which are 'N'... (2 Replies)
Discussion started by: sachinkl
2 Replies

4. 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

5. UNIX for Dummies Questions & Answers

Searching for folders/parent folders not files.

Hello again, A little while back I got help with creating a command to search all directories and sub directories for files from daystart of day x. I'm wondering if there is a command that I've overlooked that may be able to search for / write folder names to an output file which ideally... (2 Replies)
Discussion started by: Aussiemick
2 Replies

6. UNIX for Dummies Questions & Answers

Find folders that do NOT contain a certain file

I'm no linux guru so any help would be greatly appreciated! I need to output all folders that do not contain a file of a certain extension. Currently I have the following find / ! -name '*.txt' -printf %h\\n This doesn't work because although it finds folders that do not contain *.txt,... (2 Replies)
Discussion started by: hodnov
2 Replies

7. Web Development

server folders..

Hi, I've uploaded a test.html document in the folder "www" but I always receive the same error message: "It works!" instead of see the page. Should I change the apache root directory in the config file ? thanks (2 Replies)
Discussion started by: aneuryzma
2 Replies

8. Shell Programming and Scripting

Searching for folders which are over 5 hours old.

I want to create a script which will delete all folders which are over 5 hours old in HP-UX 11.11. I tried to use the "find" command but it didn't have an option for searching files/folder by hours. Could some one tell me how to achieve this in HP-UX with only using the standard OS commands and... (4 Replies)
Discussion started by: stevefox
4 Replies

9. Shell Programming and Scripting

Searching for SETUID and SETGID using PERL file find with lstat

About System and Perl: Sun Solaris 5.9 sparc, Perl 5.6.1 I've decided to use the perl file::find module to look for all the SETUID and SETGID files on my unix boxes. I wrote something like this: (I've shorted it a little to make it simple) #!/opt/perl/bin/perl use File::Find; find... (1 Reply)
Discussion started by: x96riley3
1 Replies

10. UNIX for Dummies Questions & Answers

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. (4 Replies)
Discussion started by: jhmr7
4 Replies
Login or Register to Ask a Question