Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: Michael Joosten <joost@c-lab.de>
Subject: Re: pax usage
Date: Tue, 30 Jul 2002 16:12:27 +0200	[thread overview]
Message-ID: <3D469ECB.6F59@c-lab.de> (raw)
In-Reply-To: 5f76499c.0207250048.653d7422@posting.google.com

selc kar wrote:
> 
> Hey,
> I have found the answer, I think it is like tar..
> 
> You must pax the file(s) according to current directory so that it can
> be extracted to the current directory...
> 

Last time I used pax, there was still the '-s' option:
     -s replstr
           Modify the file or archive member names specified by the
pattern or
           file operands according to the substitution expression
replstr,
           using the syntax of the ed(1) utility regular expressions. 
The
           format of these regular expressions are:
                 /old/new/[gp]
           As in ed(1), old is a basic regular expression and new can
contain
           an ampersand (&), \n (where n is a digit) back-references, or
           subexpression matching.  The old string may also contain
<newline>
           characters.  Any non-null character can be used as a
delimiter (/
           is shown here).  Multiple -s expressions can be specified. 
The
           expressions are applied in the order they are specified on
the com-
           mand line, terminating with the first successful
substitution.  The
           optional trailing g continues to apply the substitution
expression
           to the pathname substring which starts with the first
character
           following the end of the last successful substitution. The
first
           unsuccessful substitution stops the operation of the g
option.  The
           optional trailing p will cause the final result of a
successful
           substitution to be written to standard error in the following
for-
           mat:
                 <original pathname> >> <new pathname>
           File or archive member names that substitute to the empty
string
           are not selected and will be skipped.

(cited from IRIX manpage)

So, pax -r -f /dev/tape/tape0c -s '/^\//\.&/' should extract the content
in the current directory.  Not sure, though, if the matching of
filenames now uses the original or the replaced names.
BTW, some '-b' for larger block sizes should be useful for the
impatient...

> 
> to read the file
> 
> pax -r -f /dev/tape/tape0c ./fileNameHERE

-- 
Michael Joosten, SBS C-LAB, joost@c-lab.de
Fuerstenallee 11, 33094 Paderborn, Germany
Phone: +49 5251 606127, Fax: +49 5251 606065
C-LAB is a cooperation of University Paderborn & SIEMENS


      reply	other threads:[~2002-07-30 14:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-23  7:34 pax usage selc kar
2002-07-25  8:48 ` selc kar
2002-07-30 14:12   ` Michael Joosten [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox