I am trying to exclude a few directories from being copied to a 2nd local hard disk. I have read the doc's, used the --exclude-from= to specify the filename.. but What confuses me is whether a directory listed in this file should have a trailing / on it or is the file completely different fro what I think it is. ie: /usr/src or /usr/src/ Thanks Ian
On Wed, Feb 13, 2002 at 06:20:30PM -0800, Ian Kettleborough wrote:> I am trying to exclude a few directories from being copied to a 2nd local > hard disk. I have read the doc's, used the --exclude-from= to specify the > filename.. but > > What confuses me is whether a directory listed in this file should have a > trailing / on it or is the file completely different fro what I think it is. > > ie: > > /usr/src > > or > > /usr/src/Either one should work. If you put a trailing slash on, it just guarantees it is a directory as opposed to an ordinary file. - Dave
On Wed, 13 Feb 2002, Ian Kettleborough wrote:> ie: > /usr/src > or > /usr/src/One thing that totally tripped me up at first is that you don't include the whole path if you're not starting the transfer from the root of the filesystem. For instance: rsync -av /usr/ foobar:/usr All your excludes would be relative to /usr/, so you'd use /src/ to exclude /usr/src/. If you use verbose mode to see the names that rsync is sending, the names you must put in your include/exclude items need to match those (with an added starting slash to anchor the match). ..wayne..