LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-28-2013, 04:43 PM   #1
Rupadhya
Member
 
Registered: Sep 2012
Location: Hoffman Estates, IL
Distribution: Fedora 20
Posts: 167

Rep: Reputation: Disabled
Smile 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

Last edited by Rupadhya; 08-28-2013 at 06:06 PM.
 
Old 08-28-2013, 07:31 PM   #2
Rupadhya
Member
 
Registered: Sep 2012
Location: Hoffman Estates, IL
Distribution: Fedora 20
Posts: 167

Original Poster
Rep: Reputation: Disabled
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
 
Old 08-28-2013, 08:33 PM   #3
Rupadhya
Member
 
Registered: Sep 2012
Location: Hoffman Estates, IL
Distribution: Fedora 20
Posts: 167

Original Poster
Rep: Reputation: Disabled
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
 
  


Reply

Tags
cifs, linux, samba, samba security win7 winxp



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to preserve all timestamps while copying files megalosaurus Red Hat 12 07-13-2015 05:19 AM
Strange CIFS error, files are not copying properly punt Linux - Networking 1 12-28-2010 09:34 AM
Copying files from case-sensitive Linux to case-insensitive Windows via CIFS? SlowCoder Linux - General 4 05-07-2008 07:03 PM
Help - My Samba share changes the timestamp when copying files to it.. Preserve Time. hheejj Linux - Software 2 06-28-2005 09:34 AM
preserve user/group when copying files km4hr Linux - Software 1 01-11-2005 05:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration