OPERATING SYSTEMSOS Linux

How to create,extract,compress tar files in linux ubuntu [ Explained ]

What are tar files in linux ?

The Linux “tar” stands for tape archive, which is used by large number of Linux/Unix system administrators to deal with tape drives backup. The tar command used to rip a collection of files and directories into highly compressed archive file commonly called tarball or tar, gzip and bzip in Linux. The tar is most widely used command to create compressed archive files and that can be moved easily from one disk to another disk or machine to machine.

Tar

Tar is used to create the archive of any folder or partition, so that huge data under various directories & files can be stored as single file. Tar is generally used to store the data on tape drives in production environment.

Creating a tarball :-

#tar -cvf etc.tar /etc {-c is used to create tar, -v is verbose and -f is file name. Here we are creating tar of /etc directory with name etc.tar}

#tar -tvf etc.tar {View data under any tar file}
#du -sh etc.tar {This command will show the size}
#tar -xvf etc.tar {Extracting etc.tar, you need to change your pwd, where u want to extract the tar}
===========================================================================

Zip
—-

#gzip -v etc.tar {Used to compress the archive file}
#du -sh etc.tar.gz {Command will show the size after compression}
#gunzip -v etc.tar.gz {Uncompress the file}

Bzip2
—–

#bzip2 -v etc.tar.gz {Advanced compression utility}
#du -sh etc.tar.gz.bz2
#bunzip2 -v etc.tar.gz.bz2

————————————————————————————————–
Website Link :-

http://letslearntech.com

Ubuntu tutorials for beignners playlist :-

————————————————————————————————–

Basic Terminal commands in linux : –

——————————————————————————————————

how to reset / recover password in ubuntu 16.04 (100 % working) :-

—————————————————————————————————–

How to complie and run c,c++ programs in linux ubuntu : –

—————————————————————————————————

How to create bootable usb/pen drive in linux ubuntu :-

————————————————————————————————–

how to create samba server in ubuntu linux : –

—————————————————————————————————-

How to install ubuntu linux in vmware : –

—————————————————————————————————–

How to format usb drive in linux ubuntu :-

———————————————————————————————————–

Like us on Facebook :-

https://www.facebook.com/AndroidandTechSolutions/?fref=ts

—————————————————————————————————
tags : –
how to untar tar.gz file in linux extract tar file windows how to zip a directory in linux create tar.gz file linux how to tar a file in linux gzip command in linux tar compress folder tar.gz linux create tar file gzip linux gzip command in linux how to zip a directory in linux create gz file linux how to gzip a file in windows create tar.gz file linux gzip directory linux gzip multiple files how to tar a file in linux bzip2 command in linux with examples bzip2 compress directory bzip2 linux install bzip2 decompress bunzip2 command in linux bzip2 multiple files bzip2 keep original file bzip2 multiple files into onetar file linux winzip tar how to open tar.gz file in linux how to open tar.gz file in windows 10 how to extract tar gz file in windows command line 7zip tar extract tar file windows

source

ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *