Extract TAR, create TAR - A guide for Windows and Linux

+2 votes

Please, make a cue-card instruction on working with TAR archiver, enabling to copy the necessary command quickly any time.
Thank you!

asked Aug 5, 2016 in Computers by Frank

1 Answer

0 votes

Good day to you!
First things – first: only the key information you are looking for. In the second part of the article, I will tell you about the useful peculiarities, which you can easily do without.

How to extract the TAR archive:

For Windows:

You can extract tar, using any of the modern Windows archivers, for example, 7-Zip. Details on installing and using 7-Zip you can find in our special article: Download an archiving program for Windows (free and the best)

For Linux/Unix systems:

  1. Using MC (Midnight Commander – a popular file manager for Linux systems, included in every repository) – just open a tar-file as a folder and copy all its contents. 
  2. From the control console, using the following commands:
tar -xvf archive-file.tar
tar -xvf archive-file.tar.gz
tar -xvf archive-file.tar.bz2
tar -xvf archive-file.tar -C /folder

Description: x – the key, determining that the archive needs unpacking; v – starts the visual display of unpacking process; f – the key, followed by the name of the file that requires unpacking; C – you can (but don’t have to) determine the unpacking path. If the path is not determined – the file will be unpacked into the current folder.

How to create TAR:

For Linux/Unix systems:

tar -cf files.tar ./folder_with_files – create a common tar archive without compression
tar -cvzf files.tar.gz ./folder_with_files - create tar archive, compressed, using gzip
tar -cvjf files.tar.bz ./folder_with_files - create tar archive, compressed, using bzip2

The keys: c – create an archive; f – determine a file name; z - use gzip compression (the most popular); j - use bzip2 compression; v - starts the visual display of unpacking process;

For Windows:

Using a free archiver 7-Zip (the article about it: Download an archiving program for Windows (free and the best)).
1. Click a folder or selected files with the right mouse button, select “7-Zip” from the menu -> “Add to archive...”:
How to create TAR in Windows

2. Choose the archive format - tar, change the archive name and other settings if necessary and click “Ок”:

Creating TAR archive properties

Useful information about Tar archiver:

Tar – the main archiver for Linux and Unix systems. If you create an archive for such a system, it’s advisable to use tar. Although they support Zip as well, it operates far too slowly and is not used in many systems.
If any compression facilities are used, when creating a tar archive, they are usually stated in the file name. For example, files.tar.gz - the tar archive, which has been created, using gzip compression, files.tar.bz2 - the tar archive, in which bzip2 compression has been used.
If you have any questions left or need some more details – please, ask a question or leave a comment.

I will always be pleased to help you!
Good luck to you!

answered Aug 5, 2016 by Expert Brian (5,410 points)
Welcome to Help Desk, here you can ask any questions and receive answers from our experts and other members of the community.

If you have any questions, please do not hesitate to contact our help desk!

Make a question!