[ubuntu-ca] Re: Spyware, Malware, etc.

Jim Little jlittle at orderedBits.com
Wed Dec 20 13:39:20 UTC 2006

Quoting Brian Burger:

> A little bash script to do most of
> that in Ubuntu wouldn't be hard to write at all.
> rm -rf ~/path/to/browser/cache & rm -rf ~/other/deleteables & rm -rf
> ~/.Trash

Just a note on that script:  In bash a single ampersand (ie. &) means run in the
background, a double ampersand (&&) means only execute the next command if the
previous one returns a success code (ie. zero).  I think in this case you likely
meant to use the double ampersand, although the commands don't really rely on
each other so you could really just separate them with a semicolon.

Also, it's best not to use the tilde (~) character in shell scripts, use $HOME
instead so your clean-up script becomes:

rm -rf $HOME/path/to/browser/cache; rm -rf $HOME/other/deleteables; rm -rf

Better not to run that in a cron job, though, as some programs don't react well
to having directories they are using deleted out from under them.



More information about the ubuntu-ca mailing list