Skip to content

Commit 1d007dd

Browse files
authored
chattr: add sudo (#19762)
1 parent 46da4c0 commit 1d007dd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pages/linux/chattr.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55
66
- Make a file or directory [i]mmutable to changes and deletion, even by superuser:
77

8-
`chattr +i {{path/to/file_or_directory}}`
8+
`sudo chattr +i {{path/to/file_or_directory}}`
99

1010
- Make a file or directory mutable:
1111

12-
`chattr -i {{path/to/file_or_directory}}`
12+
`sudo chattr -i {{path/to/file_or_directory}}`
1313

1414
- [R]ecursively make an entire directory and contents immutable:
1515

16-
`chattr -R +i {{path/to/directory}}`
16+
`sudo chattr -R +i {{path/to/directory}}`
1717

1818
- Mark a directory and its files to be interpreted in a case-insensitive manner (case-[F]olding):
1919

2020
`chattr +F {{path/to/directory}}`
2121

2222
- Set a file to only allow [a]ppending:
2323

24-
`chattr +a {{path/to/file}}`
24+
`sudo chattr +a {{path/to/file}}`

0 commit comments

Comments
 (0)