我想知道什么的输出lsattrmeans.It打印这样奇怪如下,当我曾尝试:lsattr /usr。
$ lsattr /usr
-----------------e- /usr/local
-----------------e- /usr/src
-----------------e- /usr/games
--------------I--e- /usr/include
--------------I--e- /usr/share
--------------I--e- /usr/lib
-----------------e- /usr/lib32
--------------I--e- /usr/bin
--------------I--e- /usr/sbin
Run Code Online (Sandbox Code Playgroud)
我已经阅读了chattr和的手册页,lsattr但仍然不知道。
slm*_*slm 17
手册页chattr包含了解lsattr输出所需的所有信息。
摘抄
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).
Run Code Online (Sandbox Code Playgroud)
如果您在同一手册页中进一步查看标签的描述:
The 'e' attribute indicates that the file is using extents for mapping
the blocks on disk. It may not be removed using chattr(1).
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).
Run Code Online (Sandbox Code Playgroud)
har*_*kat 11
chattr
'e' 属性的手册页表明该文件正在使用范围来映射磁盘上的块。使用chattr.
盘区是计算机文件系统中为文件保留的连续存储区域。当进程创建文件时,文件系统管理软件会分配整个范围。当再次写入文件时,可能在执行其他写入操作后,数据会从前一次写入停止的地方继续。这减少或消除了文件碎片和可能的文件分散。
基于盘区的文件系统(即,通过盘区而不是单个块来寻址存储的系统)不需要将每个文件限制为单个、连续的盘区。
以下系统支持范围:
ASM - Automatic Storage Management - Oracle's database-oriented filesystem.
BFS - BeOS, Zeta and Haiku operating systems.
Btrfs - GPL'd extent based file storage (16PiB/264 max file size).
Ext4 - Linux filesystem (when the configuration enables extents — the default in Linux since version 2.6.23).
Files-11 - Digital Equipment Corporation (subsequently Hewlett-Packard) OpenVMS filesystem.
HFS and HFS Plus - Hierarchical File System - Apple Macintosh filesystems.
HPFS - High Performance File Syzstem - OS/2 and eComStation.
JFS - Journaled File System - Used by AIX, OS/2/eComStation and Linux operating systems.
Microsoft SQL Server - Versions 2000-2008 supports extents of up to 64KB [1].
Multi-Programming Executive - Filesystem by Hewlett-Packard.
NTFS - Microsoft's latest-generation file system [1]
Reiser4 - Linux filesystem (in "extents" mode).
SINTRAN III - File system used by early computer company Norsk Data.
UDF - Universal Disk Format - Standard for optical media.
VERITAS File System - Enabled via the pre-allocation API and CLI.
XFS - SGI's second generation file system.[2]
Run Code Online (Sandbox Code Playgroud)
来自维基百科
chattrlsattrLinux 上的实用程序和实用程序及其操作的属性特定于第二扩展文件系统系列(ext2、ext3),并且作为e2fsprogs包的一部分提供。它们不适用于驻留在其他文件系统(例如 ReiserFS、FAT)上的文件。
(j)数据日志
(t)没有尾部合并
(e)使用扩展来映射磁盘上的块
通常在extents文件系统中,常规文件和目录文件存储为extents序列,磁盘上的连续块序列。文件的目录条目跟踪文件的范围。如果文件系统需要多个盘区来保存一个文件,它会使用一个盘区块链表来存储有关盘区的信息。