"Self Destruct" script to remove certain directories and/or applications Let's say your work situation isn't going so well, and you suspect the end is near. 

How would you prepare a script (or similar) to remove your personal files and applications from your work computer (OSX Lion) if you only had a few minutes to gather your things and leave the building? Of course, you want to leave the machine functional, and all your work files intact, because the situation is bad but you aren't a jerk.
Follow this guide to create a simple file path copier.
Open a new document in TextWrangler. Paste in the following:

#!/bin/sh
rm -rf 


Note the space after rm -rf.
Open Finder, go to a file, press the keyboard shortcut you assigned in step 1, then press ⌘ cmd + V in TextWrangler.
Do this for all the files you want deleted. Make sure there is a space between two file paths and not an enter. That means all the file paths will be on the same line. Also, if there are any spaces in the file path, you need to enclose the path in quotes ('/path/with a space' or "/path/ with a space").
Save the file on the Desktop with the name anything.sh. Don’t check any other options while saving.
Make the script executable by typing in Terminal sudo chmod 755 ~/Desktop/anything.sh.
When D-Day comes, right click on the file, select Open With → Other…. Open the Applications → Utilities folder, in the Enable: field, select “All Applications.”
Double click on Terminal. 
The script will finish its job in a few minutes.


Alternatively, you can open the file in Text Wrangler and copy and paste the contents in Terminal. This eliminates steps 6 and 7.