Download FireStorage files using gsutil











up vote
0
down vote

favorite












I am trying to download all files to my system from my firestorage using gsutil.



I am using the following command as per the documentation to download all .jpg files:



gsutil cp gs://my-bucket/*.jpg


however I am getting the error saying that the cp command has the wrong number of arguments I suppose its asking for a path in my computer, but how do I put that there??










share|improve this question









New contributor




Pemba Tamang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    up vote
    0
    down vote

    favorite












    I am trying to download all files to my system from my firestorage using gsutil.



    I am using the following command as per the documentation to download all .jpg files:



    gsutil cp gs://my-bucket/*.jpg


    however I am getting the error saying that the cp command has the wrong number of arguments I suppose its asking for a path in my computer, but how do I put that there??










    share|improve this question









    New contributor




    Pemba Tamang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am trying to download all files to my system from my firestorage using gsutil.



      I am using the following command as per the documentation to download all .jpg files:



      gsutil cp gs://my-bucket/*.jpg


      however I am getting the error saying that the cp command has the wrong number of arguments I suppose its asking for a path in my computer, but how do I put that there??










      share|improve this question









      New contributor




      Pemba Tamang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I am trying to download all files to my system from my firestorage using gsutil.



      I am using the following command as per the documentation to download all .jpg files:



      gsutil cp gs://my-bucket/*.jpg


      however I am getting the error saying that the cp command has the wrong number of arguments I suppose its asking for a path in my computer, but how do I put that there??







      firebase firebase-storage gsutil






      share|improve this question









      New contributor




      Pemba Tamang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Pemba Tamang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited Nov 19 at 12:57





















      New contributor




      Pemba Tamang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Nov 19 at 12:41









      Pemba Tamang

      105




      105




      New contributor




      Pemba Tamang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Pemba Tamang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Pemba Tamang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.
























          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          The syntax for gsutil cp is:



          gsutil cp <source> <destination>


          You're calling it as:



          gsutil cp gs://my-bucket/*.jpg


          This means that you're specifying a source, but not a destination. If you want to for example store the files in the directory/folder where you run the command, you would run it as:



          gsutil cp gs://my-bucket/*.jpg .


          The . at the end there means that the destination is the current directory, where you run the command.






          share|improve this answer





















          • I see how do I specify my local storage as the destination?? and my bucket looks like this gs://mybucket/File/Path One. so do I give the space there or do I write gs://mybucket/File/ Path%20%One
            – Pemba Tamang
            Nov 20 at 4:47












          • The . is the local directory on the machine where you run gsutil. If you run that local you local machine, the files are put into the directory where you run the command.
            – Frank van Puffelen
            Nov 20 at 5:41










          • sorry guys I missed the . in the docs and in this comment. Thanks alot. I was multitasking skimming through , honestly it feels embarassing..
            – Pemba Tamang
            Nov 20 at 6:15




















          up vote
          1
          down vote













          Please go back and check well, it is suppossed to work fine.



          gsutil cp gs://my-bucket/*.txt .






          share|improve this answer

















          • 1




            did u try it yourself??
            – Pemba Tamang
            Nov 19 at 12:55












          • Yes it is working fine
            – ElectronSz
            Nov 19 at 15:07











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          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',
          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
          });


          }
          });






          Pemba Tamang is a new contributor. Be nice, and check out our Code of Conduct.










           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53374887%2fdownload-firestorage-files-using-gsutil%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote



          accepted










          The syntax for gsutil cp is:



          gsutil cp <source> <destination>


          You're calling it as:



          gsutil cp gs://my-bucket/*.jpg


          This means that you're specifying a source, but not a destination. If you want to for example store the files in the directory/folder where you run the command, you would run it as:



          gsutil cp gs://my-bucket/*.jpg .


          The . at the end there means that the destination is the current directory, where you run the command.






          share|improve this answer





















          • I see how do I specify my local storage as the destination?? and my bucket looks like this gs://mybucket/File/Path One. so do I give the space there or do I write gs://mybucket/File/ Path%20%One
            – Pemba Tamang
            Nov 20 at 4:47












          • The . is the local directory on the machine where you run gsutil. If you run that local you local machine, the files are put into the directory where you run the command.
            – Frank van Puffelen
            Nov 20 at 5:41










          • sorry guys I missed the . in the docs and in this comment. Thanks alot. I was multitasking skimming through , honestly it feels embarassing..
            – Pemba Tamang
            Nov 20 at 6:15

















          up vote
          1
          down vote



          accepted










          The syntax for gsutil cp is:



          gsutil cp <source> <destination>


          You're calling it as:



          gsutil cp gs://my-bucket/*.jpg


          This means that you're specifying a source, but not a destination. If you want to for example store the files in the directory/folder where you run the command, you would run it as:



          gsutil cp gs://my-bucket/*.jpg .


          The . at the end there means that the destination is the current directory, where you run the command.






          share|improve this answer





















          • I see how do I specify my local storage as the destination?? and my bucket looks like this gs://mybucket/File/Path One. so do I give the space there or do I write gs://mybucket/File/ Path%20%One
            – Pemba Tamang
            Nov 20 at 4:47












          • The . is the local directory on the machine where you run gsutil. If you run that local you local machine, the files are put into the directory where you run the command.
            – Frank van Puffelen
            Nov 20 at 5:41










          • sorry guys I missed the . in the docs and in this comment. Thanks alot. I was multitasking skimming through , honestly it feels embarassing..
            – Pemba Tamang
            Nov 20 at 6:15















          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          The syntax for gsutil cp is:



          gsutil cp <source> <destination>


          You're calling it as:



          gsutil cp gs://my-bucket/*.jpg


          This means that you're specifying a source, but not a destination. If you want to for example store the files in the directory/folder where you run the command, you would run it as:



          gsutil cp gs://my-bucket/*.jpg .


          The . at the end there means that the destination is the current directory, where you run the command.






          share|improve this answer












          The syntax for gsutil cp is:



          gsutil cp <source> <destination>


          You're calling it as:



          gsutil cp gs://my-bucket/*.jpg


          This means that you're specifying a source, but not a destination. If you want to for example store the files in the directory/folder where you run the command, you would run it as:



          gsutil cp gs://my-bucket/*.jpg .


          The . at the end there means that the destination is the current directory, where you run the command.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 19 at 15:29









          Frank van Puffelen

          220k25361387




          220k25361387












          • I see how do I specify my local storage as the destination?? and my bucket looks like this gs://mybucket/File/Path One. so do I give the space there or do I write gs://mybucket/File/ Path%20%One
            – Pemba Tamang
            Nov 20 at 4:47












          • The . is the local directory on the machine where you run gsutil. If you run that local you local machine, the files are put into the directory where you run the command.
            – Frank van Puffelen
            Nov 20 at 5:41










          • sorry guys I missed the . in the docs and in this comment. Thanks alot. I was multitasking skimming through , honestly it feels embarassing..
            – Pemba Tamang
            Nov 20 at 6:15




















          • I see how do I specify my local storage as the destination?? and my bucket looks like this gs://mybucket/File/Path One. so do I give the space there or do I write gs://mybucket/File/ Path%20%One
            – Pemba Tamang
            Nov 20 at 4:47












          • The . is the local directory on the machine where you run gsutil. If you run that local you local machine, the files are put into the directory where you run the command.
            – Frank van Puffelen
            Nov 20 at 5:41










          • sorry guys I missed the . in the docs and in this comment. Thanks alot. I was multitasking skimming through , honestly it feels embarassing..
            – Pemba Tamang
            Nov 20 at 6:15


















          I see how do I specify my local storage as the destination?? and my bucket looks like this gs://mybucket/File/Path One. so do I give the space there or do I write gs://mybucket/File/ Path%20%One
          – Pemba Tamang
          Nov 20 at 4:47






          I see how do I specify my local storage as the destination?? and my bucket looks like this gs://mybucket/File/Path One. so do I give the space there or do I write gs://mybucket/File/ Path%20%One
          – Pemba Tamang
          Nov 20 at 4:47














          The . is the local directory on the machine where you run gsutil. If you run that local you local machine, the files are put into the directory where you run the command.
          – Frank van Puffelen
          Nov 20 at 5:41




          The . is the local directory on the machine where you run gsutil. If you run that local you local machine, the files are put into the directory where you run the command.
          – Frank van Puffelen
          Nov 20 at 5:41












          sorry guys I missed the . in the docs and in this comment. Thanks alot. I was multitasking skimming through , honestly it feels embarassing..
          – Pemba Tamang
          Nov 20 at 6:15






          sorry guys I missed the . in the docs and in this comment. Thanks alot. I was multitasking skimming through , honestly it feels embarassing..
          – Pemba Tamang
          Nov 20 at 6:15














          up vote
          1
          down vote













          Please go back and check well, it is suppossed to work fine.



          gsutil cp gs://my-bucket/*.txt .






          share|improve this answer

















          • 1




            did u try it yourself??
            – Pemba Tamang
            Nov 19 at 12:55












          • Yes it is working fine
            – ElectronSz
            Nov 19 at 15:07















          up vote
          1
          down vote













          Please go back and check well, it is suppossed to work fine.



          gsutil cp gs://my-bucket/*.txt .






          share|improve this answer

















          • 1




            did u try it yourself??
            – Pemba Tamang
            Nov 19 at 12:55












          • Yes it is working fine
            – ElectronSz
            Nov 19 at 15:07













          up vote
          1
          down vote










          up vote
          1
          down vote









          Please go back and check well, it is suppossed to work fine.



          gsutil cp gs://my-bucket/*.txt .






          share|improve this answer












          Please go back and check well, it is suppossed to work fine.



          gsutil cp gs://my-bucket/*.txt .







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 19 at 12:48









          ElectronSz

          346




          346








          • 1




            did u try it yourself??
            – Pemba Tamang
            Nov 19 at 12:55












          • Yes it is working fine
            – ElectronSz
            Nov 19 at 15:07














          • 1




            did u try it yourself??
            – Pemba Tamang
            Nov 19 at 12:55












          • Yes it is working fine
            – ElectronSz
            Nov 19 at 15:07








          1




          1




          did u try it yourself??
          – Pemba Tamang
          Nov 19 at 12:55






          did u try it yourself??
          – Pemba Tamang
          Nov 19 at 12:55














          Yes it is working fine
          – ElectronSz
          Nov 19 at 15:07




          Yes it is working fine
          – ElectronSz
          Nov 19 at 15:07










          Pemba Tamang is a new contributor. Be nice, and check out our Code of Conduct.










           

          draft saved


          draft discarded


















          Pemba Tamang is a new contributor. Be nice, and check out our Code of Conduct.













          Pemba Tamang is a new contributor. Be nice, and check out our Code of Conduct.












          Pemba Tamang is a new contributor. Be nice, and check out our Code of Conduct.















           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53374887%2fdownload-firestorage-files-using-gsutil%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

          To store a contact into the json file from server.js file using a class in NodeJS

          Redirect URL with Chrome Remote Debugging Android Devices

          Dieringhausen