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


Click here to return to the 'A subtle fix for hard-to-diagnose installer hangs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A subtle fix for hard-to-diagnose installer hangs
Authored by: gunnmjk on Jul 25, '05 10:29:59AM

Instead of relying on rm -i, is there a way to make rm move files to the trash, and put that in the profile?



[ Reply to This | # ]
A subtle fix for hard-to-diagnose installer hangs
Authored by: spiralscratch on Jul 25, '05 04:48:30PM
It's usually considered unwise to have an existing command mapped to another via an alias. What you want would mean mapping 'rm' to 'mv'. You can, however, make up your own command names. Enter the following fine into your .bashrc file:
trash () { mv $1 ~/.Trash/ ; }
Now, you can type in 'trash someitem', and that file or folder will be moved to your trash folder.

[ Reply to This | # ]
A subtle fix for hard-to-diagnose installer hangs
Authored by: Code Masseur on Aug 01, '05 10:16:10AM

That tip for moving files to the trash folder seems neat, but how does it handle trashing files on other volumes / external disks?



[ Reply to This | # ]
A subtle fix for hard-to-diagnose installer hangs
Authored by: spiralscratch on Aug 01, '05 08:16:46PM

Good point. Using this function on an object on a volume other than the one holding the user's home folder would move it to the local trash. Probably not ideal. That's what I get for knocking off that line in only a few minutes.

It probably wouldn't be too hard to add some logic to the function to account for such volumes. (Or heck, go one more step further and just make it a true executable script and drop it in a bin folder somewhere.)



[ Reply to This | # ]
A subtle fix for hard-to-diagnose installer hangs
Authored by: jdtangney on Jul 26, '05 08:18:09PM
Yes. Install osxutils. See http://osxutils.sourceforge.net/

[ Reply to This | # ]