how to prevent any folder being deleted accidently ?

asking

Verified User
Joined
Jul 8, 2010
Messages
58
hello guyz,

is there any such protection by which our any folder, which is having data wont be deleted accidently when clicked on delete.... any protection ? which will protect folder from being deleted...

please help me need of it...
 
Last edited:
hey but can i add files in that folder after protecting ?

i want just protection against deletion nothing else...
 
It's a directory, and not a folder :). To add a file to a directory you must write to the directory (which internally is just a file of links). So the answer is no.

You can keep from deleting a directory by simply having a file in it you can't delete (i.e., an invisible file that's chattr'd immutable).

Try that.

Jeff
 
Back
Top