0

Hi I am rsync ing and I need to exclude the folder 'Art' and 'Thumbnail' from rsync process , these two folders are inside this location

/home/pi/Library/Application Support/Plex Media Server/Media/localhost/3/4e23c7deb529b98f89e4c27515172af8790461b.bundle/Contents/

1 Answer 1

1
rsync --exclude='/home/pi/Library/Application Support/Plex Media Server/Media/localhost/3/4e23c7deb529b98f89e4c27515172af8790461b.bundle/Contents/Art --exclude '/home/pi/Library/Application Support/Plex Media Server/Media/localhost/3/4e23c7deb529b98f89e4c27515172af8790461b.bundle/Contents/Thumbnail' [...]

or

rsync --exclude-from='file.txt' [...]

with file.txt containing the directories one per line:

/home/pi/Library/Application Support/Plex\ Media\ Server/Media/localhost/3/4e23c7deb529b98f89e4c27515172af8790461b.bundle/Contents/Art
/home/pi/Library/Application Support/Plex\ Media\ Server/Media/localhost/3/4e23c7deb529b98f89e4c27515172af8790461b.bundle/Contents/Thumbnail
3
  • So exclude flag can be used multiple times! Can you show example using file.txt Aug 29, 2016 at 11:01
  • Here is the problem the directories under localhost are different for each media after content it's same Aug 29, 2016 at 11:14
  • Rsync works with globbing, e.g., *, so you should be able to use *.bundle/Contents/Thumbnail, presuming there are no such directories you do want to sync. Otherwise you may have to filter this through a script.
    – goldilocks
    Aug 29, 2016 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.