DBA - Wiki

AskDBA.org Forum » DBA - Wiki

Unix Tip: How To Remove Log Files Older Than 10 Days (1 post)

About This Topic

Tags

  1. Saurabh Sood

    admin
    Joined: Jun '08
    Posts: 46

    offline

    Posted 2 years ago
    #

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

    Saurabh Sood
    Senior Consultant:DBA Services

Reply

You must log in to post.

AskDBA.org Forum » DBA - Wiki
251 posts in 104 topics over 45 months by 63 of 109 members. Latest: KNHarri, xiaoling, Williams29