1. SZ and RZ
SZ: Send selected files from local (send) to remote machine
RZ: Run this command will pop up a file Selection window, select a folder from the local, receiving (receive) from the remote file
Use the installation under Mac brew :
brew install lrzsz
You also need to set up the properties with Iterm2, as shown in the tutorial:
https://www.jianshu.com/p/4926a957a41e
2. DD
Test bandwidth
dd if = /dev/zero of=sun.txt bs=1M count=1
- If input file
- of output files
- The block size of the BS byte unit
- Count copies of blocks
- /zev/zero is a character device that will constantly return 0 value bytes
3. rsync
rsync [OPTION]... SRC DEST
- Copy the local file. This mode of operation is initiated when both the SRC and des path information do not contain a single colon ":" delimiter. Such as:
rsync -a /data /backup
- Use a remote shell program (such as rsh, SSH) to copy the contents of the local machine to the remote machine. This mode is started when the DST path address contains a single colon ":" delimiter. Such as:
rsync -avz *.c foo:src
- Use a remote shell program (such as rsh, SSH) to copy the contents of the remote machine to the local machine. This mode is started when the SRC address path contains a single colon ":" delimiter. Such as:
rsync -avz foo:src/bar /data
- Copy files from the remote rsync server to the local machine. This mode is started when the SRC path information contains the "::" delimiter. Such as:
rsync -av [email protected]::www /databack
- Copy files from the local machine to the remote rsync server. This mode is started when the DST path information contains the "::" delimiter. Such as:
rsync -av /databack [email protected]::www
- Lists the list of files for the remote machine. This is similar to the rsync transfer, but only if the local machine information is omitted from the command. Such as:
rsync -v rsync://192.168.78.192/www
-A,--archive archive mode, which means to transfer files recursively and keep all file attributes
-V,--verbose verbose mode output
-Z,--compress compresses the files that are backed up when they are transferred.
4. CP
cp [OPTION]... SRC DEST
- The difference from rsync is only applicable to local file transfers
-R/R: Recursively handles all files in the specified directory with subdirectories
-I: Ask users before overwriting existing files
Data transfer for Linux