1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-01 18:55:31 +02:00
tldr/pages/linux/chattr.md

16 lines
344 B
Markdown
Raw Normal View History

2016-02-16 13:44:30 +05:30
# chattr
> Change attributes of files or folders.
- Make a file or directory immutable to changes and deletion, even by superuser:
2016-02-16 13:44:30 +05:30
`chattr +i {{path/to/file_or_directory}}`
2016-02-16 13:44:30 +05:30
- Make a file or directory mutable:
2016-02-16 13:44:30 +05:30
`chattr -i {{path/to/file_or_directory}}`
2016-02-16 13:44:30 +05:30
- Recursively make an entire folder and contents immutable:
`chattr -R +i {{folder}}`