Many days ago, I found this useful bash alias (contents of my ~/.bash_aliases)
# aliases
# finds temporary files ending with '~' and deletes them
alias rm~='find . -name '*~' -print0 | xargs -0 /bin/rm -f'
Now I tried to use rm~
after cd
to some directory containing 3 files ending in ~
I got this error in terminal, and files did not get deleted
find: paths must precede expression: 1n.in~
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
Also when I tried rm~
from /home/me
, it seems to be doing nothing. Or it might be taking a lot of time.
Please tell me why am I getting error, and how to fix it.
Thanks!