码迷,mamicode.com
首页 > 系统相关 > 详细

Linux 用 root 用户都无法删除的文件如何删除

时间:2018-09-04 13:43:07      阅读:196      评论:0      收藏:0      [点我收藏+]

标签:class   隐藏   root   nbsp   ber   attr   linux   --   文件   

要查看隐藏文件用

ls -a

看文件有没有被锁定(i属性)

  1. [root@linux ~]# lsattr YourFile
  2. ---i---------- YourFile

去除i属性再删除

[root@linux ~]# chattr -i YourFile
[root@linux ~]# lsattr YourFile
[root@linux ~]# rm -f YourFile

 

Linux 用 root 用户都无法删除的文件如何删除

标签:class   隐藏   root   nbsp   ber   attr   linux   --   文件   

原文地址:https://www.cnblogs.com/gavinyyb/p/9583382.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!