I am a newbie. I set an alias in .bashrc file as follow.
alias myrm='mv /home/user/Trash/*'
The purpose is that when I use myrm comment, for example $myrm foo, the file "foo" has to be moved to the Trash folder which is in my home folder (/home/user/Trash).
Then I did
$source ~/.bashrc
After this, when I try to use myrm by typing $myrm foo, I get the following error message.
mv: cannot stat ‘/home/user/Trash/*’: No such file or directory
How this problem can be solved?
mv SOURCE DESTINATION
and notmv DESTINATION SOURCE
. Seeman mv
andhelp alias
. Use a function. Seehelp function
.$1
between the mv and the destination folder to take the 'foo' you provide when you run the script.alias myrm='mv -t /home/user/Trash'