[Top] [Contents] [Index] [ ? ]

GNU tar: an archiver tool

This manual is for GNU tar (version 1.32, 4 February 2019), which creates and extracts files from archives.

Copyright © 1992, 1994-1997, 1999-2001, 2003-2017 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document

under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License", with the Front-Cover Texts being "A GNU Manual", and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled "GNU Free Documentation License".

(a) The FSF's Back-Cover Text is: "You have the freedom to copy and modify this GNU manual."

The first part of this master menu lists the major nodes in this Info document. The rest of the menu lists all the lower level nodes.

1. Introduction


2. Tutorial Introduction to tar


3. Invoking GNU tar


4. GNU tar Operations


5. Performing Backups and Restoring Files


6. Choosing Files and Names for tar


7. Date input formats


8. Controlling the Archive Format


9. Tapes and Other Archive Media


10. Reliability and Security


A. Changes


B. Recipes


Frequently used tar recipes

C. Configuring Help Summary


D. Fixing Snapshot Files


E. Tar Internals


F. Genfile


G. Free Software Needs Free Documentation


H. GNU Free Documentation License


I. Index of Command Line Options


J. Index


1.1 What this Book Contains


1.2 Some Definitions


1.3 What tar Does


1.4 How tar Archives are Named


1.5 GNU tar Authors


1.6 Reporting bugs or suggestions


2.1 Assumptions this Tutorial Makes


2.2 Stylistic Conventions


2.3 Basic tar Operations and Options


2.4 The Three Most Frequently Used Operations


2.5 Two Frequently Used Options


2.6 How to Create Archives


2.7 How to List Archives


2.8 How to Extract Members from an Archive


2.9 Going Further Ahead in this Manual


The `--file' Option


The `--verbose' Option


Getting Help: Using the `--help' Option


2.6.1 Preparing a Practice Directory for Examples


2.6.2 Creating the Archive


2.6.3 Running `--create' with `--verbose'


2.6.4 Short Forms with `create'


2.6.5 Archiving Directories


Listing the Contents of a Stored Directory


2.8.1 Extracting an Entire Archive


2.8.2 Extracting Specific Files


2.8.3 Extracting Files that are Directories


2.8.4 Extracting Archives from Untrusted Sources


2.8.5 Commands That Will Fail


3.1 General Synopsis of tar


3.2 Using tar Options


3.3 The Three Option Styles


3.4 All tar Options


3.5 GNU tar documentation


3.6 Obtaining GNU tar default values


3.7 Checking tar progress


3.8 Checkpoints


3.9 Controlling Warning Messages


3.10 Asking for Confirmation During Operations


3.3.1 Long Option Style


3.3.2 Short Option Style


3.3.3 Old Option Style


3.3.4 Mixing Option Styles


3.4.1 Operations


3.4.2 tar Options


3.4.3 Short Options Cross Reference


3.4.4 Position-Sensitive Options


4.1 Basic GNU tar Operations


4.2 Advanced GNU tar Operations


4.3 Options Used by `--create'


4.4 Options Used by `--extract'


4.5 Backup options


4.6 Looking Ahead: The Rest of this Manual


4.2.1 The Five Advanced tar Operations


4.2.2 How to Add Files to Existing Archives: `--append'


4.2.3 Updating an Archive


4.2.4 Combining Archives with `--concatenate'


4.2.5 Removing Archive Members Using `--delete'


4.2.6 Comparing Archive Members with the File System Appending Files to an Archive Multiple Members with the Same Name How to Update an Archive Using `--update'


4.3.1 Overriding File Metadata


4.3.2 Extended File Attributes


4.3.3 Ignore Failed Read


4.4.1 Options to Help Read Archives


4.4.2 Changing How tar Writes Files


4.4.3 Coping with Scarce Resources


Reading Full Records


Ignoring Blocks of Zeros


Options Controlling the Overwriting of Existing Files


Overwrite Old Files


Keep Old Files


Keep Newer Files


Unlink First


Recursive Unlink


Setting Data Modification Times


Setting Access Permissions


Directory Modification Times and Permissions


Writing to Standard Output


Writing to an External Program


Removing Files


Starting File


Same Order


5.1 Using tar to Perform Full Dumps


5.2 Using tar to Perform Incremental Dumps


5.3 Levels of Backups


5.4 Setting Parameters for Backups and Restoration


5.5 Using the Backup Scripts


5.6 Using the Restore Script


5.4.1 General-Purpose Variables


5.4.2 Magnetic Tape Control


5.4.3 User Hooks


5.4.4 An Example Text of `Backup-specs'


