tar command

Intro

According to wikipedia, tar is a computer software utility for collecting many files into one archive file, often referred to as a tarball, for distribution or backup purposes.

Commands

Extraction

List and search contents of a tar archive

user@host $ tar -tz -f archive.tar.gz

Extract to a specific path

user@host $ tar -xzvf archive.tar.gz -C /a/folder

Extract one or more files

user@host $ tar -xzvf archive.tar.gz "./arch/file01" "./arch/file02"

Creation

Create and compress with lzip a tar archive

root@host:~# apt-get install lzip
user@host $ tar --lzip -cvf archive.tar.lz /a/folder/*

Create a tar archive

user@host $ tar -cvf archive.tar /a/folder/*

Create and compress with gzip a tar archive

user@host $ tar -czvf archive.tar.gz /a/folder/*
Licence Creative Commons
This website http://shebangthedolphins.net is licensed to the public under a licence Creative Commons Attribution licence.
Contact :