I am trying to create an alias to move files and directories to the tmp directory. This is what I've tried:
alias rm='/bin/mv *.* /tmp'
The problem is that when I type rm filename, I get an error saying:
/bin/mv: target 'filename' is not a directory.
I know that filename is just a file. The point is that I want to move it to the specified /tmp directory. Can anyone help me?
alias. However, even if it were possible, it would be a bad idea to usealias. First, if you are used to custom behavior ofrm, you might be forced to use normal edition on some other machine (false sense of security). Second, if some other user is using your computer, and tries to erase some big 10GB binary file to save space, he would really expect that the file is deleted, and not just moved to the /tmp. – bbaja42 Jun 24 '11 at 19:40