What is “tar” ?
tar stands for tape archive.
A group of files and directories can be combined using the tar command to create a highly compressed archive file known as a tarball or as tar, gzip, or bzip in Linux.
How to tar ?
In this example we will create a tar archive file webwithmi.tar for a directory /home/webwithmi in the current working directory.
Here webwithmi contains the following files and directories
Using the below command we can create a tar archive file.
Here
- c - Creates a new .tar archive file.
- v - Show the .tar file progress
- f - File name type of archive file
To Create tar.gz file
To create a compressed gzip archive file we use the option as z.
Note: tar.gz and tgz both are similar
To Create tar.bz2 file
Bz2 is a feature that compresses data and produces an archive file that is smaller than gzip. Compared to gzip, which takes less time, bz2 compression takes longer to compress and decompress files.
Comments
Post a Comment