Unix Tip: How To Remove Log Files Older Than 10 Days

Tagged: 

  • This topic is empty.
Viewing 0 reply threads
  • Author
    Posts
    • #1897
      Saurabh Sood
      Member

      Use the below given command to remove logfiles older than 10 days:

      cd to the directory where the files are located:

      $ cd /u01/app/oracle/admin/orcl/bdump

      $ find . -name “*.log” -mtime +10 -exec rm -f {} ;

      OR

      $ find /u01/app/oracle/admin/orcl/bdump/ -name “*.log” -mtime +10 -exec rm -f {} ;

Viewing 0 reply threads
  • You must be logged in to reply to this topic.