LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-01-2004, 11:28 AM   #1
crazyswede
Member
 
Registered: Jan 2004
Posts: 30

Rep: Reputation: 15
Question 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
 
Old 03-01-2004, 12:46 PM   #2
sirpimpsalot
Member
 
Registered: Feb 2004
Posts: 141

Rep: Reputation: 15
have you tried moving the files instead of copying?
 
Old 03-01-2004, 01:07 PM   #3
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Debian, Mint, Puppy, Raspbian
Posts: 3,420

Rep: Reputation: 198Reputation: 198
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
 
Old 03-01-2004, 05:23 PM   #4
crazyswede
Member
 
Registered: Jan 2004
Posts: 30

Original Poster
Rep: Reputation: 15
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
 
Old 03-01-2004, 08:27 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
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.
 
Old 03-02-2004, 05:44 AM   #6
crazyswede
Member
 
Registered: Jan 2004
Posts: 30

Original Poster
Rep: Reputation: 15
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
 
Old 03-02-2004, 06:39 AM   #7
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Debian, Mint, Puppy, Raspbian
Posts: 3,420

Rep: Reputation: 198Reputation: 198
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
 
Old 03-02-2004, 09:53 AM   #8
crazyswede
Member
 
Registered: Jan 2004
Posts: 30

Original Poster
Rep: Reputation: 15
Thanks anyway...

I am not giving up

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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Tar command copied multiple times? cbriscoejr Linux - General 1 11-12-2004 03:09 PM
Windows files copied to my linux partition are locked when logged in as a normal user necbrownie Slackware 8 10-15-2004 09:11 AM
WinXP can't read linux files copied to FAT32 partition gdh Linux - General 1 08-07-2004 11:31 AM
Configuration file I modified will be reset after restart. ICO Slackware 3 02-12-2004 09:00 PM
compile files copied from windows max_linuxquesti Linux - Software 4 12-19-2002 03:00 PM


All times are GMT -5. The time now is 04:28 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration