In this data driven world, data is generated in every second. There is always need the data to use it in future for some analytics or processing.

What is tar?

tar is an data backup and recovery tool in unix systems.

You can archive files into single archive also restore individual files from archives using tar.

.tar is extension of archived files using tar tool

Syntax

tar -opt <file>
#opt is option
#<file> can be appended with files

Options

-c : create
-t : list all files
-x : extract all
-v : verbose
-z : create a zip file
-r : append

Some more options

-cvf  : create tar archive from files
-tvf  : list all files in archive.tar
-xf   : extract all files from archive.tar
-cvzf : create a compressed gzip archive file
-rvf  : append a file to existing archive

Example

tar -cvf app_file.tar /home/file/app
# app_file.tar - name of file created
# /home/file/app - location of file/files to be archived

Hope it helps!

Happy learning and Merry Christmas 🙂

Leave a Reply