View Single Post

  #4 (permalink)  
Old 05-07-2008
Dave B
 
Posts: n/a
Default Re: How to exclude MULTIPLE directories in a rsync command ?

On Wednesday 7 May 2008 07:57, Matthew Lincoln wrote:

> As I learned from the man page of rsync I can exclude a certain directory
> (trees) by using the --exclude option like in
>
> rsync .... --exclude=/proc ....
>
> But how do I exclude multiple directory (trees) at once in such a rsync
> command? The following does not work:
>
> rsync .... --exclude=/proc||/var||/dummy ....
>
> Same with "&&" instead of "||"


You can repeat --exclude many times to specify multiple exclusions.
Alternatively, you can use the --exclude-from option and put the names to be
excluded in a file, one per line. Read man rsync for the details.

--
D.
Reply With Quote