001、
[liujiaxin02@PC1 ~]$ ls a.txt [liujiaxin02@PC1 ~]$ pwd /home/liujiaxin02 [liujiaxin02@PC1 ~]$ lsattr a.txt ## 查看文件特殊权限 ---------------- a.txt [liujiaxin02@PC1 ~]$ sudo chattr +i a.txt ## 给文件权限增加i [sudo] password for liujiaxin02: [liujiaxin02@PC1 ~]$ lsattr a.txt ## 查看 ----i----------- a.txt [liujiaxin02@PC1 ~]$ su - root ## 切换至root Password: Last login: Thu Feb 9 17:29:46 CST 2023 on pts/1 -bash: unalias: rm: not found -bash: unalias: mv: not found -bash: unalias: cp: not found [root@PC1 ~]# cd /home/liujiaxin02 [root@PC1 liujiaxin02]# pwd /home/liujiaxin02 [root@PC1 liujiaxin02]# lsattr a.txt ----i----------- a.txt [root@PC1 liujiaxin02]# rm a.txt ## 删除测试 rm: cannot remove ‘a.txt’: Operation not permitted
标签:删除,##,PC1,linux,home,liujiaxin02,txt,root From: https://www.cnblogs.com/liujiaxin2018/p/17106546.html