Solved

Recursively deleting a specified directory

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Searching File Names and Eliminating Duplicates in Linux 4 84
How to clone solaris 10 machine 33 170
Linux hostname change 2 88
centos commands 6 90
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.

756 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