Showing Last Updated Time


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Showing Last Updated Time
# 1  
Old 08-17-2006
Question Showing Last Updated Time

Hi,

I've got a question. How do I show the last updated time?

Whenever I do any of the following:
ls -l
ls -lu
ls -lt
I get the creation time.

I need the modification/last update time. I'm FTP'ing a file to a different server. I'd like to know when the FTP is completed.
# 2  
Old 08-17-2006
Check your man pages for the modified time:

Code:
     -c       Uses time of last modification of the i-node  (file
              created,  mode  changed,  and so forth) for sorting
              (-t) or printing (-l or -n).

ls -lc should probably work; If I recall correctly though, there may be different variations of 'ls' depending on your distribution.

- John
# 3  
Old 08-17-2006
Quote:
ls -l
ls -lu
ls -lt
I get the creation time.
creation time of a file cannot be displayed, as it is not stored anywhere.

Only the modified time and access time can be displayed

modification time with -l option
access time with -u option (with -l option)
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Time field showing Zero in ps command output

F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME COMD 401 S catmgr 5748 5742 0 154 20 e0000006d48cd080 133 e0000003fb6e7200 11:22:32 ? 0:00 /opt/ssh/libexec/sftp-server 3401 R catmgr 5742 5631 0 152 20 e0000005f974fa00 750 ... (4 Replies)
Discussion started by: TomG
4 Replies

2. Shell Programming and Scripting

Log File updated time

hi can any one please help on below .im new to shell scrpting i need to write a shell script which will check particular log file is presented or not in specific location ,if yes how long it was not modified/not rolling ?if its not modified/log is not rolling script will have to send mail (9 Replies)
Discussion started by: 4Learning
9 Replies

3. UNIX for Advanced & Expert Users

AIX idea needed to check the logs updated date and time

Hi with the help of Gabriel canepa, i have just edited filename only in his code. The help which i got and he helped is 1) I have around 22 logs and each log should be updated in the last 24 hours from the current timestamp. 2) It should check for ERROR message (not error,Error) in the log and... (2 Replies)
Discussion started by: Kalaihari
2 Replies

4. Shell Programming and Scripting

Log search and mail it if the log is updated before 24 hours from the current time

Hi , We have around 22 logs , each has different entries. I have to automate this using shell script. The ideas which am sharing is given below 1) We use only TAIL -100 <location and name of the log> Command to check the logs. 2) We want to check whether the log was updated before 24... (13 Replies)
Discussion started by: Kalaihari
13 Replies

5. Shell Programming and Scripting

How to find last updated date and time of a folder in Perl?

Hi All, I have a process which after some time continues move a files to some folder(say the name of the folder is logdir) What i am trying to do is as the files are coming to the logdir folder, I want the latest updated time and date of the folder in PERL. (1 Reply)
Discussion started by: parthmittal2007
1 Replies

6. Shell Programming and Scripting

Old time stamp being updated for new files

Hello Friends I am facing a weird problem :confused:, we receive thousands of files in my system on a daily basis, access time stamp on some of the files are being updated as old time stamp like 1968-01-19, Could some one help me what could be causing this? so that i can narrow down the problem... (4 Replies)
Discussion started by: Prateek007
4 Replies

7. Shell Programming and Scripting

Shell Script not showing accurate Time Stamp and Size

Hey guys - I have made this script and for some reason, I dont see time stamp as "Month-Day-YYYY Hours-Mins" - all i see is Month and Day. Also, my file size is approximated. For example, if the size is 19,606KB - the script shows as 20M. Is there a way to see the exact file size? How do i... (2 Replies)
Discussion started by: DallasT
2 Replies

8. Shell Programming and Scripting

ps showing inconsistent process start time

Not sure if it makes a difference but "foo" is a java process. The start time reported by various flavors of ps seems to be flopping back and forth by a minute. I have many (a few hundred) "foo" like processes which tend to be somewhat unstable and get restarted somewhat frequently, I wrote a... (2 Replies)
Discussion started by: jstrangfeld
2 Replies

9. Linux

Process start time not showing correct time

Process start time is not showing the correct time: I had started a process on Jun 17th at 23:30:00. Next day morning when I run the command "ps -ef | grep mq", the process is showing the start date of Jun 17th but the start time is 00:16:41 Day/Date is setup correctly on the server. It... (2 Replies)
Discussion started by: hemangjani
2 Replies

10. UNIX for Advanced & Expert Users

Diff b/w modification & updated time

Hi All, What is the difference b/w last modification time and last updated time. Thanks Sweta (1 Reply)
Discussion started by: sweta
1 Replies
Login or Register to Ask a Question