700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > linux下文件损坏怎么删除 No such file or directory

linux下文件损坏怎么删除 No such file or directory

时间:2022-02-17 05:52:28

相关推荐

linux下文件损坏怎么删除 No such file or directory

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

尝试命令行删除

[root@paly home]#ls0.97 datafire1 iso nfs Python-3.6.0testtom tom2 vmlinuzbincopy.sh download initrd.img mysql pub Python-3.6.0.tgz test.py tom1 ton[root@paly home]#cd test[root@paly test]#lspublic#这里publilc是问题文件[root@paly test]#ls -lahtotal 4.0Kdrwxr-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 atouch: 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 tomkdir: cannot create directory `to': Permission denied[root@paly test]#ls -lahtotal 4.0Kdrwxr-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 publicpublic: directory

[root@paly test]#getfacl public/getfacl: public/: No such file or directory

[root@paly test]#userdel -r testuserdel: 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 -ThFilesystem Type Size Used Avail Use% Mounted on/dev/mapper/vg_ton-lv_rootext4 19G 8.8G 8.4G 52% /tmpfstmpfs 249M0 249M 0% /dev/shm/dev/sda1 ext4 477M 54M 398M 12% /boot

fsck 磁盘修复

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

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。