Copying file to host: (拷贝单个文件到远端)
$ scp SourceFile user@host:directory/TargetFile
举例:
$ scp eagle.pdf root@127.0.0.1:~/var/www/eaglestudio/pdf/eagle.pdf
Copying files to host: (拷贝文件夹下所有文件到远端)
$ scp -r SourceFileFolder user@host:directory/TargetFileFolder
举例:
$ scp -r eagle root@127.0.0.1:~/var/www/eaglestudio/pdf/eagle
$ scp -r eagle/* root@127.0.0.1:~/var/www/eaglestudio/pdf/eagle
Copying file from host:(拷贝远端至本地)
$ scp user@host:directory/SourceFile TargetFile
$ scp -r user@host:directory/SourceFolder TargetFolder