mirror of
https://github.com/xmengnet/the-art-of-command-line.git
synced 2024-12-25 15:36:29 +08:00
chattr to protect accidental file delete
This commit is contained in:
parent
f8fc819af2
commit
b1ad68b215
1 changed files with 3 additions and 0 deletions
|
@ -191,6 +191,9 @@ Notes:
|
||||||
5
|
5
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- File attributes are settable via `chattr` and offer an alternative, lower-level alternative to file permissions. For example, to protect accidental file deletion the immutable flag: `sudo chattr +i /critical/directory/or/file`
|
||||||
|
|
||||||
|
|
||||||
## Processing files and data
|
## Processing files and data
|
||||||
|
|
||||||
- To locate a file by name in the current directory, `find . -iname '*something*'` (or similar). To find a file anywhere by name, use `locate something` (but bear in mind `updatedb` may not have indexed recently created files).
|
- To locate a file by name in the current directory, `find . -iname '*something*'` (or similar). To find a file anywhere by name, use `locate something` (but bear in mind `updatedb` may not have indexed recently created files).
|
||||||
|
|
Loading…
Reference in a new issue