I'm trying to install jstock to the /opt directory. I'm getting the below error.

  1. jstock is in the ~/Downloads directory.
  2. The file name is correct.

Kindly guide.

navjeet@navjeet-Lenovo-G50-80:~/Downloads$ sudo unzip jstock- bin.zip -C /opt 
[sudo] password for navjeet:  
Archive: jstock-  
caution: filename not matched:  -C 
caution:filename not matched:  /opt 

Note: bin.zip and -C are separated by space, though it looks otherwise.


Took me a few minutes to see what you were doing wrong. You are using tar syntax for unzip and they aren't compatible. You want to run this:

sudo unzip -d /opt/ jstock- 

For tar the syntax is tar xf file.tar -C dir whereas for unzip it's unzip -d dir file.zip

  • It worked wonders! kudos to you and thanks a lot.. Meanwhile i would like to know more about the differences of tar and unzip. – EetSandhu Nov 27 '16 at 14:01
  • @Krishtopher can i use tar to unzip (or untar , if that sounds correct) a .zip file ? – EetSandhu Nov 27 '16 at 14:02
  • Nope I just tested tar doesn't support .zip files, it does support .tar.gz and .tar.bz2 files though. – Kristopher Ives Nov 27 '16 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.