Jump to content

Linux file managers and timestamp issues


Trio3b
 Share

Recommended Posts

MDV 2008.1

 

Konqueror folder timestamps seem random. Folder creation date seems to be modified to the date when moving folders to other devices (e.g. flashdrives, other PCs)

 

Access and modification dates seem not to be correct either. For example I have a folder that I am positive was created 5 years ago but creation date is today 03/29/10. stat command also gives this date.

 

Any fix or update for this?

 

Any help appreciated.

Link to comment
Share on other sites

  • 7 months later...

Bump?

 

after digging into this it appears time / date stamp issues are more serious than I first thought. Found lots of info on inode structure ( don't understand but it doeesn't help me) and many searchs indicate issues about transfer of files over samba, etc. When I open some files to read them, the access and modified date moves to the day I read the file and erases the original date. other files don't change. I need to find some way to know when a file was originally created besides having to indicate the date in the filename.

 

I created a text file, waited 10 minutes then added a few word and both access and modify dates were changed to 10 minutes later. Then opened a 2 yr old jpg and tinkered with GIMP, saved and access and modify date are still 2 yrs old. What's up? Is there some reason file creation date is not important in linux or am I missing something? I understand stamps can be off b/c of BIOS or battery but this is not the case this happens on all PCs and laptops I have. Date stamps are very important without having to stat or tar a tiny doc file ( as suggested by some)

 

I don't want to use "touch" to update timestamps. I want original creation date to be persistant and access or mod date to change. I suppose I can include the date in the filename but that seems labor intensive over the long term.

 

Any thoughts or help appreciated.

 

Thanks

Edited by Trio3b
Link to comment
Share on other sites

The creation date should be persistent. The problem comes when you copy them from one machine to another. Then the created date becomes the day that you copied it to the other system. Possibly down to the application used for copying it, and or the protocol, ftp, samba, etc.

Link to comment
Share on other sites

The creation date should be persistent. The problem comes when you copy them from one machine to another. Then the created date becomes the day that you copied it to the other system. Possibly down to the application used for copying it, and or the protocol, ftp, samba, etc.

 

More searching indicates UNIX/Linux filesystem do not record a create time but record atime, mtime, ctime. I have read many threads about problems during file transfers but I believe rsync and grsync have flags that can be invoked but have not yet checked it out. My problem is I notice that file date stamps seem to change in my home directory files that are not moved anywhere. As mentioned created simple text file 11-18 then modified it 10 min later and ALL times were changed. Accessed again today and all three times reflect todays date (11-19). This is not good! I don't need accuracy down to hours and minutes but Date stamping appears to follow any and all actions even if file is NOT transfer but accessed or modified in its home directory/partition. Even openoffice files stat this behavior. Very concerning from a business that relies on documents .Hence this thread. Maybe I just don't understand.

 

[user@laptop Desktop]$ stat office_help.ods

File: `office_help.ods'

Size: 14774 Blocks: 32 IO Block: 4096 regular file

Device: 806h/2054d Inode: 1804178 Links: 1

Access: (0664/-rw-rw-r--) Uid: ( 500/ user) Gid: ( 500/ user)

Access: 2010-07-22 11:09:54.000000000 -0600

Modify: 2010-07-22 11:09:56.000000000 -0600

Change: 2010-07-22 11:09:56.000000000 -0600

 

Then I open and modify a few cells and run stat again with this result

 

[user@laptop Desktop]$ stat office_help.ods

File: `office_help.ods'

Size: 14793 Blocks: 32 IO Block: 4096 regular file

Device: 806h/2054d Inode: 1804178 Links: 1

Access: (0664/-rw-rw-r--) Uid: ( 500/ user) Gid: ( 500/ user)

Access: 2010-11-19 07:53:18.000000000 -0700

Modify: 2010-11-19 07:53:18.000000000 -0700

Change: 2010-11-19 07:53:18.000000000 -0700

 

As you can see all three dates change after a slight mod to the spreadsheet. Also not good!

 

I read someplace that no creation date is implemented in Linux b/c of inode structure and performance hits. Does that sound logical? Seems to me that creation date in the file system should be considered extremely important for a number of reasons. There are some suggestions to tar the files to create a date stamp but that also seems unecessary. I have taken to including date prefixed to filename.

 

 

[uPDATE]: it appears Konq properties takes info from stat which alters all three times, but properties from within OO appear to show original creation time independent of transfer to new disc and access. If this is so then all is well. Pretty good scare there. I still believe the file system should record create date and it be persistant part of file metadata.

 

 

Thanks

Edited by Trio3b
Link to comment
Share on other sites

I did a test:

 

ian@elise:~$ stat test 
 File: `test'
 Size: 0         	Blocks: 0          IO Block: 4096   regular empty file
Device: 803h/2051d	Inode: 77873       Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/     ian)   Gid: ( 1000/     ian)
Access: 2010-11-19 17:15:39.297144511 +0100
Modify: 2010-11-19 17:15:37.473321203 +0100
Change: 2010-11-19 17:15:39.286020984 +0100

 

just an empty file created.

 

ian@elise:~$ stat test 
 File: `test'
 Size: 5         	Blocks: 8          IO Block: 4096   regular file
Device: 803h/2051d	Inode: 98512       Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/     ian)   Gid: ( 1000/     ian)
Access: 2010-11-19 17:17:16.569141331 +0100
Modify: 2010-11-19 17:17:16.529148190 +0100
Change: 2010-11-19 17:17:16.533149005 +0100

 

now added text to the file. So of course all three changed, because I accessed and modified the file.

 

ian@elise:~$ stat test 
 File: `test'
 Size: 5         	Blocks: 8          IO Block: 4096   regular file
Device: 803h/2051d	Inode: 98512       Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/     ian)   Gid: ( 1000/     ian)
Access: 2010-11-19 17:17:16.569141331 +0100
Modify: 2010-11-19 17:17:16.529148190 +0100
Change: 2010-11-19 17:17:16.533149005 +0100

 

the only thing now is that I check the file and open it with gedit, and it doesn't update any of the times. Seems for me it preserved it.

 

What filesystem are you using? I'm using jfs.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...