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 and shell scripting languages 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 10:13 AM
find . -mtime topcat8 UNIX for Dummies Questions & Answers 1 04-26-2006 11:55 AM
atime, ctime, mtime somewhere along csize.. moxxx68 UNIX for Dummies Questions & Answers 4 03-02-2005 06:14 PM
mtime vs ctime moxxx68 UNIX for Dummies Questions & Answers 3 11-06-2004 10:57 PM
ctime & find 98_1LE UNIX for Dummies Questions & Answers 1 06-22-2001 04:33 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-10-2006
nilesrex nilesrex is offline
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
  #2 (permalink)  
Old 08-10-2006
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
Ever heard of the ls command? Check the man page.
  #3 (permalink)  
Old 08-10-2006
nilesrex nilesrex is offline
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 ??
  #4 (permalink)  
Old 08-10-2006
izy100 izy100 is offline
Registered User
  
 

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

Check MAN page, my dear MAN
  #5 (permalink)  
Old 08-10-2006
nilesrex nilesrex is offline
Registered User
  
 

Join Date: Jan 2006
Posts: 43
Thanks mate.

One of those days where head is buzzing offf....!!!!!!
  #6 (permalink)  
Old 11-08-2008
lifegeek lifegeek is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 29

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; 11-10-2008 at 02:47 PM..
Closed Thread

Bookmarks

Tags
mtime

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:50 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0