Usage question for source at /

Larry Alkoff labradley at mindspring.com
Sun Jun 5 23:05:10 GMT 2005


Wayne Davison wrote:
> On Sat, Jun 04, 2005 at 02:52:05PM -0500, Larry Alkoff wrote:
> 
>>How do I specify starting at the root directory?  Is // correct?
> 
> 
> Just use / on its own (since it is a trailing slash).
> 
> 
>>rsync -uacHv --exclude="lost+found mnt proc public sys tmp"  //  /mnt/backup
> 
> 
> You should read the section on the --exclude option more carefully.
> You'll want something more like this:
> 
>     --exclude=/lost+found --exclude=/mnt --exclude=/proc
>     --exclude=/public --exclude=/sys --exclude=/tmp
>     
> (Your command only excludes one very strange filename.)  Alternately,
> switch over to using --exclude-from=FILE with all the anchored names on
> separate lines in the file.
> 
> ..wayne..
> 
Thanks very much for your help Wayne.

You are absolutely correct - / _is_ a trailing slash.
Now why didn't I think of that!

Actually I experimented with // and my script worked fine.

Seeing the knarly syntax for --excludes I have gone to a 
--exclude-from=FILE.  In my first try I excluded every directory from / 
except one minor one and it's working just fine and a lot easier.

Thanks again,
Larry


-- 
Larry Alkoff N2LA - Austin TX
Using Thunderbird on Slackware Linux


More information about the rsync mailing list