• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 201
  • Last Modified:

How do I remove all instances of a file from all directories.

Using bash how do I find all instances of license.txt in the tree structure rooted at the current directory and remove it?
0
monica73174
Asked:
monica73174
  • 2
2 Solutions
 
wesly_chenCommented:
find . -type f -name "license.txt" -exec rm -i {} \;
0
 
wesly_chenCommented:
rm -i
prompt you for confirmation of deletion.
you can use "rm -f" without prompt.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now