• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 206
  • 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?
  • 2
2 Solutions
find . -type f -name "license.txt" -exec rm -i {} \;
rm -i
prompt you for confirmation of deletion.
you can use "rm -f" without prompt.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

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