Re: Excluding two subdirectories in rsync

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Christopher K. Johnson wrote:
Robert Moskowitz wrote:
I have been using an rsync for Centos updates like:

rsync -auv rsync://mirrors..../updates/i386/ --delete --exclude=debug/ /repos/centos/updates/i386

But for Fedora 11, I see there is a drpms subdirectory that I ASSuME I don't need, drpms.
How do I exclude two subdirectories? I can't figure it out from the
man pages.
--exclude="debug/ drpms/"   ???

Add another --exclude instead.
rsync -auv rsync://mirrors..../updates/i386/ --delete --exclude=debug/ --exclude=drpms/ /repos/centos/updates/i386
Let me say that Anne has showed how to use a skiplist, and that's the better way. After that I'll note that this is where you might find shell brace-comma notation saves a lot of typing and keeps lines in scripts reasonable:
  rsync -auv ~ --exclude={*~,[Cc]ache/}$(hostname)

More useful in a one time manually typed command, obviously.

Bill Davidsen <[email protected]>
  "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot

fedora-list mailing list
[email protected]
To unsubscribe:

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux