I like to use rm
but I often made mistakes so that I remove something mistakenly
so I want to make somthing like mv .trash
so that
rm file
is equal to
mv file ~/.trash
besides, I also want to periodically empty the ~/.trash folder
then if I have made rm as mv, how to empty the ~/.trash folder
thanks
trash-cliinstead of hackingrm. – lgeorget Apr 30 '13 at 17:47$*in a shell script is almost always wrong - it fails, it the filename contains whitespace or shell globbing characters. Use"$@"instead. – Uwe Apr 30 '13 at 18:06rmwhen you know it is not recommended? You should change your answer, and not put that in a comment (since it is important). I know you know it, but for the OP - @misteryes - check out this. – Emanuel Berg Apr 30 '13 at 22:25rm fileequal tomv file ~/.trash?" and "comment" to give additional information. Of course, this should not be done but from a technical point of view, it's possible and I show how. – lgeorget May 01 '13 at 00:04