Linux Headquarters

I've installed Linux… now what???

tar: Tape Archive Files

Introduction

TAR stands for Tape ARchive. It was originally designed for tape backups. Hence, the word tape in the name. It can now be used to create a tar file anywhere on the filesystem. TAR creates one “tar file” out of several files and directories keeping the absolute paths if wanted. It is important to know that it does not compress the files in any way. Thus, the TAR file will take up the same amount of space as all the individual files combined. A TAR file can be compressed by using gzip or bzip2.

Basic TAR Syntax

The syntax for TAR is as follows: tar -switches tarfile.tar where tarfile.tar is the name of the tar file.
Commonly Used TAR Switches

Switch Explanation
x Extract the contents of the TAR file
c Create a TAR file
z Gunzip(uncompress) it before extracting, used on file ending in .tar.gz or .tgz
v Verbose – display contents as it is tarring or extracting
f Filename to follow
t List contents of TAR file

Examples

Example Explanation
tar -xvf example.tar Extract the contents of example.tar and display the files as they are extracted
tar -cf backup.tar /home/ftp/pub Create a TAR file named backup.tar from the contents of the directory /home/ftp/pub
tar -zxvf example.tgz Gunzip(uncompress) example.tgz and then extract the contents displaying the files as they are extracted
tar -tvf example.tar List contents of example.tar to the screen

What is Related

Comments are closed.

Subscribe to email feed

  • RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube

Dedicated Linux Serv

Linux is the popular system nowadays, offering all the benefits ...

StarOffice 5.1

Introduction StarOffice 5.1 is a complete office suite with a word ...

AxY FTP

Introduction AxY FTP, formerly known as wxFTP, is a graphical FTP ...

Adobe Acrobat PDF Re

Introduction Many of you are probably familar with Adobe Acrobat Reader ...

Macromedia Shockwave

Introduction Macromedia has developed a version of its popular Shockwave plugin ...

Twitter updates