Changeset a569125 in freewrt for tools/paxmirabilis/src/pax.1
- Timestamp:
- Feb 16, 2012, 10:14:16 PM (14 years ago)
- Branches:
- freewrt_1_0, freewrt_2_0
- Children:
- 7417b08
- Parents:
- 3784d08
- File:
-
- 1 edited
-
tools/paxmirabilis/src/pax.1 (modified) (26 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tools/paxmirabilis/src/pax.1
r3784d08 ra569125 1 .\" $MirOS: src/bin/pax/pax.1,v 1. 10 2009/10/27 18:47:26tg Exp $2 .\" $OpenBSD: pax.1,v 1. 52 2007/05/31 19:19:15 jmc Exp $1 .\" $MirOS: src/bin/pax/pax.1,v 1.22 2012/02/12 02:49:41 tg Exp $ 2 .\" $OpenBSD: pax.1,v 1.61 2010/09/19 20:55:25 jmc Exp $ 3 3 .\" $NetBSD: pax.1,v 1.3 1995/03/21 09:07:37 cgd Exp $ 4 4 .\" 5 .\" Copyright (c) 2005, 2006 Thorsten Glaser. 5 .\" Copyright (c) 2005, 2009, 2011, 2012 6 .\" Thorsten Glaser <tg@mirbsd.org> 6 7 .\" Copyright (c) 1992 Keith Muller. 7 8 .\" Copyright (c) 1992, 1993 … … 39 40 .\"- 40 41 .\" Try to make GNU groff and AT&T nroff more compatible 41 .\" * ` generates ‘ in g roff, so use \`42 .\" * ' generates ’ in g roff, \' generates ´, so use \*(aq43 .\" * - generates ‐ in g roff, \- generates −, fixed in tmac/mdoc/doc-groff42 .\" * ` generates ‘ in gnroff, so use \` 43 .\" * ' generates ’ in gnroff, \' generates ´, so use \*(aq 44 .\" * - generates ‐ in gnroff, \- generates −, so .tr it to - 44 45 .\" thus use - for hyphens and \- for minus signs and option dashes 45 46 .\" * ~ is size-reduced and placed atop in groff, so use \*(TI 46 47 .\" * ^ is size-reduced and placed atop in groff, so use \*(ha 47 48 .\" * \(en does not work in nroff, so use \*(en 49 .\" The section after the "doc" macropackage has been loaded contains 50 .\" additional code to convene between the UCB mdoc macropackage (and 51 .\" its variant as BSD mdoc in groff) and the GNU mdoc macropackage. 52 .\" 48 53 .ie \n(.g \{\ 54 . if \*[.T]ascii .tr \-\N'45' 55 . if \*[.T]latin1 .tr \-\N'45' 56 . if \*[.T]utf8 .tr \-\N'45' 57 . ds <= \[<=] 58 . ds >= \[>=] 59 . ds Rq \[rq] 60 . ds Lq \[lq] 61 . ds sL \(aq 62 . ds sR \(aq 63 . if \*[.T]utf8 .ds sL ` 64 . if \*[.T]ps .ds sL ` 65 . if \*[.T]utf8 .ds sR ' 66 . if \*[.T]ps .ds sR ' 49 67 . ds aq \(aq 50 68 . ds TI \(ti … … 60 78 .\" 61 79 .\" Implement .Dd with the Mdocdate RCS keyword 80 .\" 62 81 .rn Dd xD 63 82 .de Dd … … 71 90 .\" with -mandoc, it might implement .Mx itself, but we want to 72 91 .\" use our own definition. And .Dd must come *first*, always. 73 .Dd $Mdocdate: October 27 2009 $ 92 .\" 93 .Dd $Mdocdate: February 12 2012 $ 94 .\" 95 .\" Check which macro package we use 96 .\" 97 .ie \n(.g \{\ 98 . ie d volume-ds-1 .ds tT gnu 99 . el .ds tT bsd 100 .\} 101 .el .ds tT ucb 74 102 .\" 75 103 .\" Implement .Mx (MirBSD) 76 .de Mx 77 .nr cF \\n(.f 78 .nr cZ \\n(.s 79 .ds aa \&\f\\n(cF\s\\n(cZ 80 .if \\n(aC==0 \{\ 81 . ie \\n(.$==0 \&MirOS\\*(aa 82 . el .aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 104 .\" 105 .ie "\*(tT"gnu" \{\ 106 . eo 107 . de Mx 108 . nr curr-font \n[.f] 109 . nr curr-size \n[.ps] 110 . ds str-Mx \f[\n[curr-font]]\s[\n[curr-size]u] 111 . ds str-Mx1 \*[Tn-font-size]\%MirOS\*[str-Mx] 112 . if !\n[arg-limit] \ 113 . if \n[.$] \{\ 114 . ds macro-name Mx 115 . parse-args \$@ 116 . \} 117 . if (\n[arg-limit] > \n[arg-ptr]) \{\ 118 . nr arg-ptr +1 119 . ie (\n[type\n[arg-ptr]] == 2) \ 120 . as str-Mx1 \~\*[arg\n[arg-ptr]] 121 . el \ 122 . nr arg-ptr -1 123 . \} 124 . ds arg\n[arg-ptr] "\*[str-Mx1] 125 . nr type\n[arg-ptr] 2 126 . ds space\n[arg-ptr] "\*[space] 127 . nr num-args (\n[arg-limit] - \n[arg-ptr]) 128 . nr arg-limit \n[arg-ptr] 129 . if \n[num-args] \ 130 . parse-space-vector 131 . print-recursive 132 .. 133 . ec 134 . ds sP \s0 135 . ds tN \*[Tn-font-size] 83 136 .\} 84 .if \\n(aC>\\n(aP \{\ 85 . nr aP \\n(aP+1 86 . ie \\n(C\\n(aP==2 \{\ 87 . as b1 \&MirOS\ #\&\\*(A\\n(aP\\*(aa 88 . ie \\n(aC>\\n(aP \{\ 89 . nr aP \\n(aP+1 137 .el \{\ 138 . de Mx 139 . nr cF \\n(.f 140 . nr cZ \\n(.s 141 . ds aa \&\f\\n(cF\s\\n(cZ 142 . if \\n(aC==0 \{\ 143 . ie \\n(.$==0 \&MirOS\\*(aa 144 . el .aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 145 . \} 146 . if \\n(aC>\\n(aP \{\ 147 . nr aP \\n(aP+1 148 . ie \\n(C\\n(aP==2 \{\ 149 . as b1 \&MirOS\ #\&\\*(A\\n(aP\\*(aa 150 . ie \\n(aC>\\n(aP \{\ 151 . nr aP \\n(aP+1 152 . nR 153 . \} 154 . el .aZ 155 . \} 156 . el \{\ 157 . as b1 \&MirOS\\*(aa 90 158 . nR 91 159 . \} 92 . el .aZ93 160 . \} 94 . el \{\ 95 . as b1 \&MirOS\\*(aa 96 . nR 97 . \} 161 .. 98 162 .\} 99 .. 100 .Dt PAX 1 163 .\"- 164 .ie \ng==1 \{\ 165 . ds nc mircpio 166 . ds np mirpax 167 . ds nt mirtar 168 . ds nm mirpax 169 . Dt MIRPAX 1 170 .\} 171 .el .ie \ng==2 \{\ 172 . ds nc paxcpio 173 . ds np pax 174 . ds nt paxtar 175 . ds nm pax 176 . Dt PAX 1 177 .\} 178 .el \{\ 179 . ds nc cpio 180 . ds np pax 181 . ds nt tar 182 . ds nm pax 183 . Dt PAX 1 184 .\} 185 .\"- 101 186 .Os MirBSD 102 187 .Sh NAME 188 .ie \ng==1 \{\ 189 .Nm mirpax 190 .Nd read and write file archives and copy directory hierarchies 191 .\} 192 .el \{\ 103 193 .Nm pax 104 194 .Nd read and write file archives and copy directory hierarchies 195 .\} 105 196 .Sh SYNOPSIS 106 197 .Bk -words 107 .Nm pax108 .Op Fl 0cd nOvz198 .Nm \*(nm 199 .Op Fl 0cdJjnOvz 109 200 .Op Fl E Ar limit 110 201 .Op Fl f Ar archive … … 114 205 .Op Fl U Ar user 115 206 .Op Ar pattern ... 116 .Nm pax207 .Nm \*(nm 117 208 .Fl r 118 .Op Fl 0cDdi knOuvYZz209 .Op Fl 0cDdiJjknOuvYZz 119 210 .Op Fl E Ar limit 120 211 .Op Fl f Ar archive 121 212 .Op Fl G Ar group 213 .Op Fl M Ar flag 122 214 .Op Fl o Ar options 123 215 .Op Fl p Ar string … … 126 218 .Op Fl U Ar user 127 219 .Op Ar pattern ... 128 .Nm pax220 .Nm \*(nm 129 221 .Fl w 130 .Op Fl 0adHi LOPtuvXz222 .Op Fl 0adHiJjLOPtuvXz 131 223 .Op Fl B Ar bytes 132 224 .Op Fl b Ar blocksize … … 139 231 .Op Fl U Ar user 140 232 .Op Fl x Ar format 141 .Op Ar file ...142 .Nm pax233 .Op Ar 234 .Nm \*(nm 143 235 .Fl rw 144 .Op Fl 0DdHi kLlnOPtuvXYZ236 .Op Fl 0DdHiJjkLlnOPtuvXYZ 145 237 .Op Fl G Ar group 146 238 .Op Fl p Ar string … … 148 240 .Op Fl T Ar range 149 241 .Op Fl U Ar user 150 .Op Ar file ...242 .Op Ar 151 243 .Ar directory 152 244 .Ek … … 506 598 .Pa /dev/tty 507 599 cannot be opened for reading and writing. 600 .It Fl J 601 Use the xz utility to compress (decompress) the archive 602 while writing (reading). 603 Incompatible with 604 .Fl a . 605 .It Fl j 606 Use the bzip2 utility to compress (decompress) the archive 607 while writing (reading). 608 Incompatible with 609 .Fl a . 508 610 .It Fl k 509 611 Do not overwrite existing files. … … 523 625 Configure the archive normaliser. 524 626 .Ar flag 525 is either a num ber or a string, optionally prefixed with526 . Dq no-527 to turn it off. 528 See 529 . Xr cpio 1530 for a comprehensive list and compatibility notes. 627 is either a numeric value compatible to 628 .Xr strtonum 3 629 which is directly stored in the flags word, or 630 one of the following values, optionally prefixed with 631 .Dq no\- 632 to turn them off: 531 633 .Pp 532 634 .Bl -tag -width xxxxxx -compact 533 635 .It Ar inodes 534 636 0x0001: Serialise inodes, zero device info. 637 .br 638 (cpio, sv4cpio, sv4crc) 535 639 .It Ar links 536 640 0x0002: Store content of hard links only once. 641 .br 642 (cpio, sv4cpio, sv4crc) 537 643 .It Ar mtime 538 644 0x0004: Zero out the file modification time. 645 .br 646 (ar, cpio, sv4cpio, sv4crc, ustar) 539 647 .It Ar uidgid 540 648 0x0008: Set owner to 0:0 (root:wheel). 649 .br 650 (ar, cpio, sv4cpio, sv4crc, ustar) 651 .It Ar verb 652 0x0010: Debug this option. 653 .It Ar debug 654 0x0020: Debug file header storage. 541 655 .It Ar lncp 542 0x0040: Extract hard links by copying if linking fails. 656 0x0040: Extract hard links by copy if link fails. 657 .It Ar numid 658 0x0080: Use only numeric uid and gid values. 659 .br 660 (ustar) 661 .It Ar gslash 662 0x0100: Append a slash after directory names. 663 .br 664 (ustar) 665 .It Ar set 666 0x0003: Keep ownership and mtime intact. 667 .It Ar dist 668 0x008B: Clean everything except mtime. 669 .It Ar norm 670 0x008F: Clean everything. 671 .It Ar root 672 0x0089: Clean owner and device information. 543 673 .El 544 674 .Pp 545 This option is only implemented for the cpio, sv4cpio,675 This option is only implemented for the ar, cpio, sv4cpio, 546 676 sv4crc, and ustar file format writing routines. 547 For the ustar format, the 548 .Ar inodes 549 and 550 .Ar links 551 specifiers are ignored. 677 .Pp 552 678 TODO: The 553 .Nm pax679 .Nm \*(nm 554 680 frontend should be using the 555 681 .Fl o … … 796 922 .Em copy 797 923 mode, the optional trailing field 798 .Oo Cm c Oc Op Cm m924 .Oo Cm c Oc Ns Op Cm m 799 925 can be used to determine which file time (inode change, file modification or 800 926 both) are used in the comparison. … … 859 985 field may be added independently of the other fields. 860 986 Time ranges are relative to the current time, so 861 .Ic -T 1234/cm987 .Ic \-T 1234/cm 862 988 would select all files with a modification or inode change time 863 989 of 12:34 PM today or later. … … 869 995 .Nm 870 996 to be the same as they were before being read or accessed by 871 .Nm pax.997 .Nm \*(nm . 872 998 .It Fl U Ar user 873 999 Select a file based on its … … 910 1036 the output has the format: 911 1037 .Pp 912 .Dl Em ls -l listing Li == Em link-name1038 .Dl Em ls \-l listing Li == Em link-name 913 1039 .Pp 914 1040 For pathnames representing a symbolic link, the output has the format: 915 1041 .Pp 916 .Dl Em ls -l listing Li =\*(Gt Em link-name1042 .Dl Em ls \-l listing Li =\*(Gt Em link-name 917 1043 .Pp 918 1044 Where 919 .Em ls -l listing1045 .Em ls \-l listing 920 1046 is the output format specified by the 921 1047 .Xr ls 1 … … 955 1081 currently supports the following formats: 956 1082 .Bl -tag -width "sv4cpio" 1083 .It Cm ar 1084 The Unix Archiver library format. 1085 This format matches APT repositories and the BSD 1086 .Xr ar 1 1087 specification, not GNU binutils (which can however read them) or SYSV systems. 1088 See 1089 .Xr ar 5 1090 on some operating systems for more information. 957 1091 .It Cm bcpio 958 1092 The old binary cpio format. … … 1013 1147 The default blocksize for this format is 10240 bytes. 1014 1148 Filenames stored by this format must be 100 characters or less in length; 1015 the total pathname must be 25 5characters or less.1149 the total pathname must be 256 characters or less. 1016 1150 .El 1017 1151 .Pp … … 1034 1168 pathname created after all the file name modifications have completed. 1035 1169 .It Fl z 1036 Use 1170 Use the 1037 1171 .Xr gzip 1 1038 to compress (decompress) the archive while writing (reading).1172 utility to compress (decompress) the archive while writing (reading). 1039 1173 Incompatible with 1040 1174 .Fl a . … … 1131 1265 Path in which to store temporary files. 1132 1266 .El 1267 .Sh EXIT STATUS 1268 The 1269 .Nm 1270 utility exits with one of the following values: 1271 .Pp 1272 .Bl -tag -width Ds -offset indent -compact 1273 .It 0 1274 All files were processed successfully. 1275 .It 1 1276 An error occurred. 1277 .El 1133 1278 .Sh EXAMPLES 1134 1279 Copy the contents of the current directory to the device 1135 1280 .Pa /dev/rst0 : 1136 1281 .Pp 1137 .Dl $ pax -w-f /dev/rst0 \&.1282 .Dl $ \*(nm \-w \-f /dev/rst0 \&. 1138 1283 .Pp 1139 1284 Give the verbose table of contents for an archive stored in 1140 1285 .Pa filename : 1141 1286 .Pp 1142 .Dl $ pax -v-f filename1287 .Dl $ \*(nm \-v \-f filename 1143 1288 .Pp 1144 1289 This sequence of commands will copy the entire … … 1149 1294 $ mkdir newdir 1150 1295 $ cd olddir 1151 $ pax-rw . ../newdir1296 $ \*(nm \-rw . ../newdir 1152 1297 .Ed 1153 1298 .Pp … … 1159 1304 all other files are extracted to their unmodified path. 1160 1305 .Pp 1161 .Dl $ pax -r -s ',^/usr/,,'-f a.pax1306 .Dl $ \*(nm \-r \-s \*(aq,\*(ha/usr/,,\*(aq \-f a.pax 1162 1307 .Pp 1163 1308 This can be used to interactively select the files to copy from the … … 1165 1310 .Pa dest_dir : 1166 1311 .Pp 1167 .Dl $ pax -rw-i \&. dest_dir1312 .Dl $ \*(nm \-rw \-i \&. dest_dir 1168 1313 .Pp 1169 1314 Extract all files from the archive … … 1175 1320 and preserve all file permissions: 1176 1321 .Pp 1177 .Dl "$ pax -r -pe -U root -G bin-f a.pax"1322 .Dl "$ \*(nm \-r \-pe \-U root \-G bin \-f a.pax" 1178 1323 .Pp 1179 1324 Update (and list) only those files in the destination directory … … 1183 1328 .Pa home : 1184 1329 .Pp 1185 .Dl "$ pax -r -w -v -Y-Z home /backup"1330 .Dl "$ \*(nm \-r \-w \-v \-Y \-Z home /backup" 1186 1331 .Sh DIAGNOSTICS 1187 .Nm1188 will exit with one of the following values:1189 .Bl -tag -width 2n -offset indent1190 .It 01191 All files were processed successfully.1192 .It 11193 An error occurred.1194 .El1195 .Pp1196 1332 Whenever 1197 1333 .Nm … … 1233 1369 completes it will exit with a non-zero exit status. 1234 1370 .Sh SEE ALSO 1371 .Xr ar 1 , 1235 1372 .Xr cpio 1 , 1373 .if \ng==1 \{\ 1374 .Xr deb 5 , 1375 .Xr mircpio 1 , 1376 .Xr mirtar 1 , 1377 .Xr pax 1 , 1378 .\} 1379 .if \ng==2 \{\ 1380 .Xr deb 5 , 1381 .Xr paxcpio 1 , 1382 .Xr paxtar 1 , 1383 .\} 1236 1384 .Xr tar 1 1237 1385 .Sh STANDARDS … … 1239 1387 .Nm 1240 1388 utility is compliant with the 1241 .St -p1003.1-2004 1389 IEEE Std 1003.1-2008 1390 .Pq Dq Tn POSIX 1242 1391 specification. 1243 1392 .Pp 1244 1393 The flags 1245 . Op Fl 0BDEGHLMOPTUYZz ,1394 .Fl 0BDEGHJjLMOPTUYZz , 1246 1395 the archive formats 1396 .Em ar , 1247 1397 .Em bcpio , 1248 1398 .Em sv4cpio , … … 1260 1410 .Mx 1261 1411 extensions by 1262 .An Thorsten Glaser Aq tg@mirbsd. de.1412 .An Thorsten Glaser Aq tg@mirbsd.org .
Note:
See TracChangeset
for help on using the changeset viewer.
