![](https://img2020.cnblogs.com/blog/2373763/202111/2373763-20211103183117530-38056124.png)
![](https://img2020.cnblogs.com/blog/2373763/202111/2373763-20211103183123300-379294142.png)
![](https://img2020.cnblogs.com/blog/2373763/202111/2373763-20211103183129426-461864472.png)
![](https://img2020.cnblogs.com/blog/2373763/202111/2373763-20211103183134849-389679551.png)
![](https://img2020.cnblogs.com/blog/2373763/202111/2373763-20211103183144672-1880728280.png)
![](https://img2020.cnblogs.com/blog/2373763/202111/2373763-20211103183148516-1631071340.png)
![](https://img2020.cnblogs.com/blog/2373763/202111/2373763-20211103183158202-549957201.png)
![](https://img2020.cnblogs.com/blog/2373763/202111/2373763-20211103183202800-726883314.png)
![](https://img2020.cnblogs.com/blog/2373763/202111/2373763-20211103183208394-654771854.png)
使用find命令删除目录成功却仍提示错误
如需要删除所有的目录d,则使用以下命令能够成功删除且无错误提示:
find . -type d -name 'd' -prune -exec rm -rf {} \;
如只要删除某个指定目录下的目录d,如a/b下的目录d,则使用一下命令:
find a/b/ -maxdepth 1 -type d -name d -exec rm -rf {} \;
posted @
2021-11-03 18:33
Tester-**
阅读(
51)
评论()
编辑
收藏
举报