LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 08-28-2009, 12:52 PM   #1
mike_stlouis
LQ Newbie
 
Registered: Oct 2007
Posts: 6

Rep: Reputation: 0
real last modified date... not when copied to machine


i copied some file to a linux machine and the only dates i can find with any of the ls options is when it was copied over (all the files have the same "last modified" date as they were all copied at the same time) - but that's not the last modified date i'm looking for... i'm looking for when the jar file was built (and the other files where last changed). how do i see that?
thanx!
 
Old 08-28-2009, 01:00 PM   #2
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
Go back to the original system and look there. It isn't in the current location as you lost it when you copied the files over. There are ways to preserve that info with a copy, but you didn't use any of them.

HTH

Forrest
 
Old 08-28-2009, 01:08 PM   #3
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
... and the stat utility will show you just about everything worth knowing about a file; e.g.,
Code:
stat stuff.sh
  File: `stuff.sh'
  Size: 121             Blocks: 8          IO Block: 4096   regular file
Device: 807h/2055d      Inode: 626         Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/   trona)   Gid: (  100/   users)
Access: 2009-08-28 14:04:16.000000000 -0400
Modify: 2008-06-27 17:14:18.000000000 -0400
Change: 2009-01-25 13:02:22.000000000 -0500
Like forrestt says, no way to know original create date without using, say, the -p (--preserve) option with cp.
 
Old 08-28-2009, 01:17 PM   #4
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Correct me if I'm wrong, but (currently, in the common filesystems) creation time is not stored anywhere, only access, change and modification times (when file was accessed, when its properties were changed and when its contents were changed). To me this is perfectly sane (creating a file is modifying that file). I haven't ever found a need to see 'creation time', and I assume if you needed that badly, you could use a database for that need..and if you did keep track of creation dates, would it in the end make any sense, if the files were modified possibly several times, perhaps completely, after that? For example you had a file called notes which was created 21.5.2012, and you looked at it five years later, knowing that it's modification time was updated some thousand times after that -- what would you do with the creation time then? Remembered when you started taking notes? Well, what if you had that file in place already, maybe by accident, and later just wrote your "notes" there -- that would mean that your file was physically created earlier than your "notes" (the file you know that contains your notes) were really created. In my opinion there are some problems here, one of which is that if you transfer your file through a filesystem that doesn't support creation date, you probably lose it anyway, making your system show it created later than it really was.

According to Wikipedia, ext4 "improves" (depends on the needs of the user, I guess..) timestamps compared to ext3, also providing the creation date timestamp. In the same paragraph it's pointed out that it's not enough, though, and you won't be seeing it in use in the near future..so I wouldn't be expecting it, either.
 
  


Reply



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
images creation date newer than last modified date fenrisW0lf Linux - Newbie 3 07-28-2009 05:04 PM
shell script to find modified date and last accessed date of any file. parasdua Linux - Newbie 6 04-22-2008 09:59 AM
How to tell which files have been copied or modified stagnitto Linux - Security 2 10-02-2007 09:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:22 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