Mirror a directory with SCP

Another short one today, courtesy of Chris H.

When working in a directory, if you need to copy everything from the current directory to an identical path on another machine, you can do it as follows:

scp -r ./* remote.host:$PWD

This is also possible with rsync, but as the SCP syntax is much simpler it's a nice one liner to know.

comments powered by Disqus