Operating System - HP-UX
1833840 Members
2096 Online
110063 Solutions
New Discussion

TAR : Problem with the length of the files names

 
SOLVED
Go to solution
Christophe MESTDACH
Occasional Advisor

TAR : Problem with the length of the files names

Excuse-me for my English, but I'm French.

I have a CDROM of which I would like to make an image TAR under HP-UX11.11, but TAR does not file all the files of CD.

For example, the CD-Rom contains the files :

CSCOpx\CSCOvorb\CSCOvorb_fileset\opt\CSCOpx\www\classpath\com\sun\java\swing\plaf\basic\BasicMenuUIPostAction.class

and

CSCOpx\CSCOvorb\CSCOvorb_fileset\opt\CSCOpx\www\classpath\com\sun\java\swing\plaf\basic\BasicMenuUIMenuChangeListenerSelectChildItemAction.class

File TAR contains the file "BasicMenuUIPostAction.class", but not the file "BasicMenuUIMenuChangeListenerSelectChildItemAction.class".??

That can it be with the length of the file name?

How to make?

Thank you in advance.
9 REPLIES 9
Yair Goldel
Advisor

Re: TAR : Problem with the length of the files names

Hi
Which kind of mount you are doing ?
Try to read about "pfs_mount"

the mount procedire is :

nohup /usr/sbin/pfs_mountd &
nohup /usr/sbin/pfsd &

/usr/sbin/pfs_mount /dev/dsk/c0t0d0 /cdrom

Regards
Enrico P.
Honored Contributor

Re: TAR : Problem with the length of the files names

Hi,
the problem should not be file name length.
Check if you mounted cdrom correctly.

Enrico.
Massimo Bianchi
Honored Contributor

Re: TAR : Problem with the length of the files names

Hi,
i found these two notes in the "man tar"

Due to internal limitations in the header structure, not all file
names of fewer than 256 characters fit when using the N version key.
If a file name does not fit, tar prints a message and does not archive
the file.

Link names are still limited to 100 characters when using the N
version key.


Which options are you using to "tar" the cd ?
Your string is 132 chars..


If you have enough space, i suggest:
- copy the CD on a FS using

cd /cdrom
find .| cpio -pdmuvx /destination_file_system

- if the previous succed, do a tar of the /destination_file_system


so we can exclude problems related to the cdrom

HTH,
Massimo
Michael Kelly_5
Valued Contributor

Re: TAR : Problem with the length of the files names

Christophe,
for the structure of a tar archive see "man 4 tar".
The important items in the structure are:
name - actual name of the file (limited to 100 characters e.g. "BasicMenuUIMenuChangeListenerSelectChildItemAction.class")
prefix - path from the toplevel to the directory (limited to 155 characters e.g. "CSCOpx\CSCOvorb\CSCOvorb_fileset\opt\CSCOpx\www\classpath\com\sun\java\swing\plaf\basic")
linkname - if name is a link, this holds the target (limited to 100 characters).

As Massimo pointed out, there is a warning in the man page for tar that states that there are circumstances when tar will still fail to archive files where these limits are not exceeded.
In any case, tar WILL print a warning if it cannot archive a file due to 'structural' problems. If tar is not printing these warnings, then you have a different problem.

If you just want to archive the CD, why not just use cpio?

Hope this helps,
Michael.
The nice thing about computers is that they do exactly what you tell them. The problem with computers is that they do EXACTLY what you tell them.
Christophe MESTDACH
Occasional Advisor

Re: TAR : Problem with the length of the files names

I used the commands :

- mount /dev/dsk/c0t0d0 /cdrom
- tar cvN csco.tar ./cdrom
Massimo Bianchi
Honored Contributor

Re: TAR : Problem with the length of the files names

Hi,
the problem is in the " -N " option, as printed above.

If you don't need it, don't use it.

HTH,
Massimo
Christophe MESTDACH
Occasional Advisor

Re: TAR : Problem with the length of the files names

I've tryed without "-N" option and the result is the same one.
Massimo Bianchi
Honored Contributor
Solution

Re: TAR : Problem with the length of the files names

Found some info.

Backup of a file with more than 100chars will fail, and no fix is planned.


Try downloading the gnutar, from http://hpux.connect.org.uk/


it has lesser limitations.


HTH,
Massimo
Enrico P.
Honored Contributor

Re: TAR : Problem with the length of the files names

Hi,
the -N option is a default option.
I have created the same path and the same file name in my server running the 11.11 and the tar command has worked well.

Enrico.