[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 313
  • Last Modified:

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

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
harvey74
Asked:
harvey74
2 Solutions
 
pablouruguayCommented:
you can  do ssh to the host and loggin

after that you can

find path -name filename

example

find / -name  dhcpd.conf
0
 
jlevieCommented:
If the remote server supports it you could use sftp, which allows you to browse for the file.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now