1833878 Members
1822 Online
110063 Solutions
New Discussion

Re: ls query

 
Steve Buchan_1
Advisor

ls query

Is it possible to have ls display the creation time on a file that is older than 6 months? if so, what is the switch?

hpux 11.00
4 REPLIES 4
RAC_1
Honored Contributor

Re: ls query

Not possible with ls.

find . -type f -ctime +180

Will display files greater than 180 days old.

Anil
There is no substitute to HARDWORK
Steve Buchan_1
Advisor

Re: ls query

I can find the files no problem, I just need to know the creation time....
Patrick Wallek
Honored Contributor

Re: ls query

ls will display anything older than 6 months only with the Month Day and year.

If you want the time you may have to look at gnu ls which is part of the coreutils bundle.

http://hpux.connect.org.uk/hppd/hpux/Gnu/coreutils-5.2.1/

RAC_1
Honored Contributor

Re: ls query

On unix, there are three times associated with a file/dir

atime -- access time (ll -u)
ctime -- Change time (ll -c)
If a file has not been updated since it was created ctime can be taken as creation time. but if it has been changed since then, there is no way to tell when the file was created)
mtime - modification time (ll -m)

Anil
There is no substitute to HARDWORK