modification time
Giulio Orsero
giulioo at pobox.com
Tue Feb 8 10:03:23 GMT 2000
On Tue, 8 Feb 2000 20:32:03 +1100, hai scritto:
>But since you called it a bug I guess there's no option
>for something like that, hm? ;)
>
>Any ideas to fix this problem otherwise?
If you copy a file the modification time is preserved, but the change
time is the time you copied it.
Example:
At 10:54 I created file1, at 10:56 I copied it to file2:
$ ls -l file?
-rw-rw-rw- 1 user user 5 Feb 8 10:54 file1
-rw-rw-rw- 1 user user 5 Feb 8 10:54 file2
$ ls -lc file?
-rw-rw-rw- 1 user user 5 Feb 8 10:56 file2
-rw-rw-rw- 1 user user 5 Feb 8 10:54 file1
$ stat file?
File: "file1"
Size: 5 Filetype: Regular File
Mode: (0666/-rw-rw-rw-) Uid: ( 501/ user) Gid: ( 501/ user)
Device: 3,6 Inode: 109772 Links: 1
Access: Tue Feb 8 10:56:09 2000(00000.00:00:11)
Modify: Tue Feb 8 10:54:50 2000(00000.00:01:30)
Change: Tue Feb 8 10:54:50 2000(00000.00:01:30)
File: "file2"
Size: 5 Filetype: Regular File
Mode: (0666/-rw-rw-rw-) Uid: ( 501/ user) Gid: ( 501/ user)
Device: 3,6 Inode: 109791 Links: 1
Access: Tue Feb 8 10:54:50 2000(00000.00:01:30)
Modify: Tue Feb 8 10:54:50 2000(00000.00:01:30)
Change: Tue Feb 8 10:56:09 2000(00000.00:00:11)
$
So:
1) if rsync support "change time" instead of "modification time", use
it.
2) otherwise, you can write a script that sets the modification time of
files = their change time (by touching -t, for instance), right before
rsyncing.
3) maybe you can find a simpler way to do it :-)
--
giulioo at pobox.com
More information about the samba
mailing list