Ubuntu – Extra dash insertion when trying to run tar

bash

I have a really weird issue where I'm getting an extra - insertion on tar:

# tar -zxvf mod_wsgi-3.3.tar.gz 
/bin/tar: unrecognized option '--zxvf'
Try `tar --help' or `tar --usage' for more information.

The same issue happens if I try to do –help

# tar --help
/bin/tar: unrecognized option `---help'
Try `tar --help' or `tar --usage' for more information.

But if I drop the first - both of the above examples work. Any ideas on how I can find and disable whatever is causing that?

Best Answer

I suspect there's an alias or function mangling your tar.

Post the output of alias | grep tar and set | grep -E "function tar|tar \(\)"

(I know I should leave a comment, but I don't have enough rep-point for commenting, yet)

Edit: Also, post the output of which tar please.