Logo Background

Unix Find File With Modified Time

  • By on August 22, 2008 | No Comments

    Sometimes it is hard to delete a bunch of old file when you have to perform ls -lrt and perform the rm one by one. The command as below will help you to perform the old file removal automatically, where I am finding whatever file with extension .t that is modified more than 10 days before.

    Find Modified Time Unix Files

    UNIX> find /u03/oraprod/prodcomn/temp -name "*.t" -mtime +10 -exec rm -f {} \;

    /u03/oraprod/prodcomn/temp – is the working directory that I want to housekeep the file

    Remember, place a backup of all the files before you proceed to remove it

    Previous
    Next
    » Oracle DB Monitoring Script
Leave a Comment