Linux - Synchronise 2 Directories

From PiRho Knowledgebase
Revision as of 12:50, 5 March 2025 by Knowledgebaseadmin (talk | contribs) (Use RSynch)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

rsync -avu --delete "/home/user/A/" "/home/user/B" -a archive mode; equals -rlptgoD (no -H, -A, -X) -v run verbosely -u only copy files with a newer modification time (or size difference if the times are equal) --delete delete the files in target folder that do not exist in the source Reference: https://unix.stackexchange.com/questions/203846/how-to-sync-two-folders-with-command-line-tools