Computing.Net > Forums > Unix > Find Year Date and Time of File

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Find Year Date and Time of File

Reply to Message Icon

Name: ahteck
Date: June 25, 2003 at 03:00:47 Pacific
OS: AIX UNIX
CPU/Ram: 512
Comment:

Hi,

I need to find all *.model file and display the time in MMddhhmmyy.

I used the find . –name “*.model” –ls to search but the file before year 2003 only displayed with date and year and no time (ie hhmm). Where is the time (hr and min.) for all file before 2003?


The file like like this;

Jul 29 2002 /tmp/Template/DRAFTINGTEMPLATE.model
Jul 29 2002 /tmp/Template/draftingtemplate.model
May 9 14:18 /tmp/piston.model
Jun 10 17:25 /tmp/sam/DRAFTINGTEMPLATE.model
Jun 10 17:24 /tmp/DRAFTINGTEMPLATE.model
Jun 11 10:58 /tmp/test1.model

Please help?

ahteck



Sponsored Link
Ads by Google

Response Number 1
Name: WilliamRobertson
Date: June 25, 2003 at 04:12:52 Pacific
Reply:

I can't see it in the man pages right now but I'm sure I read somewhere that hour/minute/second is displayed instead of the year for files newer than six months old. Today's date being 25th June, you would therefore not see the year displayed for any files newer than 25th December 2002.

Try:

find . -name "*.model" -exec ls -lT {} \;


0
Reply to Message Icon

Related Posts

See More


how to create a beep tone... Append to last line of fi...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Find Year Date and Time of File

adjusting date and time BSDI BSD/OS 4.2 www.computing.net/answers/unix/adjusting-date-and-time-bsdi-bsdos-42/3412.html

Timestamps of Files ??? www.computing.net/answers/unix/timestamps-of-files-/3573.html

date and userid www.computing.net/answers/unix/date-and-userid/6793.html