Copying a set of files through CIFS from Linux to Windows 7 to preserve the timestamp
Hello All,
I am trying to copy a bunch of files from a Fedora 19 Linux server to a Windows 7 machine. I have successfully set up SAMBA/CIFS to talk from the Linux server to the Windows machine, but it does not replicate the date/time stamps of the files. It looks like it replicates the date/time stamps of the directories. Info I can see. $ uname -r 3.11.0-rc7 # rpm -qa| grep samba samba-libs-4.0.9-1.fc19.i686 samba-common-4.0.9-1.fc19.i686 samba-client-4.0.9-1.fc19.i686 samba-4.0.9-1.fc19.i686 rpm -qa| grep cifs cifs-utils-6.1-3.fc19.i686 su - # mkdir /mnt/samba # mount -t cifs //{IP Address of Windows 7 Machine}c /mnt/samba -o user=raj,password={password},rw,nosetuids,noserverino,noperm,file_mode=0777,vers=2.1 As normal user on linux side. $ cd /mnt/samba/Users/Resident/Pictures $ mkdir testdir2 $ scp -v -r -P /run/media/raj/GoflexEXT4/Pictures/* testdir2 It works, but the files have a time/stamp of current date, versus the Linux date. Regards, Raj A. Upadhyaya |
:rolleyes:Looks like rsync is working. I won't know for awhile, as it takes awhile to copy the stuff.
I am using rsync -v -r -c -t --progress /run/media/raj/GoflexEXT4/Pictures/* testdir2 instead of scp -v -r -P /run/media/raj/GoflexEXT4/Pictures/* testdir2 The question I now have is Why does it work? Regards, Raj A. Upadhyaya |
It looks like it maintains the file/date time stamps for the files, and now the directories have the current time that they were created on Windows. I am kind of stumped.
- Raj |
All times are GMT -5. The time now is 03:07 AM. |