On Fri, Nov 09, 2018 at 04:03:51PM -0800, Rich Shepard wrote:
>   I want to copy /home and /opt from one host to another, including all
> dotfiles (common in /home).
> 
>   Operating within the destination directory would this the the optimal pair
> of commands to use?
> 
> shopt -s dotglob
> rsync -av salmo:/home/* ./

No need to set dotglob or use a splat in the source path.  rsync will
find your dotfiles.  The following should work just fine:

    rsync -av salmo:/home/ .

The trailing slash in the source path tells rsync to copy the contents
of the directory into the destination path.  Otherwise it would create
a new directory (home/) under the destination path.

The "dry run" option (-n) is your best friend when trying to figure
out a correct rsync command line.  It'll show you everything that
would have happened, without actually making any changes.


-- 
Paul Mullen
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to