
Here I'm wrapping rsync with parens, and piping its output to ssh through a pipe, i.e.: (rsync.

If you'd like to concatanate the results from rsync to a remote file you can use a compound command ( see bash's man page). rwxrwxr-x 1 saml saml 10059 Oct 15 15:20 sample.sh % ssh remotemach "ls -l sample.sh rsync.log" rw-r-r- 1 saml saml 192 Feb 2 14:57 /home/saml/rsync.log rwxrwxr-x 1 saml saml 10059 Oct 15 15:20 /home/saml/sample.sh log-file=$HOME/rsync.log scp $HOME/rsync.log remotemach:~Ĭonfirming % ls -l ~/rsync.log ~/sample.sh rsyncing file + log % rsync -avz -e 'ssh' $HOME/sample.sh remotemach:~ \ This is done via SSH and is therefore an encrypted operation.I would do the rsync to the other machine and then just run a scp command after to put the locally generated log file to the remote system where you'd like it kept. With Secure Copy you can transfer data from one local computer to another or vice versa. The Linux SCP command can also be helpful. In newer Ubuntu versions, the programming language is pre-installed by default. However, you need Python 3.5 (or newer) for it. With this you get a graphical progress display during the copy process. The Linux command PYCP is also interesting. The command is suitable, for example, if you want to copy complete hard disks or partitions. For this the process proceeds bit by bit. With this one you have the additional possibility to change the format of the data during the copy process. With this command, too, you enter the source object and the destination path.Ī bit more sophisticated than CP is the DD command. For example, if you want to create a copy and then delete the original, you have to resort to MV (move). Outputs a message after the copy operation.ĭespite the numerous options at hand with CP, the command can only be used in a relatively limited way. Overwrites a backup suffix with its own term when copying with -backup.Ĭp -backup=simple –suffix=own_suffix text.txt /home/user/destinationfolder/Ĭopies the file only if the destination file is older than the original.Ĭp -u text.txt /home/user/destinationfolder/text.txtĬp -update text.txt /home/user/destinationfolder/text.txt Overwrites a backup suffix when copying with -backup.Ĭp -backup=simple -S text.txt /home/user/destinationfolder/ The security context of the original file is inherited during copying.Ĭp -preserve=context text.txt text1.txtĮxtended attributes of the original file are inherited during copying.Īll attributes of the original file are inherited during copying.Ĭp -P text.txt /home/user/destinationfolder/Ĭp -no-dereference text.txt /home/user/destinationfolder /ĭirectories are copied recursively including subdirectories.Ĭp -r /home/user/originalfolder/ /home/user/destinationfolder/Ĭp -R /home/user/originalfolder/ /home/user/destinationfolder/Ĭp -recursive /home/user/originalfolder/ /home/user/destinationfolder/Ĭreates a symbolic link to the original file.Ĭp -s text.txt /home/user/destinationfolder/Ĭp -symbolic-link text.txt /home/user/destinationfolder/ Links of the original file are inherited when copying. The timestamp of the original file is inherited during copying.Ĭp -preserve=timestamp text.txt text1.txt The ownership of the original file is inherited when it is copied.Ĭp -preserve=ownership text.txt text1.txt The mode of the original file is inherited during copying. Copies the file with the same permission settings and metadata as the original.Ĭp -a text.txt /home/user/destinationfolder/Ĭp -archive text.txt /home/ user/destinationfolder/Ĭreates a copy in the buffer if the original and the destination have the same file name but different contents.Ĭp -b text.txt /home/user/destinationfolder/Ĭp -backup text.txt /home/user/destinationfolder/Ĭreates a new numbered file if the original and destination have the same file name but different contents.Ĭp -backup=numbered text.txt /home/user/destinationfolder/Ĭreates a new numbered file if the original and destination have the same file name but different contents – and there are already numbered backups.Ĭp -backup=existing text.txt /home/user/destinationfolder/Ĭp -d text.txt /home/user/destinationfolder/Ĭp -f text.txt /home/user/destinationfolder/text.txtĬp -force text.txt /home/user/destinationfolder/text.txtĪsks permission before overwriting files with the same name.Ĭp -i text.txt /home/user/destinationfolder/Ĭp -interactive text.txt /home/user/destinationfolder/Ĭp -l text.txt /home/user/destinationfolder/Ĭp -link text.txt /home/user/destinationfolder/Ĭp -n text.txt /home/user/destinationfolder/Ĭp –no-cobbler text.txt /home/user/destinationfolder/Īttributes of the original file are inherited during copying.
