chattr to protect accidental file delete

This commit is contained in:
Lakshmipathi.G 2016-02-15 02:15:51 +05:30
parent f8fc819af2
commit b1ad68b215

View file

@ -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).