Changeset a569125 in freewrt for tools/paxmirabilis/src/pax.1


Ignore:
Timestamp:
Feb 16, 2012, 10:14:16 PM (14 years ago)
Author:
Thorsten Glaser <tg@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
7417b08
Parents:
3784d08
Message:

even FreeWRT 1.0-stable deserves paxmirabilis-20120216 compiled with LTO ☺

git-svn-id: svn://www.freewrt.org/branches/freewrt_1_0@3981 afb5a338-a214-0410-bd46-81f09a774fd1

File:
1 edited

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:26 tg 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 $
    33.\"     $NetBSD: pax.1,v 1.3 1995/03/21 09:07:37 cgd Exp $
    44.\"
    5 .\" Copyright (c) 2005, 2006 Thorsten Glaser.
     5.\" Copyright (c) 2005, 2009, 2011, 2012
     6.\"     Thorsten Glaser <tg@mirbsd.org>
    67.\" Copyright (c) 1992 Keith Muller.
    78.\" Copyright (c) 1992, 1993
     
    3940.\"-
    4041.\" Try to make GNU groff and AT&T nroff more compatible
    41 .\" * ` generates ‘ in groff, so use \`
    42 .\" * ' generates ’ in groff, \' generates ´, so use \*(aq
    43 .\" * - generates ‐ in groff, \- generates −, fixed in tmac/mdoc/doc-groff
     42.\" * ` generates ‘ in gnroff, so use \`
     43.\" * ' generates ’ in gnroff, \' generates ´, so use \*(aq
     44.\" * - generates ‐ in gnroff, \- generates −, so .tr it to -
    4445.\"   thus use - for hyphens and \- for minus signs and option dashes
    4546.\" * ~ is size-reduced and placed atop in groff, so use \*(TI
    4647.\" * ^ is size-reduced and placed atop in groff, so use \*(ha
    4748.\" * \(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.\"
    4853.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 '
    4967.       ds aq \(aq
    5068.       ds TI \(ti
     
    6078.\"
    6179.\" Implement .Dd with the Mdocdate RCS keyword
     80.\"
    6281.rn Dd xD
    6382.de Dd
     
    7190.\" with -mandoc, it might implement .Mx itself, but we want to
    7291.\" 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
    74102.\"
    75103.\" 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]
    83136.\}
    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
    90158.                       nR
    91159.               \}
    92 .               el .aZ
    93160.       \}
    94 .       el \{\
    95 .               as b1 \&MirOS\\*(aa
    96 .               nR
    97 .       \}
     161..
    98162.\}
    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.\"-
    101186.Os MirBSD
    102187.Sh NAME
     188.ie \ng==1 \{\
     189.Nm mirpax
     190.Nd read and write file archives and copy directory hierarchies
     191.\}
     192.el \{\
    103193.Nm pax
    104194.Nd read and write file archives and copy directory hierarchies
     195.\}
    105196.Sh SYNOPSIS
    106197.Bk -words
    107 .Nm pax
    108 .Op Fl 0cdnOvz
     198.Nm \*(nm
     199.Op Fl 0cdJjnOvz
    109200.Op Fl E Ar limit
    110201.Op Fl f Ar archive
     
    114205.Op Fl U Ar user
    115206.Op Ar pattern ...
    116 .Nm pax
     207.Nm \*(nm
    117208.Fl r
    118 .Op Fl 0cDdiknOuvYZz
     209.Op Fl 0cDdiJjknOuvYZz
    119210.Op Fl E Ar limit
    120211.Op Fl f Ar archive
    121212.Op Fl G Ar group
     213.Op Fl M Ar flag
    122214.Op Fl o Ar options
    123215.Op Fl p Ar string
     
    126218.Op Fl U Ar user
    127219.Op Ar pattern ...
    128 .Nm pax
     220.Nm \*(nm
    129221.Fl w
    130 .Op Fl 0adHiLOPtuvXz
     222.Op Fl 0adHiJjLOPtuvXz
    131223.Op Fl B Ar bytes
    132224.Op Fl b Ar blocksize
     
    139231.Op Fl U Ar user
    140232.Op Fl x Ar format
    141 .Op Ar file ...
    142 .Nm pax
     233.Op Ar
     234.Nm \*(nm
    143235.Fl rw
    144 .Op Fl 0DdHikLlnOPtuvXYZ
     236.Op Fl 0DdHiJjkLlnOPtuvXYZ
    145237.Op Fl G Ar group
    146238.Op Fl p Ar string
     
    148240.Op Fl T Ar range
    149241.Op Fl U Ar user
    150 .Op Ar file ...
     242.Op Ar
    151243.Ar directory
    152244.Ek
     
    506598.Pa /dev/tty
    507599cannot be opened for reading and writing.
     600.It Fl J
     601Use the xz utility to compress (decompress) the archive
     602while writing (reading).
     603Incompatible with
     604.Fl a .
     605.It Fl j
     606Use the bzip2 utility to compress (decompress) the archive
     607while writing (reading).
     608Incompatible with
     609.Fl a .
    508610.It Fl k
    509611Do not overwrite existing files.
     
    523625Configure the archive normaliser.
    524626.Ar flag
    525 is either a number or a string, optionally prefixed with
    526 .Dq no-
    527 to turn it off.
    528 See
    529 .Xr cpio 1
    530 for a comprehensive list and compatibility notes.
     627is either a numeric value compatible to
     628.Xr strtonum 3
     629which is directly stored in the flags word, or
     630one of the following values, optionally prefixed with
     631.Dq no\-
     632to turn them off:
    531633.Pp
    532634.Bl -tag -width xxxxxx -compact
    533635.It Ar inodes
    5346360x0001: Serialise inodes, zero device info.
     637.br
     638(cpio, sv4cpio, sv4crc)
    535639.It Ar links
    5366400x0002: Store content of hard links only once.
     641.br
     642(cpio, sv4cpio, sv4crc)
    537643.It Ar mtime
    5386440x0004: Zero out the file modification time.
     645.br
     646(ar, cpio, sv4cpio, sv4crc, ustar)
    539647.It Ar uidgid
    5406480x0008: Set owner to 0:0 (root:wheel).
     649.br
     650(ar, cpio, sv4cpio, sv4crc, ustar)
     651.It Ar verb
     6520x0010: Debug this option.
     653.It Ar debug
     6540x0020: Debug file header storage.
    541655.It Ar lncp
    542 0x0040: Extract hard links by copying if linking fails.
     6560x0040: Extract hard links by copy if link fails.
     657.It Ar numid
     6580x0080: Use only numeric uid and gid values.
     659.br
     660(ustar)
     661.It Ar gslash
     6620x0100: Append a slash after directory names.
     663.br
     664(ustar)
     665.It Ar set
     6660x0003: Keep ownership and mtime intact.
     667.It Ar dist
     6680x008B: Clean everything except mtime.
     669.It Ar norm
     6700x008F: Clean everything.
     671.It Ar root
     6720x0089: Clean owner and device information.
    543673.El
    544674.Pp
    545 This option is only implemented for the cpio, sv4cpio,
     675This option is only implemented for the ar, cpio, sv4cpio,
    546676sv4crc, 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
    552678TODO: The
    553 .Nm pax
     679.Nm \*(nm
    554680frontend should be using the
    555681.Fl o
     
    796922.Em copy
    797923mode, the optional trailing field
    798 .Oo Cm c Oc Op Cm m
     924.Oo Cm c Oc Ns Op Cm m
    799925can be used to determine which file time (inode change, file modification or
    800926both) are used in the comparison.
     
    859985field may be added independently of the other fields.
    860986Time ranges are relative to the current time, so
    861 .Ic -T 1234/cm
     987.Ic \-T 1234/cm
    862988would select all files with a modification or inode change time
    863989of 12:34 PM today or later.
     
    869995.Nm
    870996to be the same as they were before being read or accessed by
    871 .Nm pax .
     997.Nm \*(nm .
    872998.It Fl U Ar user
    873999Select a file based on its
     
    9101036the output has the format:
    9111037.Pp
    912 .Dl Em ls -l listing Li == Em link-name
     1038.Dl Em ls \-l listing Li == Em link-name
    9131039.Pp
    9141040For pathnames representing a symbolic link, the output has the format:
    9151041.Pp
    916 .Dl Em ls -l listing Li =\*(Gt Em link-name
     1042.Dl Em ls \-l listing Li =\*(Gt Em link-name
    9171043.Pp
    9181044Where
    919 .Em ls -l listing
     1045.Em ls \-l listing
    9201046is the output format specified by the
    9211047.Xr ls 1
     
    9551081currently supports the following formats:
    9561082.Bl -tag -width "sv4cpio"
     1083.It Cm ar
     1084The Unix Archiver library format.
     1085This format matches APT repositories and the BSD
     1086.Xr ar 1
     1087specification, not GNU binutils (which can however read them) or SYSV systems.
     1088See
     1089.Xr ar 5
     1090on some operating systems for more information.
    9571091.It Cm bcpio
    9581092The old binary cpio format.
     
    10131147The default blocksize for this format is 10240 bytes.
    10141148Filenames stored by this format must be 100 characters or less in length;
    1015 the total pathname must be 255 characters or less.
     1149the total pathname must be 256 characters or less.
    10161150.El
    10171151.Pp
     
    10341168pathname created after all the file name modifications have completed.
    10351169.It Fl z
    1036 Use
     1170Use the
    10371171.Xr gzip 1
    1038 to compress (decompress) the archive while writing (reading).
     1172utility to compress (decompress) the archive while writing (reading).
    10391173Incompatible with
    10401174.Fl a .
     
    11311265Path in which to store temporary files.
    11321266.El
     1267.Sh EXIT STATUS
     1268The
     1269.Nm
     1270utility exits with one of the following values:
     1271.Pp
     1272.Bl -tag -width Ds -offset indent -compact
     1273.It 0
     1274All files were processed successfully.
     1275.It 1
     1276An error occurred.
     1277.El
    11331278.Sh EXAMPLES
    11341279Copy the contents of the current directory to the device
    11351280.Pa /dev/rst0 :
    11361281.Pp
    1137 .Dl $ pax -w -f /dev/rst0 \&.
     1282.Dl $ \*(nm \-w \-f /dev/rst0 \&.
    11381283.Pp
    11391284Give the verbose table of contents for an archive stored in
    11401285.Pa filename :
    11411286.Pp
    1142 .Dl $ pax -v -f filename
     1287.Dl $ \*(nm \-v \-f filename
    11431288.Pp
    11441289This sequence of commands will copy the entire
     
    11491294$ mkdir newdir
    11501295$ cd olddir
    1151 $ pax -rw . ../newdir
     1296$ \*(nm \-rw . ../newdir
    11521297.Ed
    11531298.Pp
     
    11591304all other files are extracted to their unmodified path.
    11601305.Pp
    1161 .Dl $ pax -r -s ',^/usr/,,' -f a.pax
     1306.Dl $ \*(nm \-r \-s \*(aq,\*(ha/usr/,,\*(aq \-f a.pax
    11621307.Pp
    11631308This can be used to interactively select the files to copy from the
     
    11651310.Pa dest_dir :
    11661311.Pp
    1167 .Dl $ pax -rw -i \&. dest_dir
     1312.Dl $ \*(nm \-rw \-i \&. dest_dir
    11681313.Pp
    11691314Extract all files from the archive
     
    11751320and preserve all file permissions:
    11761321.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"
    11781323.Pp
    11791324Update (and list) only those files in the destination directory
     
    11831328.Pa home :
    11841329.Pp
    1185 .Dl "$ pax -r -w -v -Y -Z home /backup"
     1330.Dl "$ \*(nm \-r \-w \-v \-Y \-Z home /backup"
    11861331.Sh DIAGNOSTICS
    1187 .Nm
    1188 will exit with one of the following values:
    1189 .Bl -tag -width 2n -offset indent
    1190 .It 0
    1191 All files were processed successfully.
    1192 .It 1
    1193 An error occurred.
    1194 .El
    1195 .Pp
    11961332Whenever
    11971333.Nm
     
    12331369completes it will exit with a non-zero exit status.
    12341370.Sh SEE ALSO
     1371.Xr ar 1 ,
    12351372.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.\}
    12361384.Xr tar 1
    12371385.Sh STANDARDS
     
    12391387.Nm
    12401388utility is compliant with the
    1241 .St -p1003.1-2004
     1389IEEE Std 1003.1-2008
     1390.Pq Dq Tn POSIX
    12421391specification.
    12431392.Pp
    12441393The flags
    1245 .Op Fl 0BDEGHLMOPTUYZz ,
     1394.Fl 0BDEGHJjLMOPTUYZz ,
    12461395the archive formats
     1396.Em ar ,
    12471397.Em bcpio ,
    12481398.Em sv4cpio ,
     
    12601410.Mx
    12611411extensions 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.