Jan 28, 2009

Creating/Extracting Unix/Linux tarball archive files on Windows System

Tar File Format


Tar file is a Unix/Linux System archive file format which not be supported by Windows System. The format was standardized by POSIX.1-1988 and later POSIX.1-2001.

A tar file (somefile.tar), when subsequently compressed using a compression utility such as gzip, bzip2, lzma or compress, produces a compressed tar file with a filename extension indicating the type of compression (e.g.: somefile.tar.gz). A .tar file is commonly referred to as a tarball, which then is usually compressed to save disk space.

Naming of tar archive files


Conventionally, uncompressed tar archive files have names ending in ".tar". If an archive is compressed with an external tool, the compression program adds its own suffix as usual, resulting in filename endings like ".tar.Z", ".tar.gz", and ".tar.bz2".
MS-DOS's 8.3 filename limitations resulted in a second set of conventions appearing for storing compressed tar archives on an MS-DOS file system:
".tgz" is equivalent to ".tar.gz".
".tbz" (or ".tbz2" or ".tb2") is equivalent to ".tar.bz2".
".taz" is equivalent to ".tar.Z",
These shortened filename suffixes are still in common use.


Create/Extract Tar file on Windows System



By default, Windows can not create/extract tar file format. You can do this by using WinTar. WinTar is a simple 32-bit Windows version tarball archiver - a powerful tool which allows windows users to create, manage and extract most popular Unix/Linux tarball and windows format archive files. WinTar is simple and easy to use.

WinTar introduction: http://www.miscosoftware.com/WinTar/wintar.htm
Downlod page:http://www.miscosoftware.com/WinTar/store/WinTar.exe

WinTar can create and read several different archive formats, including most popular tar variants, several cpio formats, and both BSD and GNU ar variants. It also can write shar archives and read ISO9660 CDROM images. CAB and ZIP archives are supported.
When WinTar has been installed on Windows, run it on the desktop.

Create Tar file:

When WinTar is running, it displays a list of files and folders in the current folder. Navigate to the folder that you want to add files and folders to the archive. After you select the files and folders and then do the following:

  • Select menu File New archive and then select the archive file format from the popup menu, e.g. Tar file.
    or
  • Click the main toolbar button New popup tag. When the popup menu displayed, select the target archive file format.

These two methods will display the New Achive dialog. Navigate the folder you want to save the archive file, enter the archive file name in the File Name text box. At this point, you also have a chance to select the target archive format at the next Save File Type and Archive Format combo boxes. You may select the compression method from the Compression combo Box, e.g. gzip,bzip2 or leave it as Using global options. Select None method, the archive will perform but do not apply compression, including Zip and CAB archive.

After click the OK button at the New Archive dialog, If you have selected files and/or folders on the first step, the Archive File Option dialog will display (the Globle Options controls this behavior).


After select some archive options and click OK button, the archive process starts.

Extract Tar file:

In order to extract files using WinTar you must first open the required archive or select the archive file in File List pane window. This may be achieved in one of several ways:

  • Target the archive file in the file list pane and select the archive file.
  • Double-click or press Enter on the archive name in Windows shell (Explorer or Desktop). If WinTar was associated with archives, an archive will be opened in WinTar. You may associate WinTar with archives after installation using File Association dialog;
  • Double-click or press Enter on the archive name in WinTar window;
  • Run WinTar from the command line with a single parameter - the archive name.

If an archive is opened in WinTar, its contents are displayed. Select files and folders, which should be extracted. You may do this using Shift + arrow keys or Shift + left mouse button as in Windows Explorer and other Windows programs.


Having selected one or more files, select File Extract Archive menu or click Extract to button at the main toolbar, or press Alt+E , enter the destination folder in the dialog box and click on OK. This dialog box also offers a few advanced options for archive extraction.


After setting the advanced option, archive extrcting will start.


Other Articles


Creating/Extracting Zip archive files using WinTar

Creating/Extracting CAB archive file

Creating Unix/Linux Shar archive files on Windows System

Extracting files from ISO image file

How to create/extract CPIO archive files on Windows

Create Unix Pax archive files on MS Windows system