From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,22d38da99fcc3892 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2002-07-30 07:12:28 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news.rwth-aachen.de!news.uni-paderborn.de!not-for-mail From: Michael Joosten Newsgroups: comp.unix.tru64 Subject: Re: pax usage Date: Tue, 30 Jul 2002 16:12:27 +0200 Organization: Badlab Construction Services, Inc Message-ID: <3D469ECB.6F59@c-lab.de> References: <5f76499c.0207222334.35ac1c93@posting.google.com> <5f76499c.0207250048.653d7422@posting.google.com> NNTP-Posting-Host: tintin.c-lab.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-paderborn.de 1028038347 24951 131.234.80.96 (30 Jul 2002 14:12:27 GMT) X-Complaints-To: usenet@news.uni-paderborn.de NNTP-Posting-Date: 30 Jul 2002 14:12:27 GMT X-Mailer: Mozilla 3.04Gold [en] (X11; I; IRIX 6.5 IP32) Xref: archiver1.google.com comp.unix.tru64:8253 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 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: >> 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