6.1 Choosing and Naming Archive Files


Choosing the Archive's Name

6.2 Selecting Archive Members


6.3 Reading Names from a File


6.4 Excluding Some Files


6.5 Wildcards Patterns and Matching


6.6 Quoting Member Names


Ways of Quoting Special Characters in Names

6.7 Modifying File and Member Names


6.8 Operating Only on New Files


6.9 Descending into Directories


6.10 Crossing File System Boundaries


6.3.1 NUL-Terminated File Names


Problems with Using the exclude Options


Controlling Pattern-Matching


6.10.1 Changing the Working Directory


Changing Directory

6.10.2 Absolute File Names


7.1 General date syntax


Common rules.

7.2 Calendar date items


19 Dec 1994.

7.3 Time of day items



7.4 Time zone items



7.6 Day of week items


Monday and others.

7.7 Relative items in date strings


next tuesday, 2 years ago.

7.8 Pure numbers in date strings


19931219, 1440.

7.9 Seconds since the Epoch



7.10 Specifying time zone rules


TZ="America/New_York", TZ="UTC0".

7.11 Authors of parse_datetime


Bellovin, Eggert, Salz, Berets, et al.

8.1 Using Less Space through Compression


8.2 Handling File Attributes


8.3 Making tar Archives More Portable


8.4 Comparison of tar and cpio


8.1.1 Creating and Reading Compressed Archives


8.1.2 Archiving Sparse Files Using lbzip2 with GNU tar.


8.3.1 Portable Names


8.3.2 Symbolic Links


8.3.3 Hard Links


8.3.4 Old V7 Archives


8.3.5 Ustar Archive Format


Ustar Archives

8.3.6 GNU and old GNU tar format


GNU and old GNU format archives.

8.3.7 GNU tar and POSIX tar


POSIX archives

8.3.8 Checksumming Problems


8.3.9 Large or Negative Values


Large files, negative time stamps, etc.

8.3.10 How to Extract GNU-Specific Data Using Other tar Implementations Controlling Extended Header Keywords Extracting Members Split Between Volumes


Members Split Between Volumes Extracting Sparse Members


Sparse Members

9.1 Device Selection and Switching


Device selection and switching

9.2 Remote Tape Server


9.3 Some Common Problems and their Solutions


9.4 Blocking


9.5 Many Archives on One Tape


Many archives on one tape

9.6 Using Multiple Tapes


9.7 Including a Label in the Archive


9.8 Verifying Data as It is Stored


9.9 Write Protection


9.4.1 Format Variations


9.4.2 The Blocking Factor of an Archive


9.5.1 Tape Positions and Tape Marks


9.5.2 The mt Utility


9.6.1 Archives Longer than One Tape or Disk


9.6.2 Tape Files


9.6.3 Concatenate Volumes into a Single Archive


Basic Tar Format


GNU Extensions to the Archive Format


Storing Sparse Files


Format of the Incremental Snapshot Files




E.0.1 Old GNU Format


E.0.2 PAX Format, Versions 0.0 and 0.1


E.0.3 PAX Format, Version 1.0


F.1 Generate Mode


File Generation Mode.

F.2 Status Mode


File Status Mode.

F.3 Exec Mode


Synchronous Execution mode.

H. GNU Free Documentation License


License for copying this manual

[Top] [Contents] [Index] [ ? ]

This document was generated on February, 23 2019 using texi2html 1.76.