User Tools

Site Tools


copy_files_directories_preserving_mode_ownership_and_timestamps_across_machines

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”.
but
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