yecheng_110 发表于 2010-03-14 15:06:18

find如何只查找当前目录?

本帖最后由 yecheng_110 于 2010-03-14 15:13 编辑

不要到子目录中找
类似-maxdepth的功能

yecheng_110 发表于 2010-03-14 15:12:39

solaris 10

-level 好像也不支持

yecheng_110 发表于 2010-03-14 15:29:38

find .  ! -name "." -type d -prune -o -type l -exec rm -rf {} \;
:mrgreen:

saintdragon 发表于 2010-03-15 18:41:01

自己提问,自己解决,不错!

xianren 发表于 2010-03-15 19:32:35

自问自答!

sdccf 发表于 2010-03-15 22:47:20

自力更生,丰衣足食。:lol:
页: [1]
查看完整版本: find如何只查找当前目录?