📖 WIPIVERSE

🔍 Currently registered entries: 31,074건

chattr

chattr is a command-line utility found on many Linux and other Unix-like operating systems that is used to change file attributes on an extended filesystem. Specifically, it modifies file system flags (attributes) on files and directories. These flags can provide additional levels of security or control over how the filesystem interacts with those files.

The chattr command interacts directly with the filesystem's underlying attribute system, typically on filesystems like ext2, ext3, ext4, Btrfs, and XFS. The available attributes depend on the specific filesystem in use.

The primary function of chattr is to add or remove specific attributes, represented by single-letter abbreviations or their longer counterparts, to or from a file. These attributes control behaviors such as immutability (preventing modification or deletion), append-only mode (allowing only appending data), and compression behavior.

The changes made by chattr are typically persistent and remain in effect even after the system reboots, until they are explicitly changed again using chattr (or a similar utility).

The counterpart to chattr is lsattr, which is used to list the attributes of a file or directory. Together, these tools provide a method for managing extended filesystem attributes.

The tool requires sufficient privileges (usually root or the file's owner with appropriate capabilities) to modify certain attributes, particularly those related to security or system integrity.