pax available?

Reini Urban rurban@x-ray.at
Sat Nov 20 08:29:00 GMT 2004


Chuck schrieb:
> I'm actually referring to pax format archives (ustar).
> 
> I want to be able to unarchive files - many files - but changing one string
> in the name to another. I typically use it to clone databases on Solaris. I
> may have 15 mount points all with a subdirectory named DB1. When I extract
> the files, I don't want to put them into the DB1 subdirectories. I want to
> put them into subdirectories named DB2. Or maybe I want to restore them to
> different mount points. Whatever. Unless I'm misunderstanding you I'd have
> to do each one separately with unzip. There could be hundreds within one
> archive. With pax I can have the utility rename them all automatically as it
> extracts them with a simple command like...
> 
> pax -r -s/DB1/DB2/p < filename.pax

pax is in the package paxutils, which is not yet in cygwin.
http://directory.fsf.org/paxutils.html

Mark H. Colburn <markcol@jhereg.com> created another `pax' program in 
1989. The 1.1 version was published in comp.sources.unix, volume 17. 
 From a 2.0 OS/2 port, Ian Stewartson made 2.1 and is working on version 
2.2. ftp://sunsite.unc.edu/pub/Linux/utils/compress/pax-2.1.tar.gz

However it's straightforward to build paxutils. (into /usr/local)

cd /usr/src
wget ftp://alpha.gnu.org/pub/gnu/paxutils/paxutils-2.4h.tar.gz
tar xfz paxutils-2.4h.tar.gz
cd paxutils-2.4h
./configure
make && make check
make install DESTDIR=/usr/src/paxutils-2.4h/.inst

several tar tests will fail:
44. ./t-create.m4:3     ok
45. ./t-create.m4:14    ignored near `t-create.m4:14'
46. ./t-create.m4:40    ok
47. ./t-create.m4:56    ok
48. ./t-create.m4:76    FAILED near `t-create.m4:120'
49. ./t-extract.m4:3    ok
50. ./t-extract.m4:17   ignored near `t-extract.m4:17'
51. ./t-extract.m4:37   ok
52. ./t-extract.m4:53   ok
53. ./t-extract.m4:68   ok
54. ./t-exclude.m4:3    ok
55. ./t-append.m4:3     ok
56. ./t-delete.m4:3     FAILED near `t-delete.m4:16'
57. ./t-delete.m4:20    ok
58. ./t-incremen.m4:3   FAILED near `t-incremen.m4:23'
59. ./t-incremen.m4:27  ok
60. ./t-gzip.m4:3       ok
61. ./t-volume.m4:3     ok
mv: cannot move `stderr2' to `stderr': Permission denied
...

Note that paxutils includes unstable versions of tar and cpio. That 
might be the explanation why.

I have another version from the MS resource kit:
$ pax --help
c:\WINNT\system32\pax.exe: illegal option---
Usage: c:\WINNT\system32\pax.exe -[cimopuvy] [-f archive] [-s replstr] 
[-t device] [pattern...]
c:\WINNT\system32\pax.exe -r [-cimopuvy] [-f archive] [-s replstr] [-t 
device] [pattern...]
c:\WINNT\system32\pax.exe -w [-adimuvy] [-b blocking] [-f archive] [-s 
replstr] [-t device] [-x format] [pathname...]
c:\WINNT\system32\pax.exe -r -w [-ilmopuvy] [-s replstr] [pathname...] 
directory

For more information on c:\WINNT\system32\pax.exe syntax, see Command 
Reference Help in the Windows Help file.
-- 
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list