tldr/pages/linux/chattr.md
Marco Bonelli 2599a6de48 Refactor: change "folder" to "directory" where needed.
This commit fixes every instance in which the word "folder" is
incorrectly used instead of "directory".
2019-02-13 20:51:04 +05:30

362 B

chattr

Change attributes of files or directories.

  • 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}}