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 06-02-2008, 04: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, 05:59 AM   #2
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
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, 01: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, 08:19 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
"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-03-2008, 12:16 AM   #5
seven.neo
LQ Newbie
 
Registered: May 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Where such information can be found
 
Old 06-03-2008, 12:26 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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, 01:09 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

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


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

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

All times are GMT -5. The time now is 12:13 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration