Solved

Recursively deleting a specified directory

Posted on 2002-04-30
5
237 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
5 Comments
 

Accepted Solution

by:
rmkandan earned 100 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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 20

Expert Comment

by:tfewster
Comment Utility
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
Comment Utility
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
error while running the scirpt 24 114
sudo logging 5 64
ftpcommand 2 50
bash while loop reading input from data section in script 7 30
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…
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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.

771 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

11 Experts available now in Live!

Get 1:1 Help Now