Tar is command which can be used to extract, create , modify or maintain the file that are archived in tar format.
I recommended following basic argument must be remembered as beginner programmer to deal with compressed file.
is used to create new archive file
x, –extract, –get
is used to extract from archive file
Use archive file (or device) ARCHIVE.
to read or write archives using the bzip2 compressor.
to read or write archives using the xz compressor.
-z, –gzip, –gunzip
to read or write archives through gzip
-Z, –compress, –uncompress
use the compress program when operating on files.
So these are the some of the basic command argument which is frequently used with tar function.
In linux single dash(–) is used with single letter and with full function name double dash(—) is used.Value can be assigned(=) to full funcation name only like
tar --create --file=archive.tar file1 file2
from above all arguments , lets take example of first argument
here both are same , any one can be used to create archive
i.e tar -c file
i.e tar –create file
for other arguments rules will be same.
So i think you guys now able to play with compressed files. 🙂