Beginner terminal: zip and unzip files in rar

In the following video-tutorial included in a series of videos for beginners, we are going to make a practical example of how to manage rar files from the terminal of our Linux operating system, in this case from Ubuntu.

The exercise is designed for beginners in this operating system, and following all the steps, we will get ourselves, first install the necessary packages to compress and decompress files in rare, and then through the Practical exercise zip and unzip them without any problem.

For this exercise to bear fruit, it is convenient that while we follow the video tutorial, we go doing the exercise ourselvesIn this way and with practice, we can best keep the concepts of what we are doing.

Beginner terminal: zip and unzip files in rar

The commands what are we going to use in this practical exerciseor are the following:

To install rar:

  • sudo apt-get install rar

To install unrar:

  • sudo apt-get install unrar

If this order will report some kind of problem, which happened to me, we will add at the end –Fix-missing remaining in this way:

  • sudo apt-get install unrar --fix-missing

To compress files we will use the command:

  • weird filename.rar files to include
  • weird filename.rar *

With the first command we will add the files one by one, and with the second we will include All the files that are within the directory in which we are.

If what we want is to compress by adding a Password  to the .rar file, we will add -p at the end of one of the two orders.

Linux terminal

For decompress it will be as simple as using the command Unrar:

  • unrar x rar_name.rar
  • unrar x name_del_rar.rar path where we want to unzip it

With the first order we will unzip it in the directory that we are and with the second we will tell it the directory in which we want it to unzip.

Although it may seem like a mess, if you do the exercise yourself and see the video-tutorial created for this purpose, surely everything is much clearer, and in a couple of times that you repeat it, you will surely have the basic concepts very clear.

More information - Terminal for beginners: Video-tutorial I


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   gerardo said

    Thank you very much it helped me a lot just to clarify that if we need to compress the content of a directory from another path, do it like this:
    rar on behalf of rar.rar / home / user / photos / *
    I used it to cbrs

  2.   Cristopher said

    Thank you very much for the tip, Francisco! One question, how to exclude certain files or directories that are inside the directory that I want to compress in .rar? I appreciate your answer, greetings!

    1.    Leon S. said

      The answer is somewhat late but it will serve whoever requires it. Within that same directory you must create the rar indicating which files it is going to compress, very similar if you did it graphically by marking the files with the CTRL or SHIFT key.

  3.   Pedro said

    Thank you very much Francisco has helped me a lot because I tried to unzip a psp game without the terminal and it gave me the following: An error occurred while extracting the files.
    Invalid PPmd sequence.

    With the terminal I have been able to unzip it without problems.

  4.   louis galarza said

    excellent to start

  5.   Frank27 said

    thanks for the contribution ... 🙂

  6.   drintlife said

    Excellent I solve the problem

  7.   Leon S. said

    For those who want to decompress a rar divided into several parts, for example: book.part1.rar, book.part2.rar, ... simply add an asterisk on the command line like this: unrar x book.part * .rar