Rsync seems to be better for file/directory operations than
scp; though the many features and capabilities can be a bit of an impediment at first. Read the man page for a number of simple and helpful examples of usage.
rsync -hazP remote_server:directory local_copy
-hazP flags mean the following:
-hdisplay human readable file sizes
-aarchive mode - syncs recursively, preserves symbolic links, modification times, group, owner, and permissions (a great option in most use cases, and means one does not need to use the
-zuse compression during the tranfer (generally always good, will speed up transfer times and use less bandwidth)
-Pcombination of --progress and --partial flags; displays a progress bar, and allows resuming interrupted transfers
If one is attempting to keep a local copy of a folder in sync with a folder on a remote server, the
--delete option is required to propagate deletions that have occurred in the source directory to the local copy.
--delete option, if one makes an initial copy of a directory, and a file is deleted from the remote folder, and one runs the same sync command again, the file that has been deleted from the remote directory will still exist in the local copy. In this case the
--delete option is needed if one prefers that the deleted file is removed from the local copy as well.
rsync -hazP --delete remote_server:directory local_copy