Solved

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

Posted on 2007-03-24
2
186 Views
Last Modified: 2010-04-20
Using bash how do I find all instances of license.txt in the tree structure rooted at the current directory and remove it?
0
Comment
Question by:monica73174
  • 2
2 Comments
 
LVL 38

Accepted Solution

by:
wesly_chen earned 500 total points
ID: 18787037
find . -type f -name "license.txt" -exec rm -i {} \;
0
 
LVL 38

Assisted Solution

by:wesly_chen
wesly_chen earned 500 total points
ID: 18787041
rm -i
prompt you for confirmation of deletion.
you can use "rm -f" without prompt.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now