ls -ltr, TIME DETAILS ??


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users ls -ltr, TIME DETAILS ??
# 1  
Old 08-30-2007
ls -ltr, TIME DETAILS ??

when I write the command ls -ltr it shows the detail of the files. Like

-rwxrwxrwx 1 mqsiadm mqbrkrs 0 Aug 29 14:03 dspmq_temp
-rwxrwxrwx 1 mqsiadm mqbrkrs 666 Aug 30 06:12 dspmq_script

In this,DATE TIME is shown, Now the question is : how can I see the all the times like Creation time, Modified time and Last access time of that file ?



PLEASE HELP !!
ASAP !!
THANKS.
# 2  
Old 08-30-2007
There is no creation time kept for a file. See mtime, ctime, and atime
# 3  
Old 09-01-2007
This may be more info than you need, but here goes....

stat filename

Example:
Code:
$ stat mbox
  File: `mbox'
  Size: 14603436        Blocks: 28568      IO Block: 4096   regular file
Device: 803h/2051d      Inode: 1140936     Links: 1
Access: (0600/-rw-------)  Uid: ( 1000/   cassj)   Gid: ( 1000/   cassj)
Access: 2007-09-01 10:11:22.000000000 -0400
Modify: 2007-08-25 01:23:30.000000000 -0400
Change: 2007-08-25 01:23:30.000000000 -0400

# 4  
Old 09-03-2007
stat does not work on AIX5.0, and I am using AIX.
It works as istat filename.

Any other option ??
# 5  
Old 09-03-2007
How about taking a look at the link in Perderabo's post? I suggest that you read the entire tutorial. Very well written and very informative.
# 6  
Old 09-04-2007
Yup !!
Thanks "Blowtorch", actually i have read that link carefully !!
Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Generic script to load file details(ls -ltr) in to a database.

All, I am trying to create a report on the duration of an ETL load from the file arrival to the final dump in to a database for SLA's. Does anyone have any guidance or ideas on how metadata can be extracted; information of a file: like file name, created timestamp, count of records and load... (1 Reply)
Discussion started by: pradeepp
1 Replies

2. Shell Programming and Scripting

I have two commands “ls -h” and “ls -ltr”. How do i make sure “ls -ltr” is run after “ls -h” is suc

help me (2 Replies)
Discussion started by: sonu pandey
2 Replies

3. Shell Programming and Scripting

Ls -ltr in scripting

Hi All, I wrote below script for i in `ls` do echo "list of files $i" done but i want display as like ls -ltr,it's displaying as one column Thanks (14 Replies)
Discussion started by: bmk
14 Replies

4. UNIX for Dummies Questions & Answers

at -l doesnt give details of the scheduled job. How to get the details?

I have scheduled couple of shell scripts to run using 'at' command. The o/p of at -l is: $ at -l 1320904800.a Thu Nov 10 01:00:00 2011 1320894000.a Wed Nov 9 22:00:00 2011 1320876000.a Wed Nov 9 17:00:00 2011 $ uname -a SunOS dc2prcrptetl2 5.9 Generic_122300-54 sun4u sparc... (2 Replies)
Discussion started by: superparticle
2 Replies

5. UNIX for Dummies Questions & Answers

Not able to run ls -ltr

Hi , Whenever i try to execute ls with l as an option the system hangs. The workload on server is not more than 1. What could be the reason . Normal ls works fine but ls -l causes the system to hang. This is happening when i m in /usr/local/sbin directory. I can see that the... (4 Replies)
Discussion started by: pinga123
4 Replies

6. UNIX for Dummies Questions & Answers

ls -ltr for a future date/time stamp file

Hi When i do ls -ltr <file1> then it shows me the date and time of the file if - for whatever reason file has future date/time stamp then ls -ltr is not showing the time, it just shows only date part ... even if time is ahead by 2 hr than current time. suppose a file was copied from INDIA... (3 Replies)
Discussion started by: reldb
3 Replies

7. Shell Programming and Scripting

How to parse the listing (ls -ltr)

Hi, I need to parse the listing (ls -ltr) in a given directory and get a particular value to see the success or failure. e.g drwxr-xr-x 5 sensr vpnuser 512 Nov 7 07:46 disc_001811. Here i need to take the value 5 which is after drwxr-xr-x . how to so the same in shell... (1 Reply)
Discussion started by: MuthuAlagappan
1 Replies

8. Shell Programming and Scripting

Printing Year in ls -ltr command

Hi, When retrieving parameters of a file using ls command i need to print the year part . When i do ls -ltr the following output is displayed -rwxrwxrwx 1 d_infd d_infd 1711 Jan 8 2004 wf1.class. Here the year part is not displayed only Jan 8 is displayed. Can any one... (9 Replies)
Discussion started by: ragugct
9 Replies

9. Shell Programming and Scripting

ls -ltr help

i have to list some file with certain exemption suppose for example i have two files file1.log.1 file1.log.1.123 i want ls -ltr command to list only 1st type of files so i want like this ls -ltr *.log.*---------it should grep 1st kind of files but this command greps all the files... (4 Replies)
Discussion started by: ali560045
4 Replies

10. UNIX for Dummies Questions & Answers

what does the ls -ltr command list

Hi, THe following is the output when i run the command ls -ltr can anyone explain the meaning of the field in red -rw-r----- 3 orca orca 20924 Sep 08 19:21 BTL027SASI.gnt -rw-r----- 3 orca orca 20924 Sep 08 19:21 BTL027RITD.gnt -rw-r----- 3 orca orca ... (2 Replies)
Discussion started by: ranjita.c
2 Replies
Login or Register to Ask a Question