Solved

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

Posted on 2004-08-05
2
264 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
Comment Utility
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
Comment Utility
If the remote server supports it you could use sftp, which allows you to browse for the file.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

772 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now