find . -name "*.php" -type f -delete
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.
Use this command inside the wp-content/uploads folder to remove all PHP files within.
Snippet Viewed 8287 times.
Share your Linux code snippets:
- Get some recognition & link back to your site.
Related Articles