Geeky question:

This is what people and friends have tried:

rsync -arv --exclude "/home/john/.ccache:/home/ben/build" /home/john /media/ben/thumbdrive/

Answer:

To exclude multiple directories you just use multiple --exclude=path switches. So the command from the question properly written is as follows:

rsync -arv --exclude=.ccache --exclude=build /home/john /media/john/thumbdrive/

Note: Use relative paths with exclude. The paths are relative to the source directory, here /home/john.

A big thank you for Ubuntu forums for the same!

By Akash Angle

I am a Full time Linux user who has quit using Windows for unknown reasons, making my life truly open source.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x