Operating System - HP-UX
1758318 Members
2404 Online
108868 Solutions
New Discussion юеВ

List files based on time stamp

 
la_cool
Occasional Advisor

List files based on time stamp

I have few files ,with different dates

I want to break and list the files based on date and timestamp, and spool to a file.

Please let me know ...
3 REPLIES 3
Pete Randall
Outstanding Contributor

Re: List files based on time stamp

Do you mean something like "ls -t > filename"?


Pete

Pete
Abdul Rahiman
Esteemed Contributor

Re: List files based on time stamp

You could also use the fid command to get a list of files older than "n" number of days by using the find command.

# find . -mtime +n -print > foo.txt (where n = o. of days)

or for detaild list,

# find . -mtime +n -exec ls -ltr {} \; >> foo.lst
No unix, no fun
Marvin Strong
Honored Contributor

Re: List files based on time stamp

ll -t or ll -tr depending on which order you want.

man ll or ls for details.