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 06-02-2008, 03:33 AM   #1
seven.neo
LQ Newbie
 
Registered: May 2008
Posts: 3

Rep: Reputation: 0
file time question?


hello!

please ask how to get about "ctime, atime, mtime" three time

Details at linux system.
 
Old 06-02-2008, 04:59 AM   #2
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596

Rep: Reputation: 80
how to get about "ctime, atime, mtime"?
how to get about "ctime, atime, mtime"?
how to get about "ctime, atime, mtime"?
 
Old 06-02-2008, 12:14 PM   #3
seven.neo
LQ Newbie
 
Registered: May 2008
Posts: 3

Original Poster
Rep: Reputation: 0
[root@u1 ~]# stat test
File: `test'
Size: 4096 Blocks: 16 IO Block: 4096 directory
Device: 303h/771d Inode: 223378 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2008-05-31 04:58:11.000000000 +0800
Modify: 2008-05-31 04:58:11.000000000 +0800
Change: 2008-05-31 04:58:11.000000000 +0800

access: atime
modify: mtime
change: ctime

how to get about this three time Details
 
Old 06-02-2008, 07:19 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
"Three fields in the inode structure contain the last access, change, and modification times: atime, ctime, and mtime. The atime field is updated each time the pointer to the file's data blocks is followed and the file's data is read. The mtime field is updated each time the file's data changes. The ctime field is updated each time the file's inode changes. The ctime is not creation time; there is no way under standard Unix to find a file's creation time."

HTH
 
Old 06-02-2008, 11:16 PM   #5
seven.neo
LQ Newbie
 
Registered: May 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Where such information can be found
 
Old 06-02-2008, 11:26 PM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
This looks like homework...

seven;
What does this say to you?:
Quote:
The ctime is not creation time; there is no way under standard Unix to find a file's creation time.
Have you done a Google search?
 
Old 06-03-2008, 12:09 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
As per Pixellany, its in google. That quote is actually from my Perl Cookbook. Its a common misconception about ctime.
 
  


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
file time stamp is wrong with ssh file transfer cy163 Linux - Newbie 8 05-18-2008 01:40 AM
how to find time of file creation of a given file??? raklo Linux - General 4 08-13-2007 05:28 AM
'time' question exit3219 Programming 4 11-25-2005 08:00 AM
Question about getting the date/time information from a file shazam75 Linux - General 1 10-31-2004 07:54 AM
Time of creation of a file proxyserver Linux - Software 2 04-11-2004 10:29 AM

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

All times are GMT -5. The time now is 01:35 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
Open Source Consulting | Domain Registration