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

Home Forums DBA – Wiki Unix Tip: How To Remove Log Files Older Than 10 Days

Tagged: 

This topic contains 0 replies, has 0 voices, and was last updated by  Saurabh Sood 7 years, 9 months ago.

  • 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 {} ;

You must be logged in to reply to this topic.