Results 1 to 2 of 2
I need to frequently sweep out a bunch subdirectories. I usually just use rm -rf * (and yes I know how dangerous this can be ....) but now have a ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-23-2009 #1Just Joined!
- Join Date
- Nov 2009
- Posts
- 4
excluding some directories when using rm -rf *
I need to frequently sweep out a bunch subdirectories. I usually just use rm -rf * (and yes I know how dangerous this can be ....) but now have a two subdirectories I need to leave there while removing the rest. I've been looking, but cannot find out how to add an "exclude" to rm ... much like tar, for example, allows you to exclude directories with --exclude. Any ideas?
- 11-23-2009 #2Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,722


Reply With Quote
