?
Solved

Recursively deleting a specified directory

Posted on 2002-04-30
5
Medium Priority
?
250 Views
Last Modified: 2012-05-04
I have a big tree directory structure, each directory having a cvs directory inside it (except for the cvs directory itself).  I want to recursively delete just the CVS directories but leave all the others intact.  I know that I will need to use something like grep, find, rm, -R, but I can't seem to get it right.  Any ideas?  Thanks!!!!!

0
Comment
Question by:alpine
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 

Accepted Solution

by:
rmkandan earned 400 total points
ID: 6980539
Hi alpine,

Try using the following command to delete files

find . -name "/cvs/*.*" -print | xarg rm -r | more

bye
Mani.r.
0
 

Author Comment

by:alpine
ID: 6981278
Thank you!  Not exactly correct but your help definitely brought me to the solution:

find . -name CVS -print | xargs rm -r | more

Thank you again.  You saved me a lot of time!!!!
0
 

Author Comment

by:alpine
ID: 6981282
Thank you!  Not exactly correct but your help definitely brought me to the solution:

find . -name CVS -print | xargs rm -r | more

Thank you again.  You saved me a lot of time!!!!
0
 
LVL 21

Expert Comment

by:tfewster
ID: 7621404
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
- Answered by rmkandan

Please leave any comments here before 13/1/2003

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

tfewster (I don't work here, I'm just an Expert :-)
0
 

Expert Comment

by:SpideyMod
ID: 7805286
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

777 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