rsync --del option
Hello LQites
What is the difference between: 1) rsync -av --del /dir_one /dir_two and 2) rsync -av --del /dir_one/ /dir_two Does option 1 delete all data on the destination folder /dir_two if directory /dir_one does not exist on / Thank you. MS |
Hi there,
The best way to learn is to just try it yourself :-) If /dir_one doesn't exist, the command will fail BEFORE deleting anything, so --del has no effect in that case, and behaves no differently in these 2 cases. The only difference between the two commands is in what the destination directory structure will look like. If /dir_one contains file_three, the first command will result in /dir_two/dir_one/file_three, while the second command will result in /dir_two/file_three. Regards, Clifford |
test it out.
Code:
cd Code:
cd Code:
cd |
All times are GMT -5. The time now is 06:06 AM. |