标题:[实践OK]rm -rf 提示Directory not empty 出处:向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除 时间:Fri, 15 Feb 2019 14:50:46 +0000 作者:jackxiang 地址:http://jackxiang.com/post/10087/ 内容: 问题:rm -rf /data/www/* rm: cannot remove ‘/data/www/yum.boosh.com.cn/centos/5/x86_64/rsyslog_v8/RPMS’: Directory not empty 办法: 在linux系统中,我们有时候删除文件夹的时候,提示rm: cannot remove `dir-name’: Directory not empty,或者文件夹非空,即使使用sudo也无法删除,那是因为系统存在使用或者执行文件夹中可执行程序,我们只需要执行命令: lsof dir-name/.fuse_hidden000bd8c100000* which lsof /usr/sbin/lsof rpm -qf /usr/sbin/lsof lsof-4.82-5.el6.x86_64 找到那些程序在使用文件夹中的文件, 然后使用 kill 命令结束进程,如:kill 2739 然后就可以删除文件夹了。 From:https://blog.csdn.net/u014001964/article/details/82291064 Generated by Jackxiang's Bo-blog 2.1.1 Release