encyclopegia.org

Chattr

is the command in Linux that allows a user to set certain attributes of a file. is the command that displays the attributes of a file. Most BSD-like systems, including macOS, have always had an analogous command to set the attributes, but no command specifically meant to display them; specific options to the command are used instead. The chflags command first appeared in 4.4BSD. Solaris has no commands specifically meant to manipulate them. and are used instead. Other Unix-like operating systems, in general, have no analogous commands. The similar-sounding commands (from HP-UX) and (from AIX) exist but have unrelated functions. Among other things, the command is useful to make files immutable so that password files and certain system files cannot be erased during software upgrades.

is the command in Linux that allows a user to set certain attributes of a file. is the command that displays the attributes of a file. Most BSD-like systems, including macOS, have always had an analogous command to set the attributes, but no command specifically meant to display them; specific options to the command are used instead. The chflags command first appeared in 4.4BSD. Solaris has no commands specifically meant to manipulate them. and are used instead. Other Unix-like operating systems, in general, have no analogous commands. The similar-sounding commands (from HP-UX) and (from AIX) exist but have unrelated functions. Among other things, the command is useful to make files immutable so that password files and certain system files cannot be erased during software upgrades. chattr [-RVf] [-+=AacDdijsTtSu] [-v version] files... -R recursively changes attributes of directories and their contents -V is to be verbose and print the program version -f suppresses most error messages lsattr [ -RVadv ] [ files... ] -R recursively lists attributes of directories and their contents -V displays the program version -a lists all files in directories, including dotfiles -d lists directories like other files, rather than listing their contents chflags [-R [-H | -L | -P]] flags file ... -H If the -R option is specified, symbolic links on the command line are followed. (Symbolic links encountered in the tree traversal are not followed.) -L If the -R option is specified, all symbolic links are followed. -P If the -R option is specified, no symbolic links are followed. This is the default. -R Change the file flags for the file hierarchies rooted in the files instead of just the files themselves. ==References== (outdated; see newer version) (flags section in the BSD system source code of the macOS XNU kernel)

References

No reference rows published for this article.

Cite this article

MLA

"Chattr." encyclopegia.org, 2026, https://encyclopegia.org/wiki/chattr. Accessed 24 November 2026.

Chicago

"Chattr." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/chattr.

APA

encyclopegia.org. (2026). Chattr. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/chattr

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1353506963 · 0.5 · snapshot enwiki-001353506963

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.