Solved

Is there a command to find a file on a remote host?

Posted on 2004-08-05
2
293 Views
Last Modified: 2010-03-18
I'm a *total* linux newbie - so apologies for this question.....

I want to copy a file from a remote host to my home directory.

I can use
scp root@hostname:/directory/filename .  
to do this.
What if I'm not sure of the directory structure? i.e. I know the filename but don't know the exact location.

Is there a similar command to find the file before I copy it? i.e. connect to host and find in one command.
(Or would I have to connect first and then use the locate command? Would I do this using the ssh command?)


Many Thanks
0
Comment
Question by:harvey74
2 Comments
 
LVL 14

Accepted Solution

by:
pablouruguay earned 300 total points
ID: 11727891
you can  do ssh to the host and loggin

after that you can

find path -name filename

example

find / -name  dhcpd.conf
0
 
LVL 40

Assisted Solution

by:jlevie
jlevie earned 200 total points
ID: 11732993
If the remote server supports it you could use sftp, which allows you to browse for the file.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question