# Command Line Tar Path Length

Otto Giesenfeld otto.giesenfeld at vindrosen.se
Fri Jul 18 14:30:16 GMT 1997

>I am using the smbclient command line Tar facility to back up the PCs o=
>n our network, but am running into the "tar file \blah\blah\foo\bar....=
>. name length exceeds NAMSIZ" problem.  Am I right in thinking that thi=
> s is a restriction in the Tar format itself?  I tried recompiling smbcl=
>ient with a larger NAMSIZ but then could not read the file from Solaris=
> tar.

But Solaris tar normally supports much longer path names, as long as each
component of the path name (directory names and the file name) is under 100
characters. The problem seems to be that smbclient stores path names
differently compared to Solaris tar. With Solaris tar, there is a separate
entry for each new directory in an archive, but with smbclient, there are
only entries for actual files. Presumably, smbclient stores the entire path
name anew for each file, which effectively limits the size for a path name
to 100 characters.

Does anyone know if there is any particular reason for handling directories
in the described way in smbclient? With Win95 and NT, path names can easily
be more than 100 characters (but there is a 256 character limit, I think),
while single components of a path name almost never go past 100 characters.
Thus, the current situation is a serious problem with backups, but it would
be OK to have the same limitations as Solaris.

Does anyone with more knowledge about the tar format know if the changes
I'm implying are complicated?

Regards,

Otto

------------------------------------------------------------------------
Otto Giesenfeld, Vindrosen AB, Tyska Skolgränd 4-6, SE-111 31 Stockholm,
Sweden, tel: +46 8 789 61 95, +46 70 765 47 17, telefax: +46 8 789 61 96
e-mail: otto.giesenfeld at vindrosen.se