当前位置: 动力学知识库 > 问答 > 编程问答 >

unix - how to cleanly remove directories in my $home directory

问题描述:

I pulled in a RCS repository and it has a lot of crud in it - I would like to remove any directory which has no files in it..

also I want to remove all RCS directories..

thanks

网友答案:

have you try

cd "parent directory"
find . -type d -exec rmdir {}\;

you can also do

find . -exec rmdir {}\; 

rmdir will fail if there are file in a directory..

also - you can for RCS do

find . -name RCS -exec rm -rf {}\;
分享给朋友:
您可能感兴趣的文章:
随机阅读: