Transfer a directory and all its children from a remote to local

rsync

  • Transfer files either to or from a remote host (not between two remote hosts).
    Can transfer single files, or multiple files matching a pattern.
    More information: <https://manned.org/rsync>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

rsync -r {{remote_host}}:{{path/to/remote_directory}} {{path/to/local_directory}}

click the source code to copy install rsync on any operating system with command-not-found.com