The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
mtime, ctime, and atime Perderabo Tips and Tutorials 2 08-30-2007 06:13 AM
find . -mtime topcat8 UNIX for Dummies Questions & Answers 1 04-26-2006 07:55 AM
atime, ctime, mtime somewhere along csize.. moxxx68 UNIX for Dummies Questions & Answers 4 03-02-2005 03:14 PM
mtime vs ctime moxxx68 UNIX for Dummies Questions & Answers 3 11-06-2004 07:57 PM
ctime & find 98_1LE UNIX for Dummies Questions & Answers 1 06-22-2001 12:33 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 08-10-2006
Registered User
 

Join Date: Jan 2006
Posts: 43
how to find ot ctime , mtime ,atime

Can any one tell me how to find out ctime , mtime ,atime for a file/directory on unix.

Cheers,
Nilesh
Reply With Quote
Forum Sponsor
  #2  
Old 08-10-2006
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,326
Ever heard of the ls command? Check the man page.
Reply With Quote
  #3  
Old 08-10-2006
Registered User
 

Join Date: Jan 2006
Posts: 43
when I do the execute ls -l command I get the long listing of the files/dir


what I am after is how to get the ctime,mtime and atime for a file.

/home/den/sedscripts> ls -lc
total 48
-rwxrwxrwx 1 dhawalen ccm_scd 23 Aug 10 10:17 ouput
-rwxrwxrwx 1 dhawalen ccm_scd 147 Aug 10 10:27 sedscript
-rwxrwxrwx 1 dhawalen ccm_scd 134 Aug 10 10:17 testdata

is there any way to find out the same.

also if I want to know why year file in created how would I know tht as above dosent say any thing about year ??
Reply With Quote
  #4  
Old 08-10-2006
Registered User
 

Join Date: Nov 2002
Location: Singapore
Posts: 128
ls -ltr
ls -lutr
ls -lctr

Check MAN page, my dear MAN
Reply With Quote
  #5  
Old 08-10-2006
Registered User
 

Join Date: Jan 2006
Posts: 43
Thanks mate.

One of those days where head is buzzing offf....!!!!!!
Reply With Quote
  #6  
Old 1 Week Ago
Registered User
 

Join Date: Oct 2008
Posts: 16
Code:
$ sudo debugfs /dev/sda1
[sudo] password for testman:
debugfs 1.41.3 (12-Oct-2008)
debugfs:  cd /home/testman
debugfs:  stat filename
debugfs:  quit
or
Code:
$ stat filename
you could see ctime atime mtime at the same time

Last edited by lifegeek; 1 Week Ago at 11:47 AM.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:20 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0