Chuyển đến nội dung chính

copy between local and remote host using "scp" command

scp allows files to be copied to, from, or between different hosts. It uses ssh for data transfer and provides the same authentication and same level of security as ssh.

Examples

Copy the file "foobar.txt" from a remote host to the local host

    $ scp your_username@remotehost.edu:foobar.txt /some/local/directory

Copy the file "foobar.txt" from the local host to a remote host

    $ scp foobar.txt your_username@remotehost.edu:/some/remote/directory

Copy the directory "foo" from the local host to a remote host's directory "bar"

    $ scp -r foo your_username@remotehost.edu:/some/remote/directory/bar

Copy the file "foobar.txt" from remote host "rh1.edu" to remote host "rh2.edu"

    $ scp your_username@rh1.edu:/some/remote/directory/foobar.txt \
    your_username@rh2.edu:/some/remote/directory/

Copying the files "foo.txt" and "bar.txt" from the local host to your home directory on the remote host

    $ scp foo.txt bar.txt your_username@remotehost.edu:~

Copy multiple files from the remote host to your current directory on the local host

    $ scp your_username@remotehost.edu:/some/remote/directory/\{a,b,c\} .
    $ scp your_username@remotehost.edu:~/\{foo.txt,bar.txt\} .

scp Performance

By default scp uses the Triple-DES cipher to encrypt the data being sent. Using the Blowfish cipher has been shown to increase speed. This can be done by using option -c blowfish in the command line.
    $ scp -c blowfish some_file your_username@remotehost.edu:~
It is often suggested that the -C option for compression should also be used to increase speed. The effect of compression, however, will only significantly increase speed if your connection is very slow. Otherwise it may just be adding extra burden to the CPU. An example of using blowfish and compression:
$ scp -c blowfish -C local_file your_username@remotehost.edu:~

Nhận xét

Bài đăng phổ biến từ blog này

Windows 10 enable long file/folder path

Windows 10 enable long file/folder path Registry Import Enabling Long Paths Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\FileSystem] "LongPathsEnabled"=dword:00000001 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem] "LongPathsEnabled"=dword:00000001 Enable via group policy editor Local Computer Policy -> Computer Configuration -> Administrative Templates -> System -> FileSystem -> Double click Enable Win32 long paths and select Enabled

Xcode 8 support devices ios 7

Tải XCode 5.1.1 về, copy 2 folder 7.0 & 7.1 trong thư mục /Volumes/Xcode/ Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport sang thư mục DeviceSupport của phiên bản XCode 8 (hiện tại) Mở file SDKSetting.plist trong thư mục /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk Thêm giá trị 7.0 & 7.1 vào key Root->DefaultProperties->DEPLOYMENT_TARGET_SUGGESTED_VALUE Thoát XCode & khởi động lại XCode

Hướng dẫn compile module Python trên windows x64 và x86 [Compiling Python 2.7 Modules on Windows 32 and 64 using MSVC++ 2008 Express]

Bài viết được sưu tầm tại địa chỉ tại đây Hello, On this post i will explain how to build, compile, install and distribute python modules on Windows using Microsoft Visual C++ Express Edition. This post will be constantly updated to cover future updates of python, windows and msvc++ versions. For this example i will use the PyCrypto – http://pycrypto.org because this is an example that don’t have packages for windows x64 on the web. Observation: Don’t use Microsoft Visual C++ Express Edition 2010 to build python modules, because this will not work due to Python 2.7 was built using the 2008 version. This is an error that occurs when you try to build PyCrypto and Paramiko using the 2010 version and execute the import module: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 >>> import paramiko Traceback (most recent call last):    File "<stdin>" , line 1 , in <module>    File "C:\Pyt...