On a Solaris when creating a tar archive using the cf options:

tar cf file.tar dir

and when many nested directories generates very long path names, I get the error:

tar: filename: filename is greater than 100

How to avoid it?

Here is the details of the machine:

# uname -a
SunOS <box-name> 5.10 Generic_125100-10 sun4v sparc SUNW,Sun-Fire-T200
link|improve this question
feedback

2 Answers

That's a restriction of pre-POSIX tar. You can use cpio -H ustar, POSIX standard pax, or install GNU tar.

link|improve this answer
+1 for GNU tar. It also has extensions for handling compression. – Rich Homolka May 31 '11 at 19:10
Thank @geekosaur for the solutions proposed: (unfortunately) I can't install GNU tar but the cpio should work very well! Thanks – Filippo May 31 '11 at 23:47
feedback
up vote 0 down vote accepted

I used the option E

Write a tarfile with extended headers

So the command tar cEf file.tar dir worked smoothly

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.