Find and Remove a File or Folder in SSH

Need to find and remove a particular file and/or folder and know the name, but not the location?

Use the following command to find and remove it!:

find . -name "error_log" -exec rm -rf {} \;

 

The above will search the current folder and subfolders for the file named "error_log" and delete every one it finds.

You can substitute "error_log" with any file or folder name you want!