Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

# mkdir /tmp/foo

# touch /tmp/foo/.immutable

# chattr +i /tmp/foo/.immutable

# rm -rf /tmp/foo

It's not EXACTLY what you asked for, but the .immutable file cannot be deleted until you call chattr -i on it, which protects the directory....



That doesn't protect siblings of <foo/.immutable>...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: