rm -rf 提示Directory not empty

在linux系统中,我们有时候删除文件夹的时候,提示rm: cannot remove `dir-name’: Directory not empty,或者文件夹非空,即使使用sudo也无法删除,那是因为系统存在使用或者执行文件夹中可执行程序,我们只需要执行命令:

lsof dir-name/.fuse_hidden000bd8c100000*

找到那些程序在使用文件夹中的文件,

然后使用

kill 命令结束进程,如:kill 2739

然后就可以删除文件夹了。

猜你喜欢

转载自blog.csdn.net/u014001964/article/details/82291064