1. Home
  2. Knowledge Base
  3. Unix
  4. List and remove all files older than 30 days

List and remove all files older than 30 days

 

 

find /u01/local/logs -mtime +30 -exec ls -l {} \;

find /u01/local/logs -mtime +30 -exec rm {} \;

 

The following two tabs change content below.

Arjun Raja

Latest posts by Arjun Raja (see all)

Updated on June 2, 2021

Was this article helpful?

Related Articles

Leave a Comment