The System360 Model 20 Wasn't As Bad As All That 3863
The System360 Model 20 Wasn't As Bad As All That 3868
My interviews with old officemate from Livermore continue. We have been talking about early OSes: they hate the world for destroying their perfect computing environment. Octopus and Gob, what hacks...
Rostyslaw J. Lewyckyj
A copy-b command should not add any ^Z. Theb switch tells the copy process to continue past any ^Z in the source file and out to the number of bytes indicated in the file length and does not add a terminating ^Z to the new file.
Without theb switch, copy terminates a file read at a ^Z even if there are more bytes as indicated by file length. Two text files of 7 bytes (last being ^Z) concatenate to 13 bytes (the ^Z from the first file is discarded). If neither file had any ^Z terminator (6 bytes each), the concatenated file would still be 13 bytes since a ^Z would be added at the end of the copy process.
With theb switch, the two 7 byte files concatenate to 14 bytes (the ^Z's in the source file are preserved) and the two 6 byte files concatenate to 12 bytes (no ^Z is added by the copy).
was: The System360 Model 20 Wasn't As Bad As All That
Your fairy dust is not working. Competing fairies have counter spells in place. Use is changing, evolving. Kicking and flogging are ineffective means to...
BUT - if you were to try to TYPE the two files created with theb option, the 14 byte file will only output 6 bytes because TYPE stops when it encounters a ^Z.
The System360 Model 20 Wasn't As Bad As All That 3864
Well, it's like this: xx0.txt .. xx9.txt are what my Nortons file recovery program named the fragments. Norton did not...
It sounds like using theb option is the right thing to do to concatenate recovered file fragments, especially if they may have had binary data, so you may not want to go eliminate ^Z from the files.
However, if the xx?.txt are recovered file fragments, you may have a different problem. Often, recovered file fragments are the entire allocation block. This is generally ok for all fragments except the last one. The original file may have used only 100 bytes of the last allocation block but your recovered fragment may be the full size of an allocation block. Thus, when you use theb switch, the entire contents of the last file fragment are appended instead of only the first 100 bytes.
But if you don't useb, any binary data that happens to be ^Z will terminate the read of the file it's in. What I would do is try to identify where the end of the last block is. Look for gort in xx9.txt when you open it with a text editor and try to delete the garbage and re-save the file (on copies of the original files, of course). A text editor may not be reliable for this purpose. A binary editor would be better.
Now IF the last block actually has a ^Z where the end of the file should be, you could use theb switch for fragments 1 through 8 and then turn theb switch off to concatenate the last fragment. That would prevent the gort from being appended.
Here's a trick to tell if a file contains a ^Z. A simple copy of a file will not stop if the file contains embedded ^Z, only when appending. Thus, two 13 byte ^Z terminated files append to a 26 byte file when usingb. The 26 byte file has a ^Z in the middle. Simply copying the 26 byte file doesn't reveal the embedded ^Z.
But, if you make a 0 byte file...
The System360 Model 20 Wasn't As Bad As All That 3865
Rostyslaw J. Lewyckyj As pointed out elsewhere, they are in the cmd.exe on Win 2000-XP, not command.com. That's irrelevant to me because I only use cmd.exe. If you run cmd.exe in a window...
^Z 1 file(s) copied.
...and append that to the 26 byte file (withoutb), you get a 13 byte file. This is because during an append withoutb, the 26 byte file stops copying when it hits the embedded ^Z (12 bytes), appends 0 bytes fromm zzz and finally adds a ^Z terminator.
So if appending a zero length file to a non-zero length file withoutb causes the copy to be smaller than the original, then the original contained an embedded ^Z.
The System360 Model 20 Wasn't As Bad As All That 3866
This is on a Windows 98 box? MS didn't invest much in DOS after 6.2. Since that version of Windows depended on...
Alt Folklore Computers Newsgroups