unable to unzip to opt directory












5















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-1.0.7.17 bin.zip -C /opt 
[sudo] password for navjeet:
Archive: jstock-1.0.7.17-bin.zip
caution: filename not matched: -C
caution:filename not matched: /opt
navjeet@navjeet-Lenovo-G50-80:~/Downloads$


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










share|improve this question





























    5















    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-1.0.7.17 bin.zip -C /opt 
    [sudo] password for navjeet:
    Archive: jstock-1.0.7.17-bin.zip
    caution: filename not matched: -C
    caution:filename not matched: /opt
    navjeet@navjeet-Lenovo-G50-80:~/Downloads$


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










    share|improve this question



























      5












      5








      5








      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-1.0.7.17 bin.zip -C /opt 
      [sudo] password for navjeet:
      Archive: jstock-1.0.7.17-bin.zip
      caution: filename not matched: -C
      caution:filename not matched: /opt
      navjeet@navjeet-Lenovo-G50-80:~/Downloads$


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










      share|improve this question
















      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-1.0.7.17 bin.zip -C /opt 
      [sudo] password for navjeet:
      Archive: jstock-1.0.7.17-bin.zip
      caution: filename not matched: -C
      caution:filename not matched: /opt
      navjeet@navjeet-Lenovo-G50-80:~/Downloads$


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







      command-line unzip






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 29 at 9:36









      Kevin Bowen

      14.6k155970




      14.6k155970










      asked Nov 27 '16 at 13:44









      EetSandhuEetSandhu

      4319




      4319






















          1 Answer
          1






          active

          oldest

          votes


















          6














          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-1.0.7.17-bin.zip 


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






          share|improve this answer
























          • 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








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f854201%2funable-to-unzip-to-opt-directory%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          6














          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-1.0.7.17-bin.zip 


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






          share|improve this answer
























          • 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
















          6














          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-1.0.7.17-bin.zip 


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






          share|improve this answer
























          • 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














          6












          6








          6







          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-1.0.7.17-bin.zip 


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






          share|improve this answer













          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-1.0.7.17-bin.zip 


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







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 27 '16 at 13:53









          Kristopher IvesKristopher Ives

          2,87211525




          2,87211525













          • 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



















          • 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

















          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





          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





          @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





          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


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f854201%2funable-to-unzip-to-opt-directory%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Human spaceflight

          Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

          張江高科駅