[Linux command] Tar

tar command example

 

Create tar.gz Archive File

  1. c – Creates a new .tar archive file.
  2. v – Verbosely show the .tar file progress.
  3. f – File name type of the archive file.
  4. z – gzip.

Example :

tar cvzf theNameOfTarFile.tar.gz /pathIWantToPut
# OR
tar cvzf theNameOfTarFile.tgz /pathIWantToPut

 

Untar tar Archive File

  1. C – specified directory.
## Untar files in specified Directory ##
tar -xvf theNameOfTarFile.tar.gz -C /pathIWantToPut

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s