You can get the timestamp of the source file using stat in timestamp format in unix format and then transfer it to the destination file using touch -d
src_file=/foo/bar dst_file=/bar/baz touch -d @$(stat -c "%Y" "$src_file") "$dst_file"
NOTE. This will only work with GNU coreutils that support unix timestamps using the @ prefix with touch
Tuxdude
source share