Simple rm commands in my server

Hi all,

I have PLESK to manage my virtual dedicated server. The most recent version left a favicon.ico file in all my domains and subdomains. I want to delete them without having to go into each individual folder.

So I'd like to remove favicon.ico from every subfolder of /var/www/vhosts/

I assume I can use the rm command somehow. But it's not something I can work out through trial and error. Deleting everything off my server would not be good.

Can someone help me please?

Thanks,
Travis

use "trial and error" but instead of rm use echo to display the results.... after everything works like you want it change echo to rm...

To find them:

find /var/www/vhosts -type f -name favicon.ico

To remove them:

find /var/www/vhosts -type f -name favicon.ico -exec rn {} \;

Can you please explain the steps in this?

I thought "rn" renames the file. Are you sure it's not "rm"?

Thanks
Travis

It should be rm to remove files. To rename a file, you use the mv (move) command.