User Tools

Site Tools


scp -pr sourcedirectory user@dest:/path

* -p preserves modification times, access times, and modes from the original file.
* -r means recursive

Likewise, using sftp:

sftp> get *
will set the timestamp for all these files to “now”.
sftp> get -p *
will preserve the timestamps of the source files.

copy_files_directories_preserving_mode_ownership_and_timestamps_across_machines.txt · Last modified: 2017/01/04 09:13 by root