pax and long filenames

From: Hans van der Heide <hans.vanderheide_at_bluewin.ch>
Date: Thu, 01 Apr 1999 18:10:10 +0200

Hello Tru64-Unix-Managers,

I detected some strange behaviour of "pax": when the name file to be saved
exceeds
100 characters (including the path), the logging of pax truncated the name
of the file,
in fact it only shows the path, ant the filename itself desappears.
When the filename itself exceeds 100 characters, pax refuses to save this
file with
an errormessage (see pax(4) ).

I am using Tru64-unix 4.0D. Is anybody aware of this problem? Compaq patches
don't
mention this problem, so I suppose I have to create a problem report if no
one has seen
it before.

Following a script to reproduce the problem.

Greetings,

Hans van der Heide
BDL Informatik GmbH
Switzerland

#!/usr/bin/ksh
#
# TestPaxPath.ksh:
#
# this script shows the behaviour of pax when saving extremely long
filenames
#
# according to pax(4) the filename may be up to 100 characters
# (excluding leading path, but including "/")
#
# pax claims filenames longer than 100 chars (excluding leading path AND
"/")
# to be too long
#
# filenames exceeding 100 chars (including the path) are correctly saved as
long
# as the filename-part does not exceed 100 chars, but are truncated in the
# verbose-list (in fact only the path is showed)
#

DIR=TestPaxPath
FILE=TestPaxFile

cd /usr/tmp

# initialise
[[ -d ${DIR} ]] && rm -rf ${DIR}
[[ -f ${FILE}.in ]] && rm ${FILE}.in
[[ -f ${FILE}.out ]] && rm ${FILE}.out
mkdir ${DIR}
COUNT=12 ; FILLER=""

while [ ${COUNT} -le 110 ] ; do
  # generate filename of increasing size, create file
  (( COUNT+=1 )) ; FILLER="${FILLER}x"
  touch ${DIR}/$( printf "Size_Is_%03d_%s" ${COUNT} ${FILLER} )
done

# backup / verify
pax -w -v ${DIR} 2>${FILE}.out | pax >${FILE}.in

# compare results
diff ${FILE}.out ${FILE}.in

# cleanup
rm ${FILE}.out ${FILE}.in ; rm -rf ${DIR}

#
Received on Thu Apr 01 1999 - 16:10:02 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:39 NZDT