How to preserve files original creation date?

Use scp with the -p option.

 -p      Preserves modification times, access times, and modes from the original file.

Example command copying a file from local to remote server:

scp -p /home/mylocaldata/test.txt remote.example.com:/home/remote_dir

Note that this will not preserve user and group only permission flags (rwx and such).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)