Difference between revisions of "Rsync"
From DevOps Notebook
Line 4: | Line 4: | ||
</pre> | </pre> | ||
− | + | === Faster delete (then rm -r) of many small files with rsync === | |
− | |||
<pre> | <pre> | ||
mkdir empty_dir | mkdir empty_dir | ||
# rsync -a --delete empty_dir/ mydirfordeletion/ | # rsync -a --delete empty_dir/ mydirfordeletion/ | ||
</pre> | </pre> |
Revision as of 14:48, 25 October 2023
Copy files and directories and removed source with rsync
$ rsync --remove-source-files -rltv --progress /backup/fullbackup-20210524 /mnt/backup/2021/05/24/
Faster delete (then rm -r) of many small files with rsync
mkdir empty_dir # rsync -a --delete empty_dir/ mydirfordeletion/