0

I want to copy the entire root file system from a target to a specific folder in the host. When I try this, I just get a README.txt file in the desired location. When I open the file, it says "Download and extract the sample filesystem to this directory."

Does anyone know the problem? Below is the input and output of the terminal.

rish@myComp:~$ scp -r comp@<IP Address>:/*.* /desired/location

comp@<IP Address>'s password: 

README.txt                                    100%   62   107.0KB/s   00:00    
Rish
  • 103

1 Answers1

0

In Windows *.* matches all, even if no dot is there. In Linux (and in scp) *.* glob pattern matches objects with literal dot.

There is no dot in bin, home etc. Apparently the only object with a dot was README.txt.

Use * instead of *.* (or not, see below).

Notes:

  • Unquoted * may be expanded by your local shell. I don't expect comp@<IP Address>:/* to match any file in your current working directory, but still this is somewhat flawed.
  • * doesn't match hidden (dot) files. This is true in a shell and in scp, I think.
  • I wouldn't want to copy /proc, /dev, /tmp. For this reason I would get a listing and request other directories/files explicitly.
  • scp doesn't preserve ownership.