1

I'm attempting to copy my desktop folder excelsite using scp -r. The folder is a django website. The command ive used is scp -r excelsite ***@***.***.*** (and yes, I was cd'd into the desktop). When running the command everything seems to be working since its copying stuff. But not the folder excelsite. The command line looks like this:

db.sqlite3                | 144 kB | 144.0 kB/s | ETA: 00:00:00 | 100%
abstract.h                | 30 kB |  30.4 kB/s | ETA: 00:00:00 | 100%
asdl.h                    | 1 kB |   1.2 kB/s | ETA: 00:00:00 | 100%
ast.h                     | 0 kB |   1.0 kB/s | ETA: 00:00:00 | 100%
bitset.h                  | 0 kB |   0.5 kB/s | ETA: 00:00:00 | 100%
bltinmodule.h             | 0 kB |   0.3 kB/s | ETA: 00:00:00 | 100%

I have no clue what abstract.h is. Neither do I know what asdl.h is, etc. Its copying random stuff. And if that seems weird if, if just let it copy all of it, at some point it starts copying city names. Yes, CITY NAMES! I have noo clue whats going on. But one thing is for sure, it's not copying my directory.

1 Answers1

0

You must specify the destination path :

scp -r /local/path user@host:/remote/path

note that spaces in remote pathname must be escaped

scp -r /local/path user@host:/remote/path\\\ name
scp -r /local/path user@host:"'/remote/path name'"


You may also use rsync via ssh
rsync --stats -avzhe ssh /source/path user@host:/dest/path

More information:
- https://help.ubuntu.com/community/rsync
- https://askubuntu.com/a/446726/77093

cmak.fr
  • 8,411
  • 2
  • 29
  • 45
  • still the same behaviour – ErikHolstV Holst Jan 18 '20 at 12:03
  • Do you know why it might be copying this? ```db.sqlite3 | 144 kB | 144.0 kB/s | ETA: 00:00:00 | 100% abstract.h | 30 kB | 30.4 kB/s | ETA: 00:00:00 | 100% asdl.h | 1 kB | 1.2 kB/s | ETA: 00:00:00 | 100% ast.h | 0 kB | 1.0 kB/s | ETA: 00:00:00 | 100% bitset.h | 0 kB | 0.5 kB/s | ETA: 00:00:00 | 100% bltinmodule.h | 0 kB | 0.3 kB/s | ETA: 00:00:00 | 100% boolobject.h | 0 kB | 0.9 kB/s | ETA: 00:00:00 | 100% ``` – ErikHolstV Holst Jan 18 '20 at 12:09
  • its copying .h files – ErikHolstV Holst Jan 18 '20 at 12:10
  • if i try copying a file it works perfetly, but when copying a folder, it makes a mess – ErikHolstV Holst Jan 18 '20 at 12:19
  • @ErikHolstV Holst see edited answer, you may use rsync via ssh (as i personally prefer) - Dont forget to specify (full) pathnames – cmak.fr Jan 19 '20 at 04:54