Re: Can scp be used to update a directory?

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

 



Anne Wilson wrote:
> Hmm - I'm getting something badly wrong here:
>
> [anne@david ~]$ rsync -auvz /home/anne/ ssh:anne@borg:/home/anne/
> --exclude .* > ~/Desktop/rsynctest.txt

Jeff Vian told her:
> The .* includes all hidden (.xxxx) files, the .. (parent) directory, and
> the . (current) directory.  It may not have been what you wanted.

Anne replied:
> Of course - I had overlooked the . and .. directories.  That explains what 
> happened.  So, how can I rsync all my home folder, excluding the hidden files 
> and, say Desktop and Download directories?  I'd realy appreciate an example.

I should have thought --exclude .[a-z]* or --exclude .??* would have got
rid of most hidden files and directories. A quick check on my home
directory suggests both would do the job [1]

I'd also suspect that for the test, you need to --exclude ~/Desktop :
things could get odd if you repeatedly try to syncronise all of your
home directory to somewhere underneath it.

Hope this helps,

James.

[1] Assuming that you haven't changed LANG or LC_COLLATE to C, in which
case .[a-z]* won't get .DCOP*.

-- 
E-mail address: james | [Bradford Cathedral] took 194 years to complete. A
@westexe.demon.co.uk  | construction period of nearly two centuries may seem
                      | ridiculous to us, but of course builders were a lot
                      | quicker in those days.  -- "ISIHAC", BBC Radio 4


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

  Powered by Linux