Is there a remote file transfer command that preserves nanosecond timestamps?
- by Denver Gingerich
I've tried transferring files using scp and rsync on Ubuntu 10.04, but neither of them preserves more than second precision. Here's an example:
$ touch test1
$ scp -p test1 localhost:test2
$ ls -l --full-time test*
-rw-r--r-- 1 user user 0 2011-01-14 18:46:06.579717282 -0500 test1
-rw-r--r-- 1 user user 0 2011-01-14 18:46:06.000000000 -0500 test2
$ cp -p test1 test2
$ ls -l --full-time test*
-rw-r--r-- 1 user user 0 2011-01-14 18:46:06.579717282 -0500 test1
-rw-r--r-- 1 user user 0 2011-01-14 18:46:06.579717282 -0500 test2
$
A straight copy works fine, but scp truncates the timestamp.
Are there any tools (preferably similar to scp or rsync in their usage) that do remote file transfers while preserving nanosecond timestamps? I could write a hacky script to do it, but I'd rather not.