• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 316
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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