6

Why do they have different names for the same command, listing a directory? Surely, they could have talked to each other and agreed on one common name, such as for example cd which is the same for both unix and dos.

This decision to have different names has created many headaches for developers and users and also increased incompatibility between the two systems. Did they do it on purpose? Then how come "cd" is the same?

Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311
siamii
  • 315

2 Answers2

17

Note that Unix came first (the wording of your question makes it look like it was the other way round).

DOS inherited the dir command from CP/M, which got it from VMS. The / character to introduce options (which forced DOS to adopt a different character as the directory separator, when directories were introduced) had the same origin.

Why didn't the VMS designers follow Unix? Because when VMS was designed, Unix was still young, and hadn't become the de facto standard that it would later become (in part thanks to the POSIX standardization effort). VMS and Unix had different designs in many respects; I doubt there was a deliberate effort to make them incompatible. CP/M and DOS, and early versions of Windows followed VMS because there was no compelling reason to pick Unix over VMS at that time; the lead designer of Windows NT had previously worked on VMS, which further influenced Windows towards VMS rather than Unix. Later, when Unix came out as the standard operating system on servers, Windows was too firmly entrenched as different to change. Nonetheless, Windows did acquire some limited amount of POSIX compatibility (sometimes through third-party software); for example internal APIs do accept / as a path separator.

4

The commands are different because they were developed pretty much in parallel, without interaction. DOS commands are generally derivative of QDOS, which itself was derivative of CP/M, Gary Kildall's Control Program for Microcomputers, which was pretty much the first operating system for Intel microprocessors, originally intended for Intel's 8080 CPU, and written in large part to enable PL/M to control a floppy disk drive. This all happened in the early 1970s.

Linux is largely derivative of Unix, with many of the commands having identical names performing identical (or very, very, similar functions). Unix was being developed starting in 1969, and so much of the initial command naming happened in parallel with CP/M.

CP/M was aimed at personal computers, while Unix was aimed at minicomputers, generally in corporate labs, or university research centers, and there was really no collaboration between the two efforts.

Now it's largely kept the way it is to ensure differentiation, with neither side willing to admit the other's naming convention is superior.

Both systems allow command aliases, though.