Vadivel Murugan M
Vadivel Murugan M

Reputation: 105

How to find and delete a particular file every directory using linux command

I'm using ubuntu 15.10. I have "backup_old.zip" file in more than 100 directories. How can I remove all "backup_old.zip" file in single linux shell command.

Upvotes: 0

Views: 64

Answers (2)

Vadivel Murugan M
Vadivel Murugan M

Reputation: 105

This shell command was worked for me.

$ find . -name backup_old.zip -type f -exec rm -r {} \;

Upvotes: 1

niyasc
niyasc

Reputation: 4490

You can use rm command to remove files.

rm -f */backup_old.zip

Upvotes: 0

Related Questions