How to find the date for all the files in a directory
AIXThis forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to find the date for all the files in a directory
Hi all,
I know the command 'ls' will give the list of files existing in a directory.but i want to know which option will give the complete date(2006-02-08) and time(15:06).
Thanks for ur help.I know ls,man ls ,ls -al,ls -l etc.
But my question is for AIX. Can u plz try on ur AIX machine and let me know if it(ls -al,ls -l etc.) works.
I need complete date(2006-02-08) and time(15:06)of all the files in a directory.
-l (Lower case L) Displays the mode, number of links, owner, group, size (in bytes), and time of last modification for each file. If the file is a special file, the size field contains the major and minor device numbers. >>>>> If the time of last modification is greater than six months ago, the time field is shown in the format month date year where as files modified within six months the time field is shown as month date time format <<<<<
So, use istat or write a script that uses "perl->stat()" function
Distribution: Redhat FC4, Fedora 8 and AIX 5.3, AIX 6.1
Posts: 39
Rep:
To find the complete time.
Hello Uday123,
what you will need to do is use the istat command on aix and it will give you the info over the file about access time mod time a nd creation time. You will have to write a script to make istat run on all of the files.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.