News for hackers. Stuff that matters.
Re:Did Pixar accidentally delete Toy Story 2 during producti... by knodi123 on Tuesday January 17, 2017 @02:32PM (#13420372)
# 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....

Re:Did Pixar accidentally delete Toy Story 2 during producti... by coldpie on Tuesday January 17, 2017 @03:05PM (#13420675)
That doesn't protect siblings of <foo/.immutable>...