關於檔案隱藏屬性 lsattr [論壇 - Ubuntu基本設定]


正在瀏覽:   1 名遊客


 到底部   前一個主題   下一個主題  [無發表權] 請登錄或者註冊



關於檔案隱藏屬性 lsattr
會員二級
註冊日期:
2011/1/27 15:53
所屬群組:
已註冊使用者
等級: 6
HP : 0 / 145
MP : 21 / 3211
EXP: 82
離線
在家/home打了顯示檔案隱藏屬性lsattr, 居然發現了大寫的I(通常是小寫的i,有這個參數)
請問這是什麼意思如下?

root@ubuntu-1204LTS:/# lsattr /home
-------------e- /home/apayuser
-------------e- /home/impuser
-------------e- /home/radio893memo
-------------e- /home/radioadvertisement
-------------e- /home/movie
-------------e- /home/fei
-------------e- /home/radioguestprogram
-------------e- /home/radiocommodity
-------------e- /home/radioengineer
-------------e- /home/engineer
-------------e- /home/ttdttd123
-------------e- /home/hard
----i--------e- /home/lin
----------I--e- /home/goothby
-------------e- /home/yuchun

2015/6/4 22:37
應用擴展 工具箱
回覆: 關於檔案隱藏屬性 lsattr
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 33
HP : 164 / 822
MP : 533 / 15168
EXP: 90
離線
查詢 manual

* man lsattr
* man chattr

可以看到


The letters `acdeijstuACDST' select the new attributes for the files:
append only (a), compressed (c), no dump (d), extent format (e),
immutable (i), data journalling (j), secure deletion (s), no tail-
merging (t), undeletable (u), no atime updates (A), no copy on write
(C), synchronous directory updates (D), synchronous updates (S), and
top of directory hierarchy (T).

The following attributes are read-only, and may be listed by lsattr(1)
but not modified by chattr: huge file (h), compression error (E),
indexed directory (I), compression raw access (X), and compressed dirty
file (Z).





The 'I' attribute is used by the htree code to indicate that a
directory is being indexed using hashed trees. It may not be set or
reset using chattr(1), although it can be displayed by lsattr(1).





A file with the `i' attribute cannot be modified: it cannot be deleted
or renamed, no link can be created to this file and no data can be
written to the file. Only the superuser or a process possessing the
CAP_LINUX_IMMUTABLE capability can set or clear this attribute.




2015/6/4 22:51
應用擴展 工具箱


 [無發表權] 請登錄或者註冊


可以查看帖子.
不可發帖.
不可回覆.
不可編輯自己的帖子.
不可刪除自己的帖子.
不可發起投票調查.
不可在投票調查中投票.
不可上傳附件.
不可不經審核直接發帖.