Re: tar(1) problem with long file names.
Hello! On Fri, Oct 21, 2005 at 02:07:16PM -0500, eric wrote: It seems that tar(1) is only able to archive filenames of 100 characters or less. However, ufs can handle (I've been testing using touch(1)) filenames up to 255 characters. I tried to modify the following in src/bin/pax/tar.h It's an issue of the (us)tar data format. Especially, raising it to 255 doesn't help either, as the field encodes *path* names, and *path* names can be up to 1023 or so bytes. [...] Has anyone bumped into this and made a more reliable fix? Use a more apt data format in your use case. Ehm correcting myself: According to pax(1), 100 is the limit for pathnames in the old tar format, while the limit for ustar is 250. For *pathnames*!. Perhaps you can use cpio (or pax with -x cpio). [...] - Eric Kind regards, Hannah.
Re: tar(1) problem with long file names.
Hannah Schroeter [EMAIL PROTECTED] wrote: Use a more apt data format in your use case. Ehm correcting myself: According to pax(1), 100 is the limit for pathnames in the old tar format, while the limit for ustar is 250. For *pathnames*!. Perhaps you can use cpio (or pax with -x cpio). Actually, it's the SVR4 cpio format (sv4cpio or the variant sv4crc) you want. 1024-char file/path names, 32-bit inode and device numbers, and even reasonably portable. -- Christian naddy Weisgerber [EMAIL PROTECTED]
Re: tar(1) problem with long file names.
Jay Fenlason [EMAIL PROTECTED] wrote: GNU tar uses a variety of ugly hacks to get around the 100 (original tar) or 255 (ustar) character limit in file and path names. Unfortunatly, only gnu tar can correctly extract such archives. Well, there are at least two independent implementations that can extract this format (star and FreeBSD's new libarchive-based tar), but yes, it is in questionable taste. -- Christian naddy Weisgerber [EMAIL PROTECTED]
Re: tar(1) problem with long file names.
Hello! On Sat, Oct 22, 2005 at 01:43:03PM +, Christian Weisgerber wrote: Hannah Schroeter [EMAIL PROTECTED] wrote: Use a more apt data format in your use case. Ehm correcting myself: According to pax(1), 100 is the limit for pathnames in the old tar format, while the limit for ustar is 250. For *pathnames*!. Perhaps you can use cpio (or pax with -x cpio). Actually, it's the SVR4 cpio format (sv4cpio or the variant sv4crc) you want. 1024-char file/path names, 32-bit inode and device numbers, and even reasonably portable. If the plain cpio format itself isn't up to the task, perhaps the pax manual page should document its limitations. I went by the manual page and saw no mention of restrictions there for cpio, either. Still good to know about that recommendation, I might have some use for it too. Kind regards, Hannah.
Re: tar(1) problem with long file names.
Hello! On Sat, Oct 22, 2005 at 01:46:10PM +, Christian Weisgerber wrote: Jay Fenlason [EMAIL PROTECTED] wrote: GNU tar uses a variety of ugly hacks to get around the 100 (original tar) or 255 (ustar) character limit in file and path names. Unfortunatly, only gnu tar can correctly extract such archives. Well, there are at least two independent implementations that can extract this format (star and FreeBSD's new libarchive-based tar), but yes, it is in questionable taste. That libarchive thing would be interesting, perhaps as port. And support for that pax interchange format would look like an interesting addition to our pax, wouldn't it? Looks like it's a standard format, extends the ustar format and removes its limitations. Kind regards, Hannah.
Re: tar(1) problem with long file names.
On 22 October 2005, Hannah Schroeter [EMAIL PROTECTED] wrote: Hello! On Sat, Oct 22, 2005 at 01:43:03PM +, Christian Weisgerber wrote: Hannah Schroeter [EMAIL PROTECTED] wrote: Use a more apt data format in your use case. Ehm correcting myself: According to pax(1), 100 is the limit for pathnames in the old tar format, while the limit for ustar is 250. For *pathnames*!. Perhaps you can use cpio (or pax with -x cpio). Actually, it's the SVR4 cpio format (sv4cpio or the variant sv4crc) you want. 1024-char file/path names, 32-bit inode and device numbers, and even reasonably portable. If the plain cpio format itself isn't up to the task, perhaps the pax manual page should document its limitations. I went by the manual page and saw no mention of restrictions there for cpio, either. Still good to know about that recommendation, I might have some use for it too. See also the classical articles by Elizabeth Zwicky: http://berdmann.dyndns.org/doc/dump/zwicky/testdump.doc.html http://www.usenix.org/events/lisa03/tech/full_papers/zwicky/zwicky_html/ Regards, Liviu Daia -- Dr. Liviu Daia e-mail: [EMAIL PROTECTED] Institute of Mathematics web page: http://www.imar.ro/~daia of the Romanian Academy PGP key: http://www.imar.ro/~daia/daia.asc
tar(1) problem with long file names.
It seems that tar(1) is only able to archive filenames of 100 characters or less. However, ufs can handle (I've been testing using touch(1)) filenames up to 255 characters. I tried to modify the following in src/bin/pax/tar.h #define TNMSZ 100 /* size of name field */ to #define TNMSZ 255 /* size of name field */ But it didn't seem to work. Has anyone bumped into this and made a more reliable fix? The issue is that with NFS mounts of directories such as iTunes music directories, there's often longer file names than 100 characters. So doing backups or transporting the files is slightly difficult. Thanks. I'm using 3.7-STABLE. - Eric
Re: tar(1) problem with long file names.
On Fri, Oct 21, 2005 at 02:07:16PM -0500, eric wrote: It seems that tar(1) is only able to archive filenames of 100 characters or less. However, ufs can handle (I've been testing using touch(1)) filenames up to 255 characters. I tried to modify the following in src/bin/pax/tar.h You can't do anything about it, it's a limitation of the ustar format. One possible approach is to store an extra table of contents in the archive that you will use to restore the file names from their shortened form. In fact, it's what the pkg tools do...
Re: tar(1) problem with long file names.
On Fri, Oct 21, 2005 at 02:07:16PM -0500, eric wrote: It seems that tar(1) is only able to archive filenames of 100 characters or less. However, ufs can handle (I've been testing using touch(1)) filenames up to 255 characters. I tried to modify the following in src/bin/pax/tar.h #define TNMSZ 100 /* size of name field */ to #define TNMSZ 255 /* size of name field */ But it didn't seem to work. Has anyone bumped into this and made a more reliable fix? The issue is that with NFS mounts of directories such as iTunes music directories, there's often longer file names than 100 characters. So doing backups or transporting the files is slightly difficult. GNU tar uses a variety of ugly hacks to get around the 100 (original tar) or 255 (ustar) character limit in file and path names. Unfortunatly, only gnu tar can correctly extract such archives. If you're willing to live with that restriction, it's in ports. Have fun. :-) -- JF