Archive/Compression Commands

Unix 

 Archive/Compression Commands 

tar : The Linux ‘tar’ stands for tape archive, is used to create Archive and extract the Archive files.
Options:
-c : Creates Archive
-x : Extract the archive
-f : creates archive with the given filename
-t : displays or lists files in the archived file
-u : archives and adds to an existing archive file
-v : Displays Verbose Information
-A : Concatenates the archive files
-z : zip, tells tar command that creates tar file using gzip
-j : filter archive tar file using tbzip
-W : Verify an archive file
-r : update or add file or directory in already existed .tar file
What is an Archive file?

An Archive file is a file that is composed of one or more files along with metadata. Archive files are used to collect multiple data files together into a single file for easier portability and storage, or simply to compress files to use less storage space.

tar cvf file.tar *.c → creates verbose file

tar xvf file.tar → extracts verbose file

$ tar xvzf file.tar.gz →  This command compresses and creates archive file less than the

size of the gzip. Both

gzip : used to zip(compress) files, introduced in 1990’s

gzip file1

gunzip : used to unzip(un-compress) files

gunzip file1

Compress :It compresses the file but does not exist in the original file and also it compresses to more size than gzip.

compress file1

Uncompress : uncompress the files

uncompress file1

zcat : used to display information of zipped file

zcat file1

Comments

Popular posts from this blog

Process/Job Control Commands

Information Commands

Miscellaneous and Shell Programing Commands