pax: Filename too long for ustar

M

mic86

Jungspund
Hallo,

ich habe ein Backup-Skript mit pax programmiert. Eigentlich funktioniert das wunderbar.

Ich verwende folgenden Befehl:
Code:
pax -z -w $sourcePath -f $savePath/$saveFile.pax.gz;

Bei manchen Files kommt folgende Fehlermeldung:
Code:
pax: File name too long for ustar /home/xxxxxxx/Textdokumente/Studium/xxxxxxxxxx/xxxx/2.Semester/Java/EclipseProg/prog/Bank/Giro.class
(manche Ordnernamen habe ich mit derselben Anzahl an x ersetzt, wie sie Buchstaben haben)

Das auffällige daran ist, dass die Pfade zu diesen Files exakt 100 Buchstaben lang sind.

Bei anderen Pfaden, die länger sind, kommt keine Fehlermeldung und sie werden korrekt archiviert.

Ist das ein Bug!!??? :think: ?(
 
Pax ist ein Archivierungstool. Keine Ahnung, was das für 'ne Versionsnummer hat. Wie finde ich die heraus?
Ich habe Suse 10.2 x86-64 auf meinem Rechner laufen
 
pax -version

Code:
pax -version
Code:
pax --version

funktionieren beide nicht
 
Dann ruf mal

Code:
pax --help

oder

Code:
man pax

auf.
 
Version

Die Version bekomme ich auch nicht, indem ich
Code:
man pax
aufrufe.

Der Befehl, den ich weiter oben erwähnt habe funktioniert einwandfrei.

Ich habe nur ein Problem: Die Pfade, die genau 100 Zeichen lang sind, werden nicht archiviert. Diejenigen, die länger oder kürzer sind, werden archiviert.
 
Und schonmal beim Hersteller vom pax nachgeschaut, ob diese Begrenzung
irgendwo hinterlegt ist? Musst Du unbedingt pax verwenden - ziemlich exotisch oder?
 
Hab' da was mit 100 in den Linux und AIX man pages gefunden. Vielleicht hilft's irgendwie weiter ...

Linux 2.4.21-309-smp #1 SMP Tue May 16 23:36:50 UTC 2006 i686:
Code:
$ pax --version
pax (pax) 3.0
$ man pax
PAX(1)                  System General Commands Manual                  PAX(1)

NAME
     pax - read and write file archives and copy directory hierarchies

SYNOPSIS
     pax [-cdnvz] [-f archive] [-s replstr] ... [-U user] ... [-G group] ...
         [-T [from_date] [,to_date]] ... [pattern ...]
     pax -r [-cdiknuvzDYZ] [-f archive] [-o options] ... [-p string] ...
         [-s replstr] ... [-E limit] [-U user] ... [-G group] ... [-T
         [from_date] [,to_date]] ... [pattern ...]
     pax -w [-dituvzHLPX] [-b blocksize] [[-a] [-f archive]] [-x format]
         [-s replstr] ... [-o options] ... [-U user] ... [-G group] ...
         [-B bytes] [-T [from_date] [,to_date] [/[c][m]]] ... [file ...]
     pax -r -w [-diklntuvDHLPXYZ] [-p string] ... [-s replstr] ... [-U user]
         ... [-G group] ... [-T [from_date] [,to_date] [/[c][m]]] ...
         [file ...] directory
...
     -x format
             tar      The old BSD tar format as found in BSD4.3.  The default
                      blocksize for this format is 10240 bytes.  Pathnames
                      stored by this format must be 100 characters or less in
                      length.  Only regular files, hard links, soft links, and
                      directories will be archived (other file system types
                      are not supported).  For backwards compatibility with
                      even older tar formats, a -o option can be used when
                      writing an archive to omit the storage of directories.
                      This option takes the form:
                            -o write_opt=nodir
...
$

AIX 2 5 00555A2A4C00:
Code:
$ man pax



                     Commands Reference, Volume 4, n - r

pax Command

Purpose

Extracts, writes, and lists members of archive files; copies files and directory
hierarchies.

Syntax

To List Member Files of Archived Files

pax [ -c ] [ -d ] [ -n ] [ -v ] [ -H | -L ] [ -f Archive ] [ -s
ReplacementString ... ] [ -x Format ] [ -o Options ] [ Pattern ... ]

To Extract Archive Files Using the -r Flag

pax -r [ -c ] [ -d ] [ -i ] [ -k ] [ -n ] [ -u ] [ -v ] [ -H | -L ] [ -f Archive
] [ -o Options ] [ -p String ... ] [ -s ReplacementString ... ] [ -x Format ] [
Pattern ... ]

To Write Archive Files Using the -w Flag

pax -w [ -d ] [ -i ] [ -t ] [ -u ] [ -v ] [ -X ] [ -H | -L ] [ -b Blocking ] [ [
-a ] -f Archive ] [ -o Options ] [ -s ReplacementString ... ] [ -x Format ] [
File ... ]

To Copy Files Using the -r and -w Flags

pax -r -w [ -d ] [ -i ] [ -k ] [ -l ] [ -n ] [ -t ] [ -u ] [ -v ] [ -X ] [ -H |
-L ] [ -p String ... ] [ -o Options ] [ -s ReplacementString ... ] [ -x Format ]
[ File ... ] Directory

...

When specifying pathnames that are greater than 100 characters for the United
States Tape Archiver (USTAR) format, remember that the pathname is composed of a
prefix buffer, a / (slash), and a name buffer. The prefix buffer can be a
maximum of 155 characters and the name buffer can hold a maximum of 100
characters. If the pathname cannot be split into these two parts by a slash, it
cannot be archived. This limitation is due to the structure of tar archive
headers, and must be maintained for compliance with standards and backwards
compatibility.
...
$
 
pax

Ja, ich muss leider pax benutzen, da es eine Programmieraufgabe für mein Studium ist und der Dozent dies vorgegeben hat.

Okay, das mit den 100 Characters stimmt. Na ja, muss ich wohl mit leben... und mein Dozent auch, wenn er vorgibt, dass wir pax benutzen müssen.

VIELEN DANK!!!
 

Ähnliche Themen

OpenVPN Zertifikate

Zurück
Oben