-
Notifications
You must be signed in to change notification settings - Fork 16
/
tar.cli.txt
67 lines (49 loc) · 4.35 KB
/
tar.cli.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
TAR
FILE PATHS ==> #Are preserved
FILE EXTENSION ==> #.tar
tar [IFILE...] #IFILE is input. Mandatory for -c|-r|-u|-A
--add-file=IFILE... #Like IFILE... but works even if IFILE starts with -
-f|--file OFILE #Output
#Def: stdout for -c, required for -r|-u|-A, stdin for -x|-t|-d|--delete
#Can be - for stdin|stdout
-c|-r|-u|-A|-x|-t|-d|--delete #Exactly one is required.
#Single dashes can be omitted
-c|--create #Archive IFILE... and overwrite OFILE
-r|--append #Archive IFILE... and add to OFILE archive
#If OFILE is an archive, add to it.
-u|--update #Like --append except exclude IFILEs which already exist in OFILE with a more recent mtime
-A|--catenate|--concatenate #Concat IFILE... archives to OFILE archive
-x|--extract|--get #Unarchive OFILE in current directory.
#Can specify IFILE... to select files.
-O|--to-stdout #Same but towards stdout
--to-command="COMMAND" #Same but piped to COMMAND
--delete #Delete each IFILE from archive OFILE
-t|--list #List archive OFILE to stdout
#Can specify IFILE... to select files.
-d|--diff|--compare #Recursively compare each unarchived IFILE with each archived file inside OFILE
#Print differences: existence, mtime, size
#Def IFILE is files of current directory
#Exit code 1 if differences
--test-label #Check if OFILE is proper tar archive (exit code 1)
-z|--gzip|--gunzip|--ungzip #Compress with Gzip (.tar.gz)
-j|--bzip2 #Compress with Bzip2 (.tar.bz2)
-J|--xz|--lzma #Compress with xz/LZMA (.tar.xz)
--lzip #Compress with lzip/LZMA (.tar.lz)
--lzop #Compress with lzop/LZO (.tar.lzo)
--zstd #Compress with zstd (.tar.zst)
-Z|--compress|--uncompress #Compress with compress (.tar.Z)
-I|--use-compress-program="COMAND"#Compress with COMMAND
-a|--[no-]auto-compress #Use --gzip|--bzip2|--xz|--lzip according to OFILE extension
#Def: false during compression
#Always done during decompression
-C|--directory DIR #Current directory
--strip-components=NUM #Remove the NUM first DIRs from destination filenames
--transform|xform='s/.../.../...' #Replace destination filenames using sed
--checkpoint[=NUM] #Report progress every NUM records of archiving. Def: 10
--checkpoint-action="COMMAND" #Fire "COMMAND" on each checkpoint
--totals[=SIGNAL] #When SIGNAL is received, report number of read|written|deleted bytes.
#Can be SIGINT|SIGHUP|SIGQUIT|SIGUSR1|SIGUSR2 or nothing (i.e. on exit, def)
-v|--verbose #
--index-file=FILE #Like --verbose but written to FILE