解决方法:
-
确认哪个进程正在使用该目录。可以使用
lsof
或fuser
命令来查找。[root@Centos-7 test]# lsof +d tmp lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1203/gvfs Output information may be incomplete. lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1197/gvfs Output information may be incomplete. lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /home/youngyoung/.gvfs Output information may be incomplete. lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /home/youngyoung/.gvfs Output information may be incomplete. lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /home/youngyoung/.gvfs ... COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME sftp-serv 632 10305457 9r REG 0,45 5629 14008671248 tmp/.nfs0000000342fb5c10000ef83f sftp-serv 632 10305457 11r REG 0,45 5629 14008671248 tmp/.nfs0000000342fb5c10000ef83f
[root@A23180685 test]# kill -9 632 [root@A23180685 test]# [root@A23180685 test]# rm -rf tmp [root@A23180685 test]#
问题二:终端显示异常,输入命令不显示,显示格式错乱:
-
stty echo #显示输入回显
-
reset #重置终端,清除终端的屏幕,并将终端的设置恢复到默认值。它会重置终端的字符编码、颜色设置、光标位置等,以确保终端能够正常显示文本和光标。