# mtree -p /usr -U /etc/mtree/BSD.usr.dist
will restore the /usr partitition based upon the original distribution.
Another use is mentioned in the man page - to prevernt trojan horses. You can periodically save off new mtree databases, and then compare the tree against its current incarnation. If there are any checksum changes, it will complain.
I'm going to have to look into doing this. It seems like it could be a real butt-saver some times! Those recursive commands, that merrily skip down folder hierarchies, can be very dangerous, esp for someone like me. I know better, but I still do all my work on my server logged in as root - yikes! Looks like a prime candidate to add to one of the periodic lists.
mtree
No comments:
Post a Comment