Delete files older than 10 days using shell command Rumi, October 28, 2023 find is the common tool for this kind of task : find ./my_dir -mtime +10 -type f -delete EXPLANATIONS ./my_dir your directory (replace with your own) -mtime +10 older than 10 days -type f only files -delete no surprise. Remove it to test your find filter before executing the whole command Src: https://stackoverflow.com/questions/13489398/delete-files-older-than-10-days-using-shell-script-in-unix Administrations Collected Articles Configurations (Linux) Scripts find