Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to list older files

Status
Not open for further replies.

sam93

Programmer
Jul 19, 2002
65
CA
Hi,

How can I list contents of a directory that haven’t been accessed in the last 30 days?

Thanks.
 
man find" and look at "-atime", but be careful, atime is hard to rely on and is particularly platform dependent.
 
Thanks. However, I have to display these files in the directory as long listing (probably using ls -l). How can I do that?
 
As Eric has suggested, but add -exec ls -la {} \; to it. Alternatively, add | xargs ls -la {} instead.
 
Thanks guys. That was really quick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top