Read the contents of a zipped file without extraction?View list of files in ZIP archive on LinuxRead the...

Critique of timeline aesthetic

Contradiction proof for inequality of P and NP?

Alignment of various blocks in tikz

Implications of cigar-shaped bodies having rings?

How can I print the prosodic symbols in LaTeX?

How to have a sharp product image?

Why do games have consumables?

What happens to Mjolnir (Thor's hammer) at the end of Endgame?

How come there are so many candidates for the 2020 Democratic party presidential nomination?

How to denote matrix elements succinctly?

Why didn't the Space Shuttle bounce back into space as many times as possible so as to lose a lot of kinetic energy up there?

Re-entry to Germany after vacation using blue card

How exactly does Hawking radiation decrease the mass of black holes?

Aligning equation numbers vertically

Can I criticise the more senior developers around me for not writing clean code?

Can SQL Server create collisions in system generated constraint names?

Who was the lone kid in the line of people at the lake at the end of Avengers: Endgame?

What term is being referred to with "reflected-sound-of-underground-spirits"?

Is the claim "Employers won't employ people with no 'social media presence'" realistic?

Don’t seats that recline flat defeat the purpose of having seatbelts?

Map of water taps to fill bottles

Was there a Viking Exchange as well as a Columbian one?

Converting a sprinkler system's 24V AC outputs to 3.3V DC logic inputs

What are the steps to solving this definite integral?



Read the contents of a zipped file without extraction?


View list of files in ZIP archive on LinuxRead the contents of a zipped file without extraction just 1 level?In Mac OS X, how can I unzip a zip file without unzipping its contents?Is there a tool for verifying the contents of a Zip archive against the source directory's contents?Windows zip error: Windows cannot complete the extraction. The destination file could not be createdHow to list the content of a zip file within another zip file without extractionHow to extract a set of zip files from a zip fileAutomatically extracting text files via commandline and combining them into a single text fileIs it possible to recursively list zip file contents with 7 zip without extractingCompressed file with a header containing all files within it, at the beginning of the fileCan a ZIP file auto-execute files from inside it?Is it possible to parse a zip file without extraction in PHP






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







134















How can I read the contents of a particular file in an archive without extracting the .zip it is contained within? I'm using the Linux command line.



An earlier question asks about viewing the directory of the archive. But for me it is not enough to see just a list of the files in the archive, I need to see the contents of a file in the archive.










share|improve this question




















  • 1





    Duplicity with superuser.com/questions/216617/zip-linux-view-files-in-archive

    – pevik
    Jul 3 '14 at 12:37











  • @fixer1234 (and others): The linked question asks, “How can I view the files in a ZIP archive?” AFAIC, that’s the same question as “How can I see the contents of a file …?” It’s unfortunate that many of the people who answered that question interpreted it as “How can I view the directory of the archive?” However, Gilles’s answer (naturally) and Rajasekhar Tolety’s answer (apparently) to that question provide answers to this question.

    – Scott
    Apr 21 '17 at 19:42








  • 1





    @Scott, maybe we should figure out how to merge the two questions so both topics are covered in one, or refocus the other to clearly be about the directory and then move answers between both places to match the questions. Right now, both are a mishmash.

    – fixer1234
    Apr 21 '17 at 20:12













  • @fixer1234: I agree, up to a point. The moderators are always telling us that duplicates are a good thing, because they provide a greater surface of exposure to the search engines (i.e., more chances that a search will find one of the questions). But there’s the rub: if a user finds one of the questions, and the linkage isn’t obvious (and nobody looks at the lists of “Linked” and “Related” questions — at least not random followers of search results), then the user has found only a fraction of the answers. DavidPostill cast the final vote to reopen this question; maybe you should talk to him.

    – Scott
    Apr 21 '17 at 20:26











  • @Scott — Given that the question asker marked the “How can I view the directory of the archive?” answer as accepted, I have to think that was likely the intent of the question. It is, unfortunately, ambiguously phrased such that it could mean either interpretation.

    – M. Justin
    Apr 21 '17 at 20:38


















134















How can I read the contents of a particular file in an archive without extracting the .zip it is contained within? I'm using the Linux command line.



An earlier question asks about viewing the directory of the archive. But for me it is not enough to see just a list of the files in the archive, I need to see the contents of a file in the archive.










share|improve this question




















  • 1





    Duplicity with superuser.com/questions/216617/zip-linux-view-files-in-archive

    – pevik
    Jul 3 '14 at 12:37











  • @fixer1234 (and others): The linked question asks, “How can I view the files in a ZIP archive?” AFAIC, that’s the same question as “How can I see the contents of a file …?” It’s unfortunate that many of the people who answered that question interpreted it as “How can I view the directory of the archive?” However, Gilles’s answer (naturally) and Rajasekhar Tolety’s answer (apparently) to that question provide answers to this question.

    – Scott
    Apr 21 '17 at 19:42








  • 1





    @Scott, maybe we should figure out how to merge the two questions so both topics are covered in one, or refocus the other to clearly be about the directory and then move answers between both places to match the questions. Right now, both are a mishmash.

    – fixer1234
    Apr 21 '17 at 20:12













  • @fixer1234: I agree, up to a point. The moderators are always telling us that duplicates are a good thing, because they provide a greater surface of exposure to the search engines (i.e., more chances that a search will find one of the questions). But there’s the rub: if a user finds one of the questions, and the linkage isn’t obvious (and nobody looks at the lists of “Linked” and “Related” questions — at least not random followers of search results), then the user has found only a fraction of the answers. DavidPostill cast the final vote to reopen this question; maybe you should talk to him.

    – Scott
    Apr 21 '17 at 20:26











  • @Scott — Given that the question asker marked the “How can I view the directory of the archive?” answer as accepted, I have to think that was likely the intent of the question. It is, unfortunately, ambiguously phrased such that it could mean either interpretation.

    – M. Justin
    Apr 21 '17 at 20:38














134












134








134


22






How can I read the contents of a particular file in an archive without extracting the .zip it is contained within? I'm using the Linux command line.



An earlier question asks about viewing the directory of the archive. But for me it is not enough to see just a list of the files in the archive, I need to see the contents of a file in the archive.










share|improve this question
















How can I read the contents of a particular file in an archive without extracting the .zip it is contained within? I'm using the Linux command line.



An earlier question asks about viewing the directory of the archive. But for me it is not enough to see just a list of the files in the archive, I need to see the contents of a file in the archive.







linux zip






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 1 '17 at 10:07









kasperd

2,64111126




2,64111126










asked Aug 17 '12 at 10:41









ShrikanthShrikanth

671253




671253








  • 1





    Duplicity with superuser.com/questions/216617/zip-linux-view-files-in-archive

    – pevik
    Jul 3 '14 at 12:37











  • @fixer1234 (and others): The linked question asks, “How can I view the files in a ZIP archive?” AFAIC, that’s the same question as “How can I see the contents of a file …?” It’s unfortunate that many of the people who answered that question interpreted it as “How can I view the directory of the archive?” However, Gilles’s answer (naturally) and Rajasekhar Tolety’s answer (apparently) to that question provide answers to this question.

    – Scott
    Apr 21 '17 at 19:42








  • 1





    @Scott, maybe we should figure out how to merge the two questions so both topics are covered in one, or refocus the other to clearly be about the directory and then move answers between both places to match the questions. Right now, both are a mishmash.

    – fixer1234
    Apr 21 '17 at 20:12













  • @fixer1234: I agree, up to a point. The moderators are always telling us that duplicates are a good thing, because they provide a greater surface of exposure to the search engines (i.e., more chances that a search will find one of the questions). But there’s the rub: if a user finds one of the questions, and the linkage isn’t obvious (and nobody looks at the lists of “Linked” and “Related” questions — at least not random followers of search results), then the user has found only a fraction of the answers. DavidPostill cast the final vote to reopen this question; maybe you should talk to him.

    – Scott
    Apr 21 '17 at 20:26











  • @Scott — Given that the question asker marked the “How can I view the directory of the archive?” answer as accepted, I have to think that was likely the intent of the question. It is, unfortunately, ambiguously phrased such that it could mean either interpretation.

    – M. Justin
    Apr 21 '17 at 20:38














  • 1





    Duplicity with superuser.com/questions/216617/zip-linux-view-files-in-archive

    – pevik
    Jul 3 '14 at 12:37











  • @fixer1234 (and others): The linked question asks, “How can I view the files in a ZIP archive?” AFAIC, that’s the same question as “How can I see the contents of a file …?” It’s unfortunate that many of the people who answered that question interpreted it as “How can I view the directory of the archive?” However, Gilles’s answer (naturally) and Rajasekhar Tolety’s answer (apparently) to that question provide answers to this question.

    – Scott
    Apr 21 '17 at 19:42








  • 1





    @Scott, maybe we should figure out how to merge the two questions so both topics are covered in one, or refocus the other to clearly be about the directory and then move answers between both places to match the questions. Right now, both are a mishmash.

    – fixer1234
    Apr 21 '17 at 20:12













  • @fixer1234: I agree, up to a point. The moderators are always telling us that duplicates are a good thing, because they provide a greater surface of exposure to the search engines (i.e., more chances that a search will find one of the questions). But there’s the rub: if a user finds one of the questions, and the linkage isn’t obvious (and nobody looks at the lists of “Linked” and “Related” questions — at least not random followers of search results), then the user has found only a fraction of the answers. DavidPostill cast the final vote to reopen this question; maybe you should talk to him.

    – Scott
    Apr 21 '17 at 20:26











  • @Scott — Given that the question asker marked the “How can I view the directory of the archive?” answer as accepted, I have to think that was likely the intent of the question. It is, unfortunately, ambiguously phrased such that it could mean either interpretation.

    – M. Justin
    Apr 21 '17 at 20:38








1




1





Duplicity with superuser.com/questions/216617/zip-linux-view-files-in-archive

– pevik
Jul 3 '14 at 12:37





Duplicity with superuser.com/questions/216617/zip-linux-view-files-in-archive

– pevik
Jul 3 '14 at 12:37













@fixer1234 (and others): The linked question asks, “How can I view the files in a ZIP archive?” AFAIC, that’s the same question as “How can I see the contents of a file …?” It’s unfortunate that many of the people who answered that question interpreted it as “How can I view the directory of the archive?” However, Gilles’s answer (naturally) and Rajasekhar Tolety’s answer (apparently) to that question provide answers to this question.

– Scott
Apr 21 '17 at 19:42







@fixer1234 (and others): The linked question asks, “How can I view the files in a ZIP archive?” AFAIC, that’s the same question as “How can I see the contents of a file …?” It’s unfortunate that many of the people who answered that question interpreted it as “How can I view the directory of the archive?” However, Gilles’s answer (naturally) and Rajasekhar Tolety’s answer (apparently) to that question provide answers to this question.

– Scott
Apr 21 '17 at 19:42






1




1





@Scott, maybe we should figure out how to merge the two questions so both topics are covered in one, or refocus the other to clearly be about the directory and then move answers between both places to match the questions. Right now, both are a mishmash.

– fixer1234
Apr 21 '17 at 20:12







@Scott, maybe we should figure out how to merge the two questions so both topics are covered in one, or refocus the other to clearly be about the directory and then move answers between both places to match the questions. Right now, both are a mishmash.

– fixer1234
Apr 21 '17 at 20:12















@fixer1234: I agree, up to a point. The moderators are always telling us that duplicates are a good thing, because they provide a greater surface of exposure to the search engines (i.e., more chances that a search will find one of the questions). But there’s the rub: if a user finds one of the questions, and the linkage isn’t obvious (and nobody looks at the lists of “Linked” and “Related” questions — at least not random followers of search results), then the user has found only a fraction of the answers. DavidPostill cast the final vote to reopen this question; maybe you should talk to him.

– Scott
Apr 21 '17 at 20:26





@fixer1234: I agree, up to a point. The moderators are always telling us that duplicates are a good thing, because they provide a greater surface of exposure to the search engines (i.e., more chances that a search will find one of the questions). But there’s the rub: if a user finds one of the questions, and the linkage isn’t obvious (and nobody looks at the lists of “Linked” and “Related” questions — at least not random followers of search results), then the user has found only a fraction of the answers. DavidPostill cast the final vote to reopen this question; maybe you should talk to him.

– Scott
Apr 21 '17 at 20:26













@Scott — Given that the question asker marked the “How can I view the directory of the archive?” answer as accepted, I have to think that was likely the intent of the question. It is, unfortunately, ambiguously phrased such that it could mean either interpretation.

– M. Justin
Apr 21 '17 at 20:38





@Scott — Given that the question asker marked the “How can I view the directory of the archive?” answer as accepted, I have to think that was likely the intent of the question. It is, unfortunately, ambiguously phrased such that it could mean either interpretation.

– M. Justin
Apr 21 '17 at 20:38










7 Answers
7






active

oldest

votes


















181














unzip -l archive.zip lists the contents of a ZIP archive to ensure your file is inside.



Use the -c option to write the contents of named files to stdout (screen) without having to uncompress the entire archive.



unzip -c archive.zip file1.txt file2.txt | less



For this kind of operation I always pipe the output to less, otherwise the whole file goes flying up the screen before you can read it.



BTW zcat is great for viewing the contents of .gz files without having to uncompress them first.






share|improve this answer



















  • 7





    At least in Ubuntu, less is somehow configured to do this by default - so less archive.zip actually shows the list of files.

    – aviv
    Mar 24 '13 at 20:30






  • 1





    bzcat for viewing the contents of bz2 files without having to uncompress them first...

    – Justin E
    Nov 12 '14 at 19:37






  • 2





    unzip -c also shows the file name and some extra messages (sending them to stdout). Using -p instead only sends the file in binary format. That's more useful for piping

    – Juan Calero
    Mar 24 '15 at 10:02











  • With your $LESSOPEN set to lesspipe, you can just less foo.gz to view the decompressed contents. (@aviv: this is the same thing that enables less foo.zip to pipe unzip -l foo.zip into itself).

    – Peter Cordes
    Jan 4 '17 at 11:57













  • unzip -c archive.zip '*' | less does what I was looking for: cat the contents of the zip archive.

    – Peter Cordes
    Jan 4 '17 at 11:59



















4














zipinfo is another tool you might use, this is useful if you're on a locked-down system where unzip is not allowed.






share|improve this answer

































    4














    If you're just looking to view images inside the archives, you can use Comix or newer MComix to see images inside .zip, .rar, .cbr, and .cbz files without extracting.






    share|improve this answer

































      1














      Start Emacs in command-line and open your zip files with Zip-Archive mode.
      Without any Emacs/elisp tuning (new users generally fear about), you will see file details like from zipinfo: modes, length, date, time



      Then, you will be able to open files in buffers and even save your changes back to archive, with standard shortcuts:




      • Enter on a file name in list to open it

      • Edit and save with Ctrl-x Ctrl-s

      • Kill buffer Ctrl-k to go back to archive buffer and go on


      When in Zip-Archive buffer, use Ctrl-h m to get all shortcuts available in Help View.



      Hope this may lead you to discover Emacs awesome features






      share|improve this answer































        0














        You can use vim to list content of the zip/rar/tar archive:



        vim archive.zip




        BTW: here is the same question.






        share|improve this answer

































          0














          I've found less archive.zip to be the easiest way to do this.






          share|improve this answer








          New contributor




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
















          • 2





            less archive.zip doesn't show the contents of a zipped file, it only shows the contents of a zipped archive.

            – karel
            yesterday











          • Thanks for the clarification, @karel

            – RobertMyles
            yesterday













          • I think that what you're really trying to do would be the same as danielcraigie's answer.

            – karel
            yesterday



















          -1














          If the file is included in zip archive, that you need to extract only that file from archive (may depend on archive type, some archives can't extract files seperately)






          share|improve this answer
























          • Yes, but you can extract to stdout and pipe right into a pager.

            – Peter Cordes
            Jan 4 '17 at 12:08











          • This is not a technical answer, it is more likely from a politician or a solicitor. Please be more specific! (show the command for example)

            – Hola Soy Edu Feliz Navidad
            Aug 21 '18 at 15:56














          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          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%2fsuperuser.com%2fquestions%2f462788%2fread-the-contents-of-a-zipped-file-without-extraction%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          7 Answers
          7






          active

          oldest

          votes








          7 Answers
          7






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          181














          unzip -l archive.zip lists the contents of a ZIP archive to ensure your file is inside.



          Use the -c option to write the contents of named files to stdout (screen) without having to uncompress the entire archive.



          unzip -c archive.zip file1.txt file2.txt | less



          For this kind of operation I always pipe the output to less, otherwise the whole file goes flying up the screen before you can read it.



          BTW zcat is great for viewing the contents of .gz files without having to uncompress them first.






          share|improve this answer



















          • 7





            At least in Ubuntu, less is somehow configured to do this by default - so less archive.zip actually shows the list of files.

            – aviv
            Mar 24 '13 at 20:30






          • 1





            bzcat for viewing the contents of bz2 files without having to uncompress them first...

            – Justin E
            Nov 12 '14 at 19:37






          • 2





            unzip -c also shows the file name and some extra messages (sending them to stdout). Using -p instead only sends the file in binary format. That's more useful for piping

            – Juan Calero
            Mar 24 '15 at 10:02











          • With your $LESSOPEN set to lesspipe, you can just less foo.gz to view the decompressed contents. (@aviv: this is the same thing that enables less foo.zip to pipe unzip -l foo.zip into itself).

            – Peter Cordes
            Jan 4 '17 at 11:57













          • unzip -c archive.zip '*' | less does what I was looking for: cat the contents of the zip archive.

            – Peter Cordes
            Jan 4 '17 at 11:59
















          181














          unzip -l archive.zip lists the contents of a ZIP archive to ensure your file is inside.



          Use the -c option to write the contents of named files to stdout (screen) without having to uncompress the entire archive.



          unzip -c archive.zip file1.txt file2.txt | less



          For this kind of operation I always pipe the output to less, otherwise the whole file goes flying up the screen before you can read it.



          BTW zcat is great for viewing the contents of .gz files without having to uncompress them first.






          share|improve this answer



















          • 7





            At least in Ubuntu, less is somehow configured to do this by default - so less archive.zip actually shows the list of files.

            – aviv
            Mar 24 '13 at 20:30






          • 1





            bzcat for viewing the contents of bz2 files without having to uncompress them first...

            – Justin E
            Nov 12 '14 at 19:37






          • 2





            unzip -c also shows the file name and some extra messages (sending them to stdout). Using -p instead only sends the file in binary format. That's more useful for piping

            – Juan Calero
            Mar 24 '15 at 10:02











          • With your $LESSOPEN set to lesspipe, you can just less foo.gz to view the decompressed contents. (@aviv: this is the same thing that enables less foo.zip to pipe unzip -l foo.zip into itself).

            – Peter Cordes
            Jan 4 '17 at 11:57













          • unzip -c archive.zip '*' | less does what I was looking for: cat the contents of the zip archive.

            – Peter Cordes
            Jan 4 '17 at 11:59














          181












          181








          181







          unzip -l archive.zip lists the contents of a ZIP archive to ensure your file is inside.



          Use the -c option to write the contents of named files to stdout (screen) without having to uncompress the entire archive.



          unzip -c archive.zip file1.txt file2.txt | less



          For this kind of operation I always pipe the output to less, otherwise the whole file goes flying up the screen before you can read it.



          BTW zcat is great for viewing the contents of .gz files without having to uncompress them first.






          share|improve this answer













          unzip -l archive.zip lists the contents of a ZIP archive to ensure your file is inside.



          Use the -c option to write the contents of named files to stdout (screen) without having to uncompress the entire archive.



          unzip -c archive.zip file1.txt file2.txt | less



          For this kind of operation I always pipe the output to less, otherwise the whole file goes flying up the screen before you can read it.



          BTW zcat is great for viewing the contents of .gz files without having to uncompress them first.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 17 '12 at 11:10









          danielcraigiedanielcraigie

          2,07611010




          2,07611010








          • 7





            At least in Ubuntu, less is somehow configured to do this by default - so less archive.zip actually shows the list of files.

            – aviv
            Mar 24 '13 at 20:30






          • 1





            bzcat for viewing the contents of bz2 files without having to uncompress them first...

            – Justin E
            Nov 12 '14 at 19:37






          • 2





            unzip -c also shows the file name and some extra messages (sending them to stdout). Using -p instead only sends the file in binary format. That's more useful for piping

            – Juan Calero
            Mar 24 '15 at 10:02











          • With your $LESSOPEN set to lesspipe, you can just less foo.gz to view the decompressed contents. (@aviv: this is the same thing that enables less foo.zip to pipe unzip -l foo.zip into itself).

            – Peter Cordes
            Jan 4 '17 at 11:57













          • unzip -c archive.zip '*' | less does what I was looking for: cat the contents of the zip archive.

            – Peter Cordes
            Jan 4 '17 at 11:59














          • 7





            At least in Ubuntu, less is somehow configured to do this by default - so less archive.zip actually shows the list of files.

            – aviv
            Mar 24 '13 at 20:30






          • 1





            bzcat for viewing the contents of bz2 files without having to uncompress them first...

            – Justin E
            Nov 12 '14 at 19:37






          • 2





            unzip -c also shows the file name and some extra messages (sending them to stdout). Using -p instead only sends the file in binary format. That's more useful for piping

            – Juan Calero
            Mar 24 '15 at 10:02











          • With your $LESSOPEN set to lesspipe, you can just less foo.gz to view the decompressed contents. (@aviv: this is the same thing that enables less foo.zip to pipe unzip -l foo.zip into itself).

            – Peter Cordes
            Jan 4 '17 at 11:57













          • unzip -c archive.zip '*' | less does what I was looking for: cat the contents of the zip archive.

            – Peter Cordes
            Jan 4 '17 at 11:59








          7




          7





          At least in Ubuntu, less is somehow configured to do this by default - so less archive.zip actually shows the list of files.

          – aviv
          Mar 24 '13 at 20:30





          At least in Ubuntu, less is somehow configured to do this by default - so less archive.zip actually shows the list of files.

          – aviv
          Mar 24 '13 at 20:30




          1




          1





          bzcat for viewing the contents of bz2 files without having to uncompress them first...

          – Justin E
          Nov 12 '14 at 19:37





          bzcat for viewing the contents of bz2 files without having to uncompress them first...

          – Justin E
          Nov 12 '14 at 19:37




          2




          2





          unzip -c also shows the file name and some extra messages (sending them to stdout). Using -p instead only sends the file in binary format. That's more useful for piping

          – Juan Calero
          Mar 24 '15 at 10:02





          unzip -c also shows the file name and some extra messages (sending them to stdout). Using -p instead only sends the file in binary format. That's more useful for piping

          – Juan Calero
          Mar 24 '15 at 10:02













          With your $LESSOPEN set to lesspipe, you can just less foo.gz to view the decompressed contents. (@aviv: this is the same thing that enables less foo.zip to pipe unzip -l foo.zip into itself).

          – Peter Cordes
          Jan 4 '17 at 11:57







          With your $LESSOPEN set to lesspipe, you can just less foo.gz to view the decompressed contents. (@aviv: this is the same thing that enables less foo.zip to pipe unzip -l foo.zip into itself).

          – Peter Cordes
          Jan 4 '17 at 11:57















          unzip -c archive.zip '*' | less does what I was looking for: cat the contents of the zip archive.

          – Peter Cordes
          Jan 4 '17 at 11:59





          unzip -c archive.zip '*' | less does what I was looking for: cat the contents of the zip archive.

          – Peter Cordes
          Jan 4 '17 at 11:59













          4














          zipinfo is another tool you might use, this is useful if you're on a locked-down system where unzip is not allowed.






          share|improve this answer






























            4














            zipinfo is another tool you might use, this is useful if you're on a locked-down system where unzip is not allowed.






            share|improve this answer




























              4












              4








              4







              zipinfo is another tool you might use, this is useful if you're on a locked-down system where unzip is not allowed.






              share|improve this answer















              zipinfo is another tool you might use, this is useful if you're on a locked-down system where unzip is not allowed.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Aug 1 '14 at 14:38









              Jens Erat

              13k114660




              13k114660










              answered Aug 1 '14 at 14:13









              NickolaiNickolai

              1412




              1412























                  4














                  If you're just looking to view images inside the archives, you can use Comix or newer MComix to see images inside .zip, .rar, .cbr, and .cbz files without extracting.






                  share|improve this answer






























                    4














                    If you're just looking to view images inside the archives, you can use Comix or newer MComix to see images inside .zip, .rar, .cbr, and .cbz files without extracting.






                    share|improve this answer




























                      4












                      4








                      4







                      If you're just looking to view images inside the archives, you can use Comix or newer MComix to see images inside .zip, .rar, .cbr, and .cbz files without extracting.






                      share|improve this answer















                      If you're just looking to view images inside the archives, you can use Comix or newer MComix to see images inside .zip, .rar, .cbr, and .cbz files without extracting.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Nov 29 '14 at 0:32

























                      answered Mar 24 '13 at 20:22









                      KokizzuKokizzu

                      7202922




                      7202922























                          1














                          Start Emacs in command-line and open your zip files with Zip-Archive mode.
                          Without any Emacs/elisp tuning (new users generally fear about), you will see file details like from zipinfo: modes, length, date, time



                          Then, you will be able to open files in buffers and even save your changes back to archive, with standard shortcuts:




                          • Enter on a file name in list to open it

                          • Edit and save with Ctrl-x Ctrl-s

                          • Kill buffer Ctrl-k to go back to archive buffer and go on


                          When in Zip-Archive buffer, use Ctrl-h m to get all shortcuts available in Help View.



                          Hope this may lead you to discover Emacs awesome features






                          share|improve this answer




























                            1














                            Start Emacs in command-line and open your zip files with Zip-Archive mode.
                            Without any Emacs/elisp tuning (new users generally fear about), you will see file details like from zipinfo: modes, length, date, time



                            Then, you will be able to open files in buffers and even save your changes back to archive, with standard shortcuts:




                            • Enter on a file name in list to open it

                            • Edit and save with Ctrl-x Ctrl-s

                            • Kill buffer Ctrl-k to go back to archive buffer and go on


                            When in Zip-Archive buffer, use Ctrl-h m to get all shortcuts available in Help View.



                            Hope this may lead you to discover Emacs awesome features






                            share|improve this answer


























                              1












                              1








                              1







                              Start Emacs in command-line and open your zip files with Zip-Archive mode.
                              Without any Emacs/elisp tuning (new users generally fear about), you will see file details like from zipinfo: modes, length, date, time



                              Then, you will be able to open files in buffers and even save your changes back to archive, with standard shortcuts:




                              • Enter on a file name in list to open it

                              • Edit and save with Ctrl-x Ctrl-s

                              • Kill buffer Ctrl-k to go back to archive buffer and go on


                              When in Zip-Archive buffer, use Ctrl-h m to get all shortcuts available in Help View.



                              Hope this may lead you to discover Emacs awesome features






                              share|improve this answer













                              Start Emacs in command-line and open your zip files with Zip-Archive mode.
                              Without any Emacs/elisp tuning (new users generally fear about), you will see file details like from zipinfo: modes, length, date, time



                              Then, you will be able to open files in buffers and even save your changes back to archive, with standard shortcuts:




                              • Enter on a file name in list to open it

                              • Edit and save with Ctrl-x Ctrl-s

                              • Kill buffer Ctrl-k to go back to archive buffer and go on


                              When in Zip-Archive buffer, use Ctrl-h m to get all shortcuts available in Help View.



                              Hope this may lead you to discover Emacs awesome features







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Sep 10 '14 at 10:20









                              Yves MartinYves Martin

                              450412




                              450412























                                  0














                                  You can use vim to list content of the zip/rar/tar archive:



                                  vim archive.zip




                                  BTW: here is the same question.






                                  share|improve this answer






























                                    0














                                    You can use vim to list content of the zip/rar/tar archive:



                                    vim archive.zip




                                    BTW: here is the same question.






                                    share|improve this answer




























                                      0












                                      0








                                      0







                                      You can use vim to list content of the zip/rar/tar archive:



                                      vim archive.zip




                                      BTW: here is the same question.






                                      share|improve this answer















                                      You can use vim to list content of the zip/rar/tar archive:



                                      vim archive.zip




                                      BTW: here is the same question.







                                      share|improve this answer














                                      share|improve this answer



                                      share|improve this answer








                                      edited Feb 13 at 15:44

























                                      answered Feb 13 at 15:38









                                      patryk.bezapatryk.beza

                                      74221127




                                      74221127























                                          0














                                          I've found less archive.zip to be the easiest way to do this.






                                          share|improve this answer








                                          New contributor




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
















                                          • 2





                                            less archive.zip doesn't show the contents of a zipped file, it only shows the contents of a zipped archive.

                                            – karel
                                            yesterday











                                          • Thanks for the clarification, @karel

                                            – RobertMyles
                                            yesterday













                                          • I think that what you're really trying to do would be the same as danielcraigie's answer.

                                            – karel
                                            yesterday
















                                          0














                                          I've found less archive.zip to be the easiest way to do this.






                                          share|improve this answer








                                          New contributor




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
















                                          • 2





                                            less archive.zip doesn't show the contents of a zipped file, it only shows the contents of a zipped archive.

                                            – karel
                                            yesterday











                                          • Thanks for the clarification, @karel

                                            – RobertMyles
                                            yesterday













                                          • I think that what you're really trying to do would be the same as danielcraigie's answer.

                                            – karel
                                            yesterday














                                          0












                                          0








                                          0







                                          I've found less archive.zip to be the easiest way to do this.






                                          share|improve this answer








                                          New contributor




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










                                          I've found less archive.zip to be the easiest way to do this.







                                          share|improve this answer








                                          New contributor




                                          RobertMyles 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 answer



                                          share|improve this answer






                                          New contributor




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









                                          answered yesterday









                                          RobertMylesRobertMyles

                                          1012




                                          1012




                                          New contributor




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





                                          New contributor





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






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








                                          • 2





                                            less archive.zip doesn't show the contents of a zipped file, it only shows the contents of a zipped archive.

                                            – karel
                                            yesterday











                                          • Thanks for the clarification, @karel

                                            – RobertMyles
                                            yesterday













                                          • I think that what you're really trying to do would be the same as danielcraigie's answer.

                                            – karel
                                            yesterday














                                          • 2





                                            less archive.zip doesn't show the contents of a zipped file, it only shows the contents of a zipped archive.

                                            – karel
                                            yesterday











                                          • Thanks for the clarification, @karel

                                            – RobertMyles
                                            yesterday













                                          • I think that what you're really trying to do would be the same as danielcraigie's answer.

                                            – karel
                                            yesterday








                                          2




                                          2





                                          less archive.zip doesn't show the contents of a zipped file, it only shows the contents of a zipped archive.

                                          – karel
                                          yesterday





                                          less archive.zip doesn't show the contents of a zipped file, it only shows the contents of a zipped archive.

                                          – karel
                                          yesterday













                                          Thanks for the clarification, @karel

                                          – RobertMyles
                                          yesterday







                                          Thanks for the clarification, @karel

                                          – RobertMyles
                                          yesterday















                                          I think that what you're really trying to do would be the same as danielcraigie's answer.

                                          – karel
                                          yesterday





                                          I think that what you're really trying to do would be the same as danielcraigie's answer.

                                          – karel
                                          yesterday











                                          -1














                                          If the file is included in zip archive, that you need to extract only that file from archive (may depend on archive type, some archives can't extract files seperately)






                                          share|improve this answer
























                                          • Yes, but you can extract to stdout and pipe right into a pager.

                                            – Peter Cordes
                                            Jan 4 '17 at 12:08











                                          • This is not a technical answer, it is more likely from a politician or a solicitor. Please be more specific! (show the command for example)

                                            – Hola Soy Edu Feliz Navidad
                                            Aug 21 '18 at 15:56


















                                          -1














                                          If the file is included in zip archive, that you need to extract only that file from archive (may depend on archive type, some archives can't extract files seperately)






                                          share|improve this answer
























                                          • Yes, but you can extract to stdout and pipe right into a pager.

                                            – Peter Cordes
                                            Jan 4 '17 at 12:08











                                          • This is not a technical answer, it is more likely from a politician or a solicitor. Please be more specific! (show the command for example)

                                            – Hola Soy Edu Feliz Navidad
                                            Aug 21 '18 at 15:56
















                                          -1












                                          -1








                                          -1







                                          If the file is included in zip archive, that you need to extract only that file from archive (may depend on archive type, some archives can't extract files seperately)






                                          share|improve this answer













                                          If the file is included in zip archive, that you need to extract only that file from archive (may depend on archive type, some archives can't extract files seperately)







                                          share|improve this answer












                                          share|improve this answer



                                          share|improve this answer










                                          answered Aug 17 '12 at 10:46









                                          bloggerblogger

                                          57026




                                          57026













                                          • Yes, but you can extract to stdout and pipe right into a pager.

                                            – Peter Cordes
                                            Jan 4 '17 at 12:08











                                          • This is not a technical answer, it is more likely from a politician or a solicitor. Please be more specific! (show the command for example)

                                            – Hola Soy Edu Feliz Navidad
                                            Aug 21 '18 at 15:56





















                                          • Yes, but you can extract to stdout and pipe right into a pager.

                                            – Peter Cordes
                                            Jan 4 '17 at 12:08











                                          • This is not a technical answer, it is more likely from a politician or a solicitor. Please be more specific! (show the command for example)

                                            – Hola Soy Edu Feliz Navidad
                                            Aug 21 '18 at 15:56



















                                          Yes, but you can extract to stdout and pipe right into a pager.

                                          – Peter Cordes
                                          Jan 4 '17 at 12:08





                                          Yes, but you can extract to stdout and pipe right into a pager.

                                          – Peter Cordes
                                          Jan 4 '17 at 12:08













                                          This is not a technical answer, it is more likely from a politician or a solicitor. Please be more specific! (show the command for example)

                                          – Hola Soy Edu Feliz Navidad
                                          Aug 21 '18 at 15:56







                                          This is not a technical answer, it is more likely from a politician or a solicitor. Please be more specific! (show the command for example)

                                          – Hola Soy Edu Feliz Navidad
                                          Aug 21 '18 at 15:56




















                                          draft saved

                                          draft discarded




















































                                          Thanks for contributing an answer to Super User!


                                          • 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%2fsuperuser.com%2fquestions%2f462788%2fread-the-contents-of-a-zipped-file-without-extraction%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

                                          Cannot install PyQt5 The Next CEO of Stack OverflowCannot install tcpreplay 3.4.4cannot...

                                          Kapp-Putsch Acontecimentos | Outros artigos | Menu de navegação

                                          Why did early computer designers eschew integers? The Next CEO of Stack OverflowWhat register...