Home » Questions » Computers [ Ask a new question ]

Use rsync to copy all files except for certain filenames with a certain extension

Use rsync to copy all files except for certain filenames with a certain extension

I have two same-size flash cards, and I want to copy contents of one to the other based on the following rules:

Asked by: Guest | Views: 111
Total answers/comments: 1
Guest [Entry]

"This would be significantly easier using rsync with its --exclude switch.

rsync -av --exclude='*.FOO' --exclude='*.BAR' --exclude='*.ZIM' /source /dest

The -v switch will provide verbose output on which files are being synchronised."