Tag Archives: linux无法删除文件

Linux下无法删除文件的解决办法之一

删除文件的时候,发现有个文件一直删除不掉。切换到root更改文件属性时,提示 Operation not permittedGoogle了一下,发现原来是文件属性里有-i这个标志# lsattr—-i————- ./config$man chattr…A file with the `i' attribute cannot be modified: it cannot be deleted or renamed, no link can becreated to this file and no data can be written to the file. Only the superuser or a process pos-sessing the CAP_LINUX_IMMUTABLE capability can set or clear this attribute.去掉-i的属性只需用chattr -i 就可以了。# [...]

Canonical URL by SEO No Duplicate WordPress Plugin