From b1ad68b2151c9b1da6277a20da8402dcdb01d0dd Mon Sep 17 00:00:00 2001 From: "Lakshmipathi.G" Date: Mon, 15 Feb 2016 02:15:51 +0530 Subject: [PATCH] chattr to protect accidental file delete --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index b7bef5b..8910a5c 100644 --- a/README.md +++ b/README.md @@ -191,6 +191,9 @@ Notes: 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 - 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).