Loading ...
Sorry, an error occurred while loading the content.

Compressing files

Expand Messages
  • dr_ovalle
    I have two files I use each time I reinstall my system, in order to make wifi working. I d like to compress these files in a single archive to store it in a
    Message 1 of 4 , Mar 1 8:36 AM
    • 0 Attachment
      I have two files I use each time I reinstall my system, in order to
      make wifi working. I'd like to compress these files in a single
      archive to store it in a USB pen and make it easier to use these files
      (they are hard to find these days, and the updates of those files
      simply do not work in my laptop), and it would be easier for me too,
      to make a sequence to decompress this single archive and use these files.

      I opened a terminal and typed: tar --help
      I think, I have to use tar -cfz to do that.

      Does any of you know if is this correct, or where can I find more info
      to do this?

      Thank you.
    • Scott
      ... The tar man page is a bit rough for a beginner. Of course, most Linux man pages are horrible--I think they were all written by academics for other
      Message 2 of 4 , Mar 1 1:07 PM
      • 0 Attachment
        On Sat, Mar 01, 2008 at 04:36:19PM -0000, dr_ovalle wrote:
        > I have two files I use each time I reinstall my system, in order to
        > make wifi working. I'd like to compress these files in a single
        > archive to store it in a USB pen and make it easier to use these files
        > (they are hard to find these days, and the updates of those files
        > simply do not work in my laptop), and it would be easier for me too,
        > to make a sequence to decompress this single archive and use these files.
        >
        > I opened a terminal and typed: tar --help
        > I think, I have to use tar -cfz to do that.
        >
        > Does any of you know if is this correct, or where can I find more info
        > to do this?

        The tar man page is a bit rough for a beginner. Of course, most Linux
        man pages are horrible--I think they were all written by academics for
        other academics, with a contest of who can make the most obscure man
        page. :) So, don't feel badly.

        I have a page on this at
        http://home.nyc.rr.com/computertaijutsu/tarball.html which has a bit on
        it (though it's mostly about decompressing.) :)

        So, you would probably want, assuming they were in a directory called
        drivers....

        (Note that you don't need the hyphens with tar, so I leave them out to
        seem more elite) :).


        tar cf drivers.tar drivers

        That will create a tarball. If you want to compress them as well,
        assuming you're using standard gzip, then your command would do. Just
        be sure to name it tar.gz, e.g.,
        tar zcf drivers.tar.gz drivers

        Then to unpack it when needed

        tar zxvf drivers.tar.gz

        which will give you a directory called drivers.

        If you want to use bunzip2 instead of gunzip (probably no advantage
        though)

        To compress:
        tar jcf drivers.tar.bz2 drivers

        To unpack

        tar jxvf drivers.tar.bz2


        --
        Scott Robbins
        PGP keyID EB3467D6
        ( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
        gpg --keyserver pgp.mit.edu --recv-keys EB3467D6

        Angel: This isn't some fairy tale. When I kiss you... you don't
        wake up from a deep sleep and live happily ever after.
        Buffy: No... when you kiss me, I wanna die.
      • dr_ovalle
        Thank you very much ! This is exactly what I wanted to do. Now I have to write a set of instructions than do all the dirty job for me. (Maybe I ll reinstall
        Message 3 of 4 , Mar 1 1:34 PM
        • 0 Attachment
          Thank you very much !
          This is exactly what I wanted to do.
          Now I have to write a set of instructions than do all the dirty job
          for me. (Maybe I'll reinstall again and see if the set of instructions
          work)

          One more question:
          when I start a terminal, the shell prompts:
          arturo@Frankenstein:~$

          I assume ~ means /home/arturo/ in my machine...

          So, if I write:
          cp ~/drivers.gz would be exactly the same as:
          cp /home/arturo/drivers.gz

          Is that correct?
        • Scott
          ... That is correct, the ~ represents your home directory. Another minor trick, if you, from anywhere on the system, do cd You re back in your home directory.
          Message 4 of 4 , Mar 1 1:50 PM
          • 0 Attachment
            On Sat, Mar 01, 2008 at 09:34:50PM -0000, dr_ovalle wrote:
            > Thank you very much !
            > This is exactly what I wanted to do.
            > Now I have to write a set of instructions than do all the dirty job
            > for me. (Maybe I'll reinstall again and see if the set of instructions
            > work)
            >
            >
            > So, if I write:
            > cp ~/drivers.gz would be exactly the same as:
            > cp /home/arturo/drivers.gz
            >
            > Is that correct?

            That is correct, the ~ represents your home directory. Another minor
            trick, if you, from anywhere on the system, do

            cd

            You're back in your home directory.

            There is a list faq which while dated (because no one seems to read it
            anymore, I don't maintain it) might have other useful stuff.

            http://home.nyc.rr.com/computertaijutsu/linfaq.html


            Giles: I'll have you know that I have very, um, many
            relaxing hobbies.
            Buffy: Such as?
            Giles: Well, um...I enjoy cross-referencing.
            Buffy: Do you stuff your own shirts or do you send 'em out?
          Your message has been successfully submitted and would be delivered to recipients shortly.