1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-04 13:35:25 +02:00
tldr/pages/linux/chattr.md
2025-06-05 04:36:18 +02:00

597 B

chattr

Change attributes of files or directories. More information: https://manned.org/chattr.

  • Make a file or directory immutable to changes and deletion, even by superuser:

chattr +i {{path/to/file_or_directory}}

  • Make a file or directory mutable:

chattr -i {{path/to/file_or_directory}}

  • Recursively make an entire directory and contents immutable:

chattr -R +i {{path/to/directory}}

  • Mark a directory and its files to be interpreted in a case-insensitive manner:

chattr +F {{path/to/directory}}

  • Set a file to only allow appending:

chattr +a {{path/to/file}}