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


Click here to return to the 'A warning on a new destructive 'trojan horse'' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A warning on a new destructive 'trojan horse'
Authored by: midan23 on May 12, '04 09:42:07PM
What about creating a file called "-i" in your home directory ? Since the expansion of ~ is done by the shell, the rm command finds the options r and f followed by some filenames, the option i and some other filenames. This way, the i option comes allways after the f option and the rm command will ask for confirmation on each file ... To create the file "touch" won't work, so use
echo > -i
(I found this some months ago in a mailing list ...)

[ Reply to This | # ]
A warning on a new destructive 'trojan horse'
Authored by: gschueler on May 12, '04 10:36:06PM

that won't prevent 'rm -rf ~'. If you are in your home directory and do 'rm -rf *' it will prevent you from cooking your own goose. It works because the glob-expansion of * just turns into a list of all the files in the directory. the '-i' file comes first and looks like a command line switch.
However 'rm -rf ~' doesn't do glob-expansion and thus the '-i' file won't help you.



[ Reply to This | # ]