UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 6th, 2006, 04:12 PM
dshea0001 dshea0001 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2006
Posts: 4 dshea0001 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 25 m 51 sec
Reputation Power: 0
Question File date

I need to be able to view a file date and year of when it was last modified. How do can i do that?

Reply With Quote
  #2  
Old April 6th, 2006, 05:30 PM
playskool playskool is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 48 playskool Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 23 h 5 m 35 sec
Reputation Power: 0
ls -l <filename>

There is system auditing but I've never used it...don't know what's all involved. Might be a worth looking into

Reply With Quote
  #3  
Old April 7th, 2006, 04:49 AM
SimonJM SimonJM is offline
Contributing User
Dev Shed Novice (500 - 999 posts) Click here for more information
 
Join Date: Mar 2006
Posts: 727 SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 3 h 40 m 36 sec
Reputation Power: 315
From a 'purist' point of view - if all you want is last modified date/time then:

Code:
ls -log filename


is more efficient (especially is filename contains any wildcards).

Be aware, on the more practical side that if the file has been modified in past 12 months you will get day and hour/min of change (i.e., no year), if it was last modified before that you will get year month and day (in the same number of fields).

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > File date


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway