LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   The 'modified times' of files and folders is reset when copied from windows to linux? (https://www.linuxquestions.org/questions/linux-newbie-8/the-modified-times-of-files-and-folders-is-reset-when-copied-from-windows-to-linux-152218/)

crazyswede 03-01-2004 10:28 AM

The 'modified times' of files and folders is reset when copied from windows to linux?
 
I hope that this is something that I can change :(

I am copying a lot of data 300 - 400 GB to a nas server that I have setup using SUSE and Samba. The problem is that the 'Modified date' of files that are copied over to the fat32 partitions are reset to the date they are copied. If you move something in Windows it keeps the modified date.

I want to keep the modified dates of each file and folder. Is there some setting somewhere that tells linux to put a new modified date?

thanks

crazyswede

sirpimpsalot 03-01-2004 11:46 AM

have you tried moving the files instead of copying?

bigearsbilly 03-01-2004 12:07 PM

How are you copying?

Are you copying linux to windows?

Try 'cpio -m'
-m keeps the modification times. (on my solaris box anyway)

use cpio with 'find'

(type 'man cpio' for manual page)
Look at the man pages to see what the switches mean.

Something like this:
=======================================


cd SOURCE_DIR
find . -depth | cpio -pumd DESTINATION_DIR





billy

crazyswede 03-01-2004 04:23 PM

I will try move tomorrow when I get into work...

I am moving files from windows onto fat32 partitions running under linux.

Will inform you how it goes :)

jschiwal 03-01-2004 07:27 PM

If you read the info section for tar, there is an example of piping through the tar command in order to move entire folders or partitions. I believe this would preserve all permissions and access attributes.

crazyswede 03-02-2004 04:44 AM

The problem is that people will be moving files there themselves when the unit is functioning properly and it will be important to be able to see when the file was modified and not show what time it was copied :(

I still have a lot to learn, but I am positive and I like linux more and more :)

bigearsbilly 03-02-2004 05:39 AM

aah i see. i suppose they copy using kde or whatever method they want.

Samba is out of my knowledge range I'm afraid, but maybe there's something in it's config that specifies how the times of files apply
when moved? just a guess.

sorry can't help further!

billy

crazyswede 03-02-2004 08:53 AM

Thanks anyway...

I am not giving up :D

The storage machine (nas server) is the only linux machine in the office if you don't count coda machines, the rest (workstations) are WindowsXP pro's.


All times are GMT -5. The time now is 07:08 AM.