I've written a line in .bashrc
alias untar='sudo tar –xvzf'
Now, when I use "untar" in bash I get the error:
untar filename.tar.gz
tar: invalid option -- '�'
Try 'tar --help' or 'tar --usage' for more information.
However when I use the actual command instead of the alias
sudo tar –xvzf filename.tar.gz
It works fine.
I did run . ~/.bashrc
, so the alias is "known" (or however you'd call it). Which is also evident form the error message which acknowledges it's a tar command.
There's other aliases in bashrc which still work fine.
So, why isn't my alias working?
-z
and lettar
decide on what decompression to use. – Oct 24 '21 at 12:22