Home / Hosting Cron Jobs / Find files based on file extension (file type), and delete them from nominated directory

Find files based on file extension (file type), and delete them from nominated directory

find public_html/tangaloomavillanet/wp-content/uploads -name ‘*.php‘ -type f -delete

This command will delete all files in the public_html/tangaloomavillanet/wp-content/uploads directory that end in .php and delete them.

Top