This is a discussion on problem adding files to tar file within the Sco Unix forums, part of the Unix Operating Systems category; --> This is 5.0.5 box. I am trying to accumulate multiple files in a single tar file. Files are added ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| This is 5.0.5 box. I am trying to accumulate multiple files in a single tar file. Files are added daily, so I would need to add them to tar file, uniqness of the file names is guarantied. Here is simple example showing the problem I am running into: $ tar ncvf A x* seek = 0K a x1 548K seek = 548K a x2 252K $ tar nuvf A y* tar: buffer size = 10K seek = 800K a y1 594K seek = 1395K a y2 594K seek = 1989K a y3 594K $ tar tvf A tar: blocksize = 20 rw-rw-r--243/50 560131 Dec 18 13:29 2002 x1 rw-rw-r--243/50 257334 Dec 18 14:55 2002 x2 tar: directory checksum error $ l total 10374 -rw-rw-r-- 1 haa group 2637824 Apr 12 18:22 A -rw-rw-r-- 1 haa group 560131 Dec 18 2002 x1 -rw-rw-r-- 1 haa group 257334 Dec 18 2002 x2 -rw-rw-r-- 1 haa group 608255 Dec 18 2002 y1 -rw-rw-r-- 1 haa group 608226 Dec 18 2002 y2 -rw-rw-r-- 1 haa group 607769 Dec 18 2002 y3 I tried tar "r" instead of "u" with the same outcome: resulting in a tar file with directory checksum error. Any ideas how to do it properly will be appreciated, Regards, Michael. |
| |||
| "migur" <migurus@yahoo.com> wrote in message news:a03d8dd9.0404121749.32d8a60c@posting.google.c om... > This is 5.0.5 box. > I am trying to accumulate multiple files in a single tar file. > Files are added daily, so I would need to add them to tar file, > uniqness of the file names is guarantied. > > Here is simple example showing the problem I am running into: > > > $ tar ncvf A x* > seek = 0K a x1 548K > seek = 548K a x2 252K > > $ tar nuvf A y* > tar: buffer size = 10K > seek = 800K a y1 594K > seek = 1395K a y2 594K > seek = 1989K a y3 594K > > $ tar tvf A > tar: blocksize = 20 > rw-rw-r--243/50 560131 Dec 18 13:29 2002 x1 > rw-rw-r--243/50 257334 Dec 18 14:55 2002 x2 > tar: directory checksum error > > $ l > total 10374 > -rw-rw-r-- 1 haa group 2637824 Apr 12 18:22 A > -rw-rw-r-- 1 haa group 560131 Dec 18 2002 x1 > -rw-rw-r-- 1 haa group 257334 Dec 18 2002 x2 > -rw-rw-r-- 1 haa group 608255 Dec 18 2002 y1 > -rw-rw-r-- 1 haa group 608226 Dec 18 2002 y2 > -rw-rw-r-- 1 haa group 607769 Dec 18 2002 y3 > > I tried tar "r" instead of "u" with the same outcome: resulting in a > tar file with directory checksum error. > > Any ideas how to do it properly will be appreciated, > Regards, > Michael. I tried what you have on 5.0.6 and it does as expected. Try the reverse order. Perhaps there is a problem with the file x2 or y1. Ron |
| |||
| "Ronald J Marchand" <rojomar@covad.net> wrote in message news:<e0806$407be5f5$42a6716f$13013@msgid.meganews servers.com>... > "migur" <migurus@yahoo.com> wrote in message > news:a03d8dd9.0404121749.32d8a60c@posting.google.c om... > > This is 5.0.5 box. > > I am trying to accumulate multiple files in a single tar file. > > Files are added daily, so I would need to add them to tar file, > > uniqness of the file names is guarantied. > > > > Here is simple example showing the problem I am running into: > > > > > > $ tar ncvf A x* > > seek = 0K a x1 548K > > seek = 548K a x2 252K > > > > $ tar nuvf A y* > > tar: buffer size = 10K > > seek = 800K a y1 594K > > seek = 1395K a y2 594K > > seek = 1989K a y3 594K > > > > $ tar tvf A > > tar: blocksize = 20 > > rw-rw-r--243/50 560131 Dec 18 13:29 2002 x1 > > rw-rw-r--243/50 257334 Dec 18 14:55 2002 x2 > > tar: directory checksum error > > > > $ l > > total 10374 > > -rw-rw-r-- 1 haa group 2637824 Apr 12 18:22 A > > -rw-rw-r-- 1 haa group 560131 Dec 18 2002 x1 > > -rw-rw-r-- 1 haa group 257334 Dec 18 2002 x2 > > -rw-rw-r-- 1 haa group 608255 Dec 18 2002 y1 > > -rw-rw-r-- 1 haa group 608226 Dec 18 2002 y2 > > -rw-rw-r-- 1 haa group 607769 Dec 18 2002 y3 > > > > I tried tar "r" instead of "u" with the same outcome: resulting in a > > tar file with directory checksum error. > > > > Any ideas how to do it properly will be appreciated, > > Regards, > > Michael. > > I tried what you have on 5.0.6 and it does as expected. Try the reverse > order. Perhaps there is a problem with the file x2 or y1. > > Ron Well, I tried many different files, and those are just plain ascii text data, I do not have control in which sequence files are coming - I need to add them to tar archive, and this tar: $ type tar tar is /usr/bin/tar $ ls -l /usr/bin/tar lrwxrwxrwx 1 root root 35 Nov 10 1999 /usr/bin/tar -> /opt/K/SCO /Unix/5.0.5Eb/usr/bin/tar seem to not working, or I do not understand the syntax? In fact, I just ran the same sequence of commands (tar ncf ..., then tar nuf ... ) on 5.0.7 box and got same problem. Any help will be appreciated, Michael. |
| |||
| migurus@yahoo.com (migur) expounded in news:a03d8dd9.0404121749.32d8a60c@posting.google.c om: > This is 5.0.5 box. > I am trying to accumulate multiple files in a single tar file. > Files are added daily, so I would need to add them to tar file, > uniqness of the file names is guarantied. > > Here is simple example showing the problem I am running into: > > > $ tar ncvf A x* > seek = 0K a x1 548K > seek = 548K a x2 252K > > $ tar nuvf A y* > tar: buffer size = 10K > seek = 800K a y1 594K > seek = 1395K a y2 594K > seek = 1989K a y3 594K > > $ tar tvf A > tar: blocksize = 20 > rw-rw-r--243/50 560131 Dec 18 13:29 2002 x1 > rw-rw-r--243/50 257334 Dec 18 14:55 2002 x2 > tar: directory checksum error > > $ l > total 10374 > -rw-rw-r-- 1 haa group 2637824 Apr 12 18:22 A > -rw-rw-r-- 1 haa group 560131 Dec 18 2002 x1 > -rw-rw-r-- 1 haa group 257334 Dec 18 2002 x2 > -rw-rw-r-- 1 haa group 608255 Dec 18 2002 y1 > -rw-rw-r-- 1 haa group 608226 Dec 18 2002 y2 > -rw-rw-r-- 1 haa group 607769 Dec 18 2002 y3 > > I tried tar "r" instead of "u" with the same outcome: resulting in a > tar file with directory checksum error. > > Any ideas how to do it properly will be appreciated, > Regards, > Michael. Interesting. I tried it here (also OSR 5.0.5) and had the same problem. I'd never noticed that before, but I don't usually add files to a tar archive. I don't have a solution for you. I partly just wanted to confirm the problem, although I do have a couple of things to add. I tried adding a block size to the tar commands. No effect. I noticed that if I ran the tar commands again when a "bad" archive existed, the new archive was OK. IOW, I run the commands you gave and create an archive called A. "tar tvf A" gives the directory checksum error. I leave A and run the same tar commands again and this time "tar tvf A" lists the complete archive with no errors. Delete A and run the commands again and I get the error again. Run the commands again without deleting A first and I get a good archive again. Very odd. I tried creating A first, but putting other files in it, and then running your commands and I got the error again. It was only when I created A from those same files and then ran your commands that I didn't get the error. But I don't know if that was due to the specific content or something else, like the overall size of the file. James |
| |||
| "Ronald J Marchand" <rojomar@covad.net> expounded in news:e0806$407be5f5$42a6716f$13013@msgid.meganewss ervers.com: > "migur" <migurus@yahoo.com> wrote in message > news:a03d8dd9.0404121749.32d8a60c@posting.google.c om... >> This is 5.0.5 box. >> I am trying to accumulate multiple files in a single tar file. >> Files are added daily, so I would need to add them to tar file, >> uniqness of the file names is guarantied. >> >> Here is simple example showing the problem I am running into: >> >> >> $ tar ncvf A x* >> seek = 0K a x1 548K >> seek = 548K a x2 252K >> >> $ tar nuvf A y* >> tar: buffer size = 10K >> seek = 800K a y1 594K >> seek = 1395K a y2 594K >> seek = 1989K a y3 594K >> >> $ tar tvf A >> tar: blocksize = 20 >> rw-rw-r--243/50 560131 Dec 18 13:29 2002 x1 >> rw-rw-r--243/50 257334 Dec 18 14:55 2002 x2 >> tar: directory checksum error >> >> $ l >> total 10374 >> -rw-rw-r-- 1 haa group 2637824 Apr 12 18:22 A >> -rw-rw-r-- 1 haa group 560131 Dec 18 2002 x1 >> -rw-rw-r-- 1 haa group 257334 Dec 18 2002 x2 >> -rw-rw-r-- 1 haa group 608255 Dec 18 2002 y1 >> -rw-rw-r-- 1 haa group 608226 Dec 18 2002 y2 >> -rw-rw-r-- 1 haa group 607769 Dec 18 2002 y3 >> >> I tried tar "r" instead of "u" with the same outcome: resulting in a >> tar file with directory checksum error. >> >> Any ideas how to do it properly will be appreciated, >> Regards, >> Michael. > > I tried what you have on 5.0.6 and it does as expected. Try the reverse > order. Perhaps there is a problem with the file x2 or y1. What size files did you try? I first tried it with some small files (the largest was probably around 14 KB and most were much smaller) and got no error. But when I tried it with some larger files (the total size of the 5 files was a little over 2 MB), I got the same error he did. James |
| |||
| migurus@yahoo.com (migur) expounded in news:a03d8dd9.0404121749.32d8a60c@posting.google.c om: > This is 5.0.5 box. > I am trying to accumulate multiple files in a single tar file. > Files are added daily, so I would need to add them to tar file, > uniqness of the file names is guarantied. > > Here is simple example showing the problem I am running into: > > > $ tar ncvf A x* > seek = 0K a x1 548K > seek = 548K a x2 252K > > $ tar nuvf A y* > tar: buffer size = 10K > seek = 800K a y1 594K > seek = 1395K a y2 594K > seek = 1989K a y3 594K > > $ tar tvf A > tar: blocksize = 20 > rw-rw-r--243/50 560131 Dec 18 13:29 2002 x1 > rw-rw-r--243/50 257334 Dec 18 14:55 2002 x2 > tar: directory checksum error > > $ l > total 10374 > -rw-rw-r-- 1 haa group 2637824 Apr 12 18:22 A > -rw-rw-r-- 1 haa group 560131 Dec 18 2002 x1 > -rw-rw-r-- 1 haa group 257334 Dec 18 2002 x2 > -rw-rw-r-- 1 haa group 608255 Dec 18 2002 y1 > -rw-rw-r-- 1 haa group 608226 Dec 18 2002 y2 > -rw-rw-r-- 1 haa group 607769 Dec 18 2002 y3 > > I tried tar "r" instead of "u" with the same outcome: resulting in a > tar file with directory checksum error. > > Any ideas how to do it properly will be appreciated, > Regards, > Michael. One other thing. If all else fails, you could give gtar (GNU tar) a try. The version I have seemed to work OK doing the same commands. Note that gtar, at least the version I have, doesn't support the "n" ("not a tape device") option and I couldn't find a similar option, but it doesn't seem to need it. I'm not sure where I got gtar, but it was probably from ftp.sco.com, which could be a problem since the server seems to be in a state of flux right now. I imagine you can find it somewhere else on the 'Net. Or I could email you a copy of the gtar installation file I have. If nothing else, there seems to be a gtar executable (with no documentation, etc.) at ftp://stage.caldera.com/skunkware/osr5/bin/gtar . James |
| |||
| James J wrote: > migurus@yahoo.com (migur) expounded in > news:a03d8dd9.0404121749.32d8a60c@posting.google.c om: > >> This is 5.0.5 box. >> I am trying to accumulate multiple files in a single tar file. >> Files are added daily, so I would need to add them to tar file, >> uniqness of the file names is guarantied. >> >> Here is simple example showing the problem I am running into: >> >> >> $ tar ncvf A x* >> seek = 0K a x1 548K >> seek = 548K a x2 252K >> >> $ tar nuvf A y* >> tar: buffer size = 10K >> seek = 800K a y1 594K >> seek = 1395K a y2 594K >> seek = 1989K a y3 594K >> >> $ tar tvf A >> tar: blocksize = 20 >> rw-rw-r--243/50 560131 Dec 18 13:29 2002 x1 >> rw-rw-r--243/50 257334 Dec 18 14:55 2002 x2 >> tar: directory checksum error >> >> $ l >> total 10374 >> -rw-rw-r-- 1 haa group 2637824 Apr 12 18:22 A >> -rw-rw-r-- 1 haa group 560131 Dec 18 2002 x1 >> -rw-rw-r-- 1 haa group 257334 Dec 18 2002 x2 >> -rw-rw-r-- 1 haa group 608255 Dec 18 2002 y1 >> -rw-rw-r-- 1 haa group 608226 Dec 18 2002 y2 >> -rw-rw-r-- 1 haa group 607769 Dec 18 2002 y3 >> >> I tried tar "r" instead of "u" with the same outcome: resulting in a >> tar file with directory checksum error. >> >> Any ideas how to do it properly will be appreciated, >> Regards, >> Michael. > > > Interesting. I tried it here (also OSR 5.0.5) and had the same > problem. I'd never noticed that before, but I don't usually add files > to a tar archive. I don't have a solution for you. I partly just > wanted to confirm the problem, although I do have a couple of things > to add. > > I tried adding a block size to the tar commands. No effect. > > I noticed that if I ran the tar commands again when a "bad" archive > existed, the new archive was OK. IOW, I run the commands you gave and > create an archive called A. "tar tvf A" gives the directory checksum > error. I leave A and run the same tar commands again and this time > "tar tvf A" lists the complete archive with no errors. Delete A and > run the commands again and I get the error again. Run the commands > again without deleting A first and I get a good archive again. Very > odd. I tried creating A first, but putting other files in it, and > then running your commands and I got the error again. It was only > when I created A from those same files and then ran your commands > that I didn't get the error. But I don't know if that was due to the > specific content or something else, like the overall size of the file. > > James damn, and I thought it was just me. I tried to use that feature for the first time a couple weeks ago on a 5.0.6 box and it would work a few times and then fail, no pattern other than it never made it to 10 appendings. The files were tiny, 80 or 160 bytes of plain text. I'm trying to keep copies of little edi files that are generated every few minutes all day long so that we can track failures better and prove whether the data was created properly, whether the ftp suceeded (proven by downloading the file after uploading and "cmp"ing the original and downloaded) etc... I gave up and switched to just using a temp file naming scheme that includes the date & time and I just don't delete any files all day long, then the first time the script runs after the date changes, it notices that there are files with names that don't match todays date, and tars up all of yesterdays files before proceeding with the current task. This ends up actually being more convenient as a bonus because now all during the day my less well-rounded coworkers have easier ready access to the recent files since all of todays files are sitting there in a directory in plain text ready to less or vi (I used to think the users were the biggest babies but try to tell a programmer how to list a tar and extract one file or extract all files but in a safe directory, and don't even think about injecting a compressor into that conversation...) -- Brian K. White -- brian@aljex.com -- http://www.aljex.com/bkw/ +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++. filePro BBx Linux SCO Prosper/FACTS AutoCAD #callahans Satriani |
| |||
| migurus@yahoo.com (migur) wrote in message news:<a03d8dd9.0404130913.4fe6262b@posting.google. com>... > "Ronald J Marchand" <rojomar@covad.net> wrote in message news:<e0806$407be5f5$42a6716f$13013@msgid.meganews servers.com>... > > "migur" <migurus@yahoo.com> wrote in message > > news:a03d8dd9.0404121749.32d8a60c@posting.google.c om... > > > This is 5.0.5 box. > > > I am trying to accumulate multiple files in a single tar file. > > > Files are added daily, so I would need to add them to tar file, > > > uniqness of the file names is guarantied. > > > > > > Here is simple example showing the problem I am running into: > > > > > > > > > $ tar ncvf A x* > > > seek = 0K a x1 548K > > > seek = 548K a x2 252K > > > > > > $ tar nuvf A y* > > > tar: buffer size = 10K > > > seek = 800K a y1 594K > > > seek = 1395K a y2 594K > > > seek = 1989K a y3 594K > > > > > > $ tar tvf A > > > tar: blocksize = 20 > > > rw-rw-r--243/50 560131 Dec 18 13:29 2002 x1 > > > rw-rw-r--243/50 257334 Dec 18 14:55 2002 x2 > > > tar: directory checksum error > > > > > > $ l > > > total 10374 > > > -rw-rw-r-- 1 haa group 2637824 Apr 12 18:22 A > > > -rw-rw-r-- 1 haa group 560131 Dec 18 2002 x1 > > > -rw-rw-r-- 1 haa group 257334 Dec 18 2002 x2 > > > -rw-rw-r-- 1 haa group 608255 Dec 18 2002 y1 > > > -rw-rw-r-- 1 haa group 608226 Dec 18 2002 y2 > > > -rw-rw-r-- 1 haa group 607769 Dec 18 2002 y3 > > > > > > I tried tar "r" instead of "u" with the same outcome: resulting in a > > > tar file with directory checksum error. > > > > > > Any ideas how to do it properly will be appreciated, > > > Regards, > > > Michael. > > > > I tried what you have on 5.0.6 and it does as expected. Try the reverse > > order. Perhaps there is a problem with the file x2 or y1. > > > > Ron > > Well, I tried many different files, and those are just plain ascii > text data, I do not have control in which sequence files are coming - > I need to add them to tar archive, and this tar: > > $ type tar > tar is /usr/bin/tar > $ ls -l /usr/bin/tar > lrwxrwxrwx 1 root root 35 Nov 10 1999 /usr/bin/tar -> > /opt/K/SCO > /Unix/5.0.5Eb/usr/bin/tar > > seem to not working, or I do not understand the syntax? > In fact, I just ran the same sequence of commands (tar ncf ..., then > tar nuf ... ) on 5.0.7 box and got same problem. > Any help will be appreciated, > Michael. Per J James suggestion I tried gnu tar and it worked just fine. I wonder if the problem with SCO's version of tar is well-known? Is there a workaround? Regards, Michael. |
| |||
| "James J" <SPAMMYjajii1@netscape.net> wrote in message news:Xns94CA9D1E7E84Ejajii1netscape@205.188.138.16 1... > "Ronald J Marchand" <rojomar@covad.net> expounded in > news:e0806$407be5f5$42a6716f$13013@msgid.meganewss ervers.com: > << snip >> > What size files did you try? I first tried it with some small files (the > largest was probably around 14 KB and most were much smaller) and got no > error. But when I tried it with some larger files (the total size of the 5 > files was a little over 2 MB), I got the same error he did. > > James I also tried this on two directories containing large files and it presented no problem. Apparently the problem is fixed on 5.0.6. Maybe there is a patch for 5.0.5 I wonder if the executable from 5.0.6 will run on 5.0.5??? Ron |
| ||||
| migur wrote: > > This is 5.0.5 box. > I am trying to accumulate multiple files in a single tar file. > Files are added daily, so I would need to add them to tar file, > uniqness of the file names is guarantied. > > Here is simple example showing the problem I am running into: > > $ tar ncvf A x* > seek = 0K a x1 548K > seek = 548K a x2 252K > > $ tar nuvf A y* > tar: buffer size = 10K > seek = 800K a y1 594K > seek = 1395K a y2 594K > seek = 1989K a y3 594K > > $ tar tvf A > tar: blocksize = 20 > rw-rw-r--243/50 560131 Dec 18 13:29 2002 x1 > rw-rw-r--243/50 257334 Dec 18 14:55 2002 x2 > tar: directory checksum error > > $ l > total 10374 > -rw-rw-r-- 1 haa group 2637824 Apr 12 18:22 A > -rw-rw-r-- 1 haa group 560131 Dec 18 2002 x1 > -rw-rw-r-- 1 haa group 257334 Dec 18 2002 x2 > -rw-rw-r-- 1 haa group 608255 Dec 18 2002 y1 > -rw-rw-r-- 1 haa group 608226 Dec 18 2002 y2 > -rw-rw-r-- 1 haa group 607769 Dec 18 2002 y3 > > I tried tar "r" instead of "u" with the same outcome: resulting in a > tar file with directory checksum error. > > Any ideas how to do it properly will be appreciated, > Regards, > Michael. Ran into a similar issue with 5.0.2 IFRC. A script would add email to a tar archive, EDI sessions in reality, that we wanted to keep track of. Everything worked perfectly for a while, email would accumulate in the mail file, then would be copied to a unique file and added to the tar archive before the application read it. To my surprise I found the archive unreadable after a while. Many attempts to debug the issue resulted in random failures. I reported the issue to SCO, who were unable to duplicate the problem. When you have a bad tar archive, scan through it with "hd" to the failure location ( which you can determine from the file sizes ). Do you see some FF or 00 bytes? Mike -- Michael Brown The Kingsway Group |