find command delete files older than x days

Find command delete specific files older than 7 days in linux
/usr/bin/find /var/www/html/uploads -name "*.pdf" -type f -mtime +7 -exec rm {} \;


Find command delete all file of specific directory older than 7 days
 /usr/bin/find /var/www/html/uploads -type f -mtime +7 -exec rm {} \;

Share on Google Plus

About Md. Shahzad Alam

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

0 comments:

Post a Comment