Pages

Thursday, July 16, 2009

Timestamp same as another file

A way to set the timestamp on one file the same as on another file:
TIMESTAMP=`stat -c %Y onefile.txt`
touch -d @$TIMESTAMP anotherfile.txt
Or use date -r with the right format for the seconds since epoch

No comments:

Post a Comment