Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A script to prevent damage from rm -rf malware' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to prevent damage from rm -rf malware
Authored by: ptwithy on May 18, '04 04:07:52PM

I would think this would be very possible. I used to do it as a standard procedure when I had to manage Unix installations for non-wizards. It is simply a matter of shadowing the kernel unlink call in the C runtime with a subroutine that moves rather than unlinks then re-link all the commands that do unlink operations (e.g., not just rm, but mv, which will unlink a duplicate target.) This saved me from having to search backups many times...



[ Reply to This | # ]