Blog Image

How to create tar archive file in linux

The below command will create a tar archive file whatevername_yougive.tar for a directory /path/of/directory/to/archive in current working directory.

See the example below.

tar cvf whatevername_yougive.tar /path/of/directory/to/archive

The options detail are explained as below
c – Creates a new .tar archive file.
v – Verbosely show the .tar file progress.
f – File name type of the archive file.

Similarly to create tar.gz file

tar cvzf whatevername_yougive.tar.gz /path/of/directory/to/archive

To untar or uncompress a tar file check here



Author: admin

Vinod Ram has been in Software Industry since 2006 and has experience of over 16 years in Software Development & Project Management domain specialised majorly in LAMP stack & Open Source Technology, building enterprise level Web based Application, Large Database driven and huge traffic Websites and Project Management. He loves to write information articles and blog to share his knowledge and experience with the outside world and help people to find solution for their problems.