Linux Delete all PHP files in a folder recursively

This is handy when your WordPress instance has been hacked. A typical hack includes uploading random PHP files in your site's wp-content/uploads folder.

Use this command inside the wp-content/uploads folder to remove all PHP files within.
find . -name "*.php" -type f -delete
Posted by
Snippet Viewed 6223 times.

Share your Linux code snippets:

  • Get some recognition & a link back to your site.
  • Create your own code library.
  • Help your fellow developers, as they have helped you.


Submit | Browse

Most Recent linux snippets

Most Viewed