preserve the timestamp of a file

It is a good idea to use the -p flag with the cp or the scp command to preserve the modified time and other attributes of the file to indicate the file/directory itself has not changed after the modified time of the source file/directory. If you really like to compare files in two different locations use the hash of a file rather than depend on the size or the modified time of the file.

About this entry