Today is 2018, and the error message sends us greetings from 1974. This limitation, which is found in recent versions of Windows 10, goes back to the times when not a single
Star Wars episode has been lifted. This bug is as old as
Watergate . When it was written, there was no
UPC barcode on any product, because it was just invented. In those days, there was only one
Telephone Company , which was not divided.
Ted Bundy was free. Babe Ruta's record for home runs was just
preparing to fall .
The Wheel of Fortune has not yet been shown, and no one has seen
The Rocky Horror Horror Show .
Steven Spielberg was then a little-known director,
"Saturday Night Live" did not come out on the screens.
"Edmund Fitzgerald" while carrying iron ore. It was the year of the premiere of the 2 part of the
"Godfather" !
In those days, in Unix, which was only
5 years old , there was a cool idea that “everything is a file”. This means that you can do different things such as writing to sockets, pipes, console, etc. using the same commands and instructions. The concept was moved by
Gary Kildall to
CP / M in 1974. You could copy data from a serial port to a text file or print a text file directly from the command line! In Unix, this is done using special files located in special directories, such as / dev / tty for the console or / dev / lp0 for the first printer. You can get infinite zeros from / dev / zero, random bytes from / dev / random, and so on.
But there is a problem: CP / M is designed for 8-bit computers with very little memory and without hard drives. At best, they had 8 "floppy disks. And directories? You don’t need them. Instead of directories, you just used different disks. But without directories you couldn’t put all your special files in / dev /. Therefore, in fact, they were“ everywhere ”. That is, if you had FOO.TXT and you needed to print it, you could do PIP LST: = FOO.TXT to copy FOO.TXT to an LST file, which is a printer. And it just worked anywhere, because that the directory did not exist.
What about extensions? Everything is also not easy: programs prefer to add the correct extensions to their files. That is, if you run the program and it says “Enter the name of the file to save the list”, you can enter LST to print it or PTP to write it to tape (because in 1974, remember?). But the program may try to add .TXT at the end of the file! And LST.TXT is no longer a printer, right? As if not so. This is it. Device names are recognized regardless of extensions. That is, if “CON” is assigned to the keyboard, then both CON.TXT and CON.BUG too. Hm This is a hack, but it works. While on any rubbish with 4KB RAM, do not care?
')
Well, CP / M was widespread in the late 70s - early 80s. It has become one of the main business operating systems, defining a standard interface. This meant that you could write CP / M code on the
NorthStar Horizon and run it on
Seequa Chameleon . The lack of a graphical standard for the most part prevented it from reaching the gaming market (although there were releases of
Infocom ), orienting it mainly to business users. But still it was significant, so IBM’s desire to use it in its PC project in the early 80s became natural. Then IBM was going to launch an IBM PC with several operating systems, expecting CP / M to become one of the mainstream ones. But CP / M for x86 did not come out six months after the launch of the IBM PC, and it cost $ 240 versus $ 40 for DOS.
As a result, the vast majority of users began to use PC-DOS from Microsoft, which was the evolution of the new OS, developed by
Seattle Computer Products . Microsoft bought a project by Tim Paterson and created on its basis PC-DOS, which later became MS-DOS. Tim Paterson's operating system was called
“QDOS” , which meant “Quick and Dirty Operating System” (“fast and dirty operating system”). It was based on CP / M, which did not have the x86 version, and tried to solve some CP / M limitations. In many ways, these were very similar systems. One of the common features was the idea of ​​using special files and the absence of directories. Therefore, QDOS and PC-DOS 1.0 had all of these AUX, PRN, CON, LPT, etc.
With the release of PC-DOS 2.0 in 1983 for Microsoft's new IBM XT, Microsoft has significantly reworked PC-DOS. You obviously just needed directories to keep in order your huge 10 MB disks that appeared on the market then. And again, bad luck: users have been working with their special files for a couple of years since the release of the previous version of PC DOS 1.0. Programs and scripts were written to use these files. With the support of directories, Microsoft could finally remove everything in C: \ DEV ..., but did not do that. As it will happen more than once, Microsoft has brought common sense to the backward compatibility altar: special files remain in each directory with any extension. This legacy has been carried through all versions up to Windows 95. But wait a minute, we are not using Windows 95 now, because the modern branch of operating systems is based on Windows NT. But she also needed compatibility with DOS / Windows programs. Therefore, these special files are still working, after forty-four fucking years! Try it yourself: open explorer, create a new text file and name it con.txt. aux.txt or prn.txt. It was not there.
That is, thanks to Gary Kildall, who said, “Special files represent e-learning! Great idea, unix. I borrow it and try to implement it in my toy operating system ”so long ago that people born then may already have children who are allowed to drink alcohol ... we still cannot name the files con.txt. Microsoft even has a special
list : CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, ​​COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. To heighten the fun, remember that an attempt to access C: \ con \ con (or C: \ aux \ aux) immediately threw Windows 95 into the BSOD. It was funny in 1995, because then this bug was already 21 years old!
PrehistoryI came across this when I realized that I have a file that cannot be copied. These special file names are implemented at the OS level, and not at the file system level. Thus, they are valid file names in NTFS. And I used NTFS disk in linux. And apparently, OS / 2 does not support this system of special names, as a result of which among the opengl files was AUX.H on one of the disks for Devcon.
And today I tried to backup this NTFS disk on my main computer, and “oops, I can't copy all the files because of a bug older than most people who read this.”
ExplanationsIn CP / M, working with special names is actually not as simple as I described. For example, to access a device, you need a colon in the name: PRN: is a printer, but PRN is not. In addition, in CP / M, working with device files is not implemented at the OS level, as in DOS. This is just part of the PIP command to copy files. That is, you can not turn, as in DOS, a trick with the program to save PRN.TXT in order to print it.
And just in case, I clarify: I do not mean anything like "Wind - sucks." Backward compatibility is usually a great thing. Actually, I want MORE backward compatibility, no less. I just went nuts, faced with a 44-year-old bug on running Windows 10 while trying to copy from one USB 3.0 SSD drive to another SSD. It's like living on a space station and being trampled by a horse.