I think your question is answered here. In summary;
- Adding an alias for
rm is bad form, as other scripts (and/or users) on your system rely on the default behaviour
- When you switch to another machine you'll use
rm with wild abandon
- Instead create an alias for your own command, such as
To do this;
alias del 'mv -i $1 /tmp'
-i flag warns you if a file of the same name already exists in trash, so you don't lose existing trashed files.
And you'll want that alias to be initiated whenever you open a shell, which depending on your system might be putting the command in
Some people reported that
$1 doesn't work, and there's a suggested script in that thread I linked to which should help if that's the case.
Hope that helps