mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-18 00:49:43 +00:00
Update cheatsheets
This commit is contained in:
21
linux/chattr
Normal file
21
linux/chattr
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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}}`
|
||||
Reference in New Issue
Block a user