1 1 GNU tar: an archiver tool 1 ************************* 1 1 This manual is for GNU 'tar' (version 1.30, 8 December 2022), which 1 creates and extracts files from archives. 1 1 Copyright (C) 1992, 1994-1997, 1999-2001, 2003-2017 Free Software 1 Foundation, Inc. 1 1 Permission is granted to copy, distribute and/or modify this 1 document under the terms of the GNU Free Documentation License, 1 Version 1.3 or any later version published by the Free Software 1 Foundation; with the Invariant Sections being "GNU General Public 1 License", with the Front-Cover Texts being "A GNU Manual", and with 1 the Back-Cover Texts as in (a) below. A copy of the license is 1 included in the section entitled "GNU Free Documentation License". 1 1 (a) The FSF's Back-Cover Text is: "You have the freedom to copy and 1 modify this GNU manual." 1 1 The first part of this master menu lists the major nodes in this Info 1 document. The rest of the menu lists all the lower level nodes. 1
1 · Introduction · Tutorial · tar invocation · operations · Backups · Choosing · Date input formats · Formats · Media · Reliability and security 1 1 Appendices 1 · Changes · Recipes Frequently used tar recipes · Configuring Help Summary · Fixing Snapshot Files · Tar Internals · Genfile · Free Software Needs Free Documentation · GNU Free Documentation License · Index of Command Line Options · Index 1 1 -- The Detailed Node Listing -- 1 1 Introduction 1 · Book Contents What this Book Contains · Definitions Some Definitions · What tar Does What 'tar' Does · Naming tar Archives How 'tar' Archives are Named · Authors GNU 'tar' Authors · Reports Reporting bugs or suggestions 1 1 Tutorial Introduction to 'tar' 1 · assumptions · stylistic conventions · basic tar options Basic 'tar' Operations and Options · frequent operations · Two Frequent Options · create How to Create Archives · list How to List Archives · extract How to Extract Members from an Archive · going further 1 1 Two Frequently Used Options 1 · file tutorial · verbose tutorial · help tutorial 1 1 How to Create Archives 1 · prepare for examples · Creating the archive · create verbose · short create · create dir 1 1 How to List Archives 1 · list dir 1 1 How to Extract Members from an Archive 1 · extracting archives · extracting files · extract dir · extracting untrusted archives · failing commands 1 1 Invoking GNU 'tar' 1 · Synopsis · using tar options · Styles · All Options · help · defaults · verbose · checkpoints · warnings · interactive 1 1 The Three Option Styles 1 · Long Options Long Option Style · Short Options Short Option Style · Old Options Old Option Style · Mixing Mixing Option Styles 1 1 All 'tar' Options 1 · Operation Summary · Option Summary · Short Option Summary · Position-Sensitive Options 1 1 GNU 'tar' Operations 1 · Basic tar · Advanced tar · create options · extract options · backup · looking ahead 1 1 Advanced GNU 'tar' Operations 1 · Operations · append · update · concatenate · delete · compare 1 1 How to Add Files to Existing Archives: '--append' 1 · appending files Appending Files to an Archive · multiple 1 1 Updating an Archive 1 · how to update 1 1 Options Used by '--create' 1 · override Overriding File Metadata. · Extended File Attributes · Ignore Failed Read 1 1 Options Used by '--extract' 1 · Reading Options to Help Read Archives · Writing Changing How 'tar' Writes Files · Scarce Coping with Scarce Resources 1 1 Options to Help Read Archives 1 · read full records · Ignore Zeros 1 1 Changing How 'tar' Writes Files 1 · Dealing with Old Files · Overwrite Old Files · Keep Old Files · Keep Newer Files · Unlink First · Recursive Unlink · Data Modification Times · Setting Access Permissions · Directory Modification Times and Permissions · Writing to Standard Output · Writing to an External Program · remove files 1 1 Coping with Scarce Resources 1 · Starting File · Same Order 1 1 Performing Backups and Restoring Files 1 · Full Dumps Using 'tar' to Perform Full Dumps · Incremental Dumps Using 'tar' to Perform Incremental Dumps · Backup Levels Levels of Backups · Backup Parameters Setting Parameters for Backups and Restoration · Scripted Backups Using the Backup Scripts · Scripted Restoration Using the Restore Script 1 1 Setting Parameters for Backups and Restoration 1 · General-Purpose Variables · Magnetic Tape Control · User Hooks · backup-specs example An Example Text of 'Backup-specs' 1 1 Choosing Files and Names for 'tar' 1 · file Choosing the Archive's Name · Selecting Archive Members · files Reading Names from a File · exclude Excluding Some Files · wildcards Wildcards Patterns and Matching · quoting styles Ways of Quoting Special Characters in Names · transform Modifying File and Member Names · after Operating Only on New Files · recurse Descending into Directories · one Crossing File System Boundaries 1 1 Reading Names from a File 1 · nul 1 1 Excluding Some Files 1 · problems with exclude 1 1 Wildcards Patterns and Matching 1 · controlling pattern-matching 1 1 Crossing File System Boundaries 1 · directory Changing Directory · absolute Absolute File Names 1 1 Date input formats 1 · General date syntax Common rules. · Calendar date items 19 Dec 1994. · Time of day items 9:20pm. · Time zone items EST, PDT, GMT. · Day of week items Monday and others. · Relative items in date strings next tuesday, 2 years ago. · Pure numbers in date strings 19931219, 1440. · Seconds since the Epoch @1078100502. · Specifying time zone rules TZ="America/New_York", TZ="UTC0". · Authors of parse_datetime Bellovin, Eggert, Salz, Berets, et al. 1 1 Controlling the Archive Format 1 · Compression Using Less Space through Compression · Attributes Handling File Attributes · Portability Making 'tar' Archives More Portable · cpio Comparison of 'tar' and 'cpio' 1 1 Using Less Space through Compression 1 · gzip Creating and Reading Compressed Archives · sparse Archiving Sparse Files 1 1 Creating and Reading Compressed Archives 1 · lbzip2 Using lbzip2 with GNU 'tar'. 1 1 Making 'tar' Archives More Portable 1 · Portable Names Portable Names · dereference Symbolic Links · hard links Hard Links · old Old V7 Archives · ustar Ustar Archives · gnu GNU and old GNU format archives. · posix POSIX archives · Checksumming Checksumming Problems · Large or Negative Values Large files, negative time stamps, etc. · Other Tars How to Extract GNU-Specific Data Using 1 Other 'tar' Implementations 1 1 GNU 'tar' and POSIX 'tar' 1 · PAX keywords Controlling Extended Header Keywords. 1 1 How to Extract GNU-Specific Data Using Other 'tar' Implementations 1 · Split Recovery Members Split Between Volumes · Sparse Recovery Sparse Members 1 1 Tapes and Other Archive Media 1 · Device Device selection and switching · Remote Tape Server · Common Problems and Solutions · Blocking Blocking · Many Many archives on one tape · Using Multiple Tapes Using Multiple Tapes · label Including a Label in the Archive · verify · Write Protection 1 1 Blocking 1 · Format Variations Format Variations · Blocking Factor The Blocking Factor of an Archive 1 1 Many Archives on One Tape 1 · Tape Positioning Tape Positions and Tape Marks · mt The 'mt' Utility 1 1 Using Multiple Tapes 1 · Multi-Volume Archives Archives Longer than One Tape or Disk · Tape Files Tape Files · Tarcat Concatenate Volumes into a Single Archive 1 1 1 Tar Internals 1 · Standard Basic Tar Format · Extensions GNU Extensions to the Archive Format · Sparse Formats Storing Sparse Files · Snapshot Files · Dumpdir 1 1 Storing Sparse Files 1 · Old GNU Format · PAX 0 PAX Format, Versions 0.0 and 0.1 · PAX 1 PAX Format, Version 1.0 1 1 Genfile 1 · Generate Mode File Generation Mode. · Status Mode File Status Mode. · Exec Mode Synchronous Execution mode. 1 1 Copying This Manual 1 · GNU Free Documentation License License for copying this manual 1 1