info > CHATTR

📖 NAME

chattr - change file attributes on a Linux file system

🚀 Quick Reference

Use CaseCommandDescription
Make file immutablechattr +i fileFile cannot be modified, deleted, or renamed
Make file append-onlychattr +a fileFile can only be opened in append mode
Disable atime updateschattr +A fileNo atime record updates on access
Recursive attribute changechattr -R +i dirRecursively apply immutable attribute to directory and contents
Enable compressionchattr +c fileAutomatically compress file on disk
Secure deletionchattr +s fileZero blocks on delete
Undeletablechattr +u fileSave contents on delete for possible undeletion
View attributeslsattr fileList current attributes of file

📝 SYNOPSIS

chattr [ -RVf ] [ -v version ] [ -p project ] [ mode ] files...

📖 DESCRIPTION

chattr changes the file attributes on a Linux file system.

The format of a symbolic mode is +-=[aAcCdDeFijmPsStTux].

The operator '+' causes the selected attributes to be added to the existing attributes of the files; '-' causes them to be removed; and '=' causes them to be the only attributes that the files have.

The letters 'aAcCdDeFijmPsStTux' select the new attributes for the files: append only (a), no atime updates (A), compressed (c), no copy on write (C), no dump (d), synchronous directory updates (D), extent format (e), case-insensitive directory lookups (F), immutable (i), data journaling (j), don't compress (m), project hierarchy (P), secure deletion (s), synchronous updates (S), no tail-merging (t), top of directory hierarchy (T), undeletable (u), and direct access for files (x).

The following attributes are read-only, and may be listed by lsattr(1) but not modified by chattr: encrypted (E), indexed directory (I), inline data (N), and verity (V).

Not all flags are supported or utilized by all file systems; refer to file system-specific man pages such as btrfs(5), ext4(5), and xfs(5) for more file system-specific details.

⚙️ OPTIONS

🏷️ ATTRIBUTES

👤 AUTHOR

chattr was written by Remy Card <Remy.Card AT linux.org>. It is currently being maintained by Theodore Ts'o <tytso AT alum.edu>.

🐛 BUGS AND LIMITATIONS

The 'c', 's', and 'u' attributes are not honored by the ext2, ext3, and ext4 file systems as implemented in the current mainline Linux kernels. Setting 'a' and 'i' attributes will not affect the ability to write to already existing file descriptors.

The 'j' option is only useful for ext3 and ext4 file systems.

The 'D' option is only useful on Linux kernel 2.5.19 and later.

📦 AVAILABILITY

chattr is part of the e2fsprogs package and is available from http://e2fsprogs.sourceforge.net.

🔗 SEE ALSO

CHATTR
📖 NAME 🚀 Quick Reference 📝 SYNOPSIS 📖 DESCRIPTION ⚙️ OPTIONS 🏷️ ATTRIBUTES 👤 AUTHOR 🐛 BUGS AND LIMITATIONS 📦 AVAILABILITY 🔗 SEE ALSO

Generated by phpman v4.9.26-5-g7740029 Author: Che Dong Under GNU General Public License
2026-08-16 08:50 @2600:1f28:365:80b0:7cb9:fb:26c1:e368
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0 Transitional!Valid CSS!