I saw 2 problems. The first that my rm is located at /bin/rm. I would assume I would change the location to /bin/rm. The second my rm is a executable file and not a text file. So will replacing my rm file with the shellscript below work? I would think they would need to be the same type of files.
As far as how to make stuff go to the trash instead of deleted, run this as root:
Code: Select all
mv /usr/bin/rm /usr/bin/rm.bak
Now copy this script and save it as /usr/bin/rm:
Code: Select all
#!/bin/bash
mkdir ~/.Trash &> /dev/null
while [ ! -z "$1" ]; do
mv "$1" ~/.Trash/
shift
done
http://www.linuxforums.org/forum/364949-post2.htmlThis will, instead of deleting files, move them to the .Trash directory in your home directory, and you can delete them for real later.