Tuesday, February 14, 2017

rsync and explainshell

My current favourite rsync invocation is:

$ DIR=/home/jla/stuff

$ rsync -Phavz --stats remote:$DIR/  $DIR

and my current favourite way of figuring out what the options mean is:

http://explainshell.com/explain?cmd=rsync+-Phavz+--stats

http://explainshell.com/explain?cmd=rsync+-Phavz+--stats+remote%3A%24DIR%2F+%24DIR

Although it doesn't mention the crucial trailing slash on the source directory, which means that you end up copying /home/jla/stuff/file to /home/jla/stuff/file rather than to /home/jla/stuff/stuff/file.

No comments:

Post a Comment