4 ms·
# 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
by knodi123 10y ago
# 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....
- coldpie 10y agoThat doesn't protect siblings of <foo/.immutable>...