root下rm -rf仍不可行,rm: cannot remove `public/’: Is a directory

尝试命令行删除

[root@paly home]#ls
0.97        data      fire1       iso    nfs  Python-3.6.0      test     tom   tom2  vmlinuz
bincopy.sh  download  initrd.img  mysql  pub  Python-3.6.0.tgz  test.py  tom1  ton
[root@paly home]#cd test
[root@paly test]#ls
public									#这里publilc是问题文件
[root@paly test]#ls -lah
total 4.0K
drwxr-xr-x   3 root root    0 Mar 24 21:31 .
drwxr-xr-x. 15 root root 4.0K Mar 16 18:26 ..
dr-xr-xr-x   2 root root    0 Mar 24 21:31 public
[root@paly test]#rm -rf public/
rm: cannot remove `public/': Is a directory
[root@paly test]#rm -v -fr public/
rm: cannot remove `public/': Is a directory

[root@paly test]#cd public/
-bash: cd: public/: No such file or directory
[root@paly test]#pwd
/home/test
[root@paly test]#touch a
touch: cannot touch `a': Permission denied
[root@paly test]#pwd
/home/test
[root@paly test]#cd public/
-bash: cd: public/: No such file or directory
[root@paly test]#mkdir to
mkdir: cannot create directory `to': Permission denied
[root@paly test]#ls -lah
total 4.0K
drwxr-xr-x   3 root root    0 Mar 25 00:35 .					#这里最终发现是由某个脚本或者软件自动生成的
drwxr-xr-x. 15 root root 4.0K Mar 25 00:35 ..
dr-xr-xr-x   2 root root    0 Mar 25 00:35 public
[root@paly home]#chmod -R u+w test  
chmod: cannot read directory `test/public': No such file or directory
[root@paly test]#file public/
public/: cannot open `public/' (No such file or directory)
[root@paly test]#file public
public: directory
[root@paly test]#getfacl public/
getfacl: public/: No such file or directory
[root@paly test]#userdel -r test
userdel: user 'test' does not exist
[root@paly home]#cp -r test ./fire1/
cp: cannot access `test/public': No such file or directory
[root@paly test]#ls -ld .
drwxr-xr-x 3 root root 0 Mar 24 21:31 .
[root@paly test]#ls -ld public/
ls: cannot access public/: No such file or directory

进入单用户模式操作

在这里插入图片描述
mount -o remount,rw /

[root@paly test]#df -Th
Filesystem           Type   Size  Used Avail Use% Mounted on
/dev/mapper/vg_ton-lv_root
                     ext4    19G  8.8G  8.4G  52% /
tmpfs                tmpfs  249M     0  249M   0% /dev/shm
/dev/sda1            ext4   477M   54M  398M  12% /boot

fsck 磁盘修复

有待研究 系统盘的fsck修复方法


版权声明:本文为pop541111原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/pop541111/article/details/123723208