Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from unix.stackexchange.com Nov 6 '11 at 16:53

This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems..

    
Note that PowerShell – the new and preferred command line for Windows – defines both ls and dir as aliases to the underlying Get-ChildItem (which is capable of operating the registry and other (possibly user installed providers) in addition to the file system). –  Richard Nov 15 '11 at 14:38

2 Answers 2

up vote 17 down vote accepted

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.

share|improve this answer
    
Aside: Apparently, all MS-DOS syscalls accepted / as a path separator, it's just that commands didn't. (MS-DOS v2 did have an option to change the command-line path separator to / and option prefix to -, due to many its developers being used to Xenix.) –  grawity Nov 6 '11 at 17:26
1  
Unix goes back to 1969, and the first published documentation was released in 1971. MSDOS started as Seattle Computer Product's QDOS (Quick and Dirty OS), which started development in 1980. By then most new programmers had been exposed to Unix in college, and others knew of it. There were multiple opportunities for SCP, MS, and IBM (who of course commissioned MSDOS) to switch to Unix standards (would probably have taken about two days), but it unfortunately didn't happen. I suspect it was a combination of ignorance and arrogance. –  Daniel R Hicks Nov 6 '11 at 20:33
    
@DanH Not so much: in those days, VMS and other operating systems that have now been thoroughly forgotten outside IBM were still serious contenders. –  Gilles Nov 6 '11 at 20:37
    
By the late 70s UNIX was "where it was at", even though the others were still hanging around. Certainly if DOS had been created even just a year later then UNIX would have been, without doubt, the de facto standard. (Perhaps more irritating is that many of the internals that were added later were created from "whole cloth" rather than copying UNIX paradigms.) –  Daniel R Hicks Nov 6 '11 at 20:50
1  
VMS wasn't available until 77, CP/M was developped in 73/74. But there are sources of DEC influences: CP/M was developed on TOPS-10 and PDP-10 (as were early MS products). TOPS-10 has a DIRECT command. TOPS-20 (another PDP-10 OS), has a DIRECTORY command which can be abbreviated to DIR. ISTR that DEC OSes for the PDP-11 (included the VMS inspirator RSX-11 by Cutter as well) where also using the same nomenclature (and thus probably also command names based of DIRECTORY). About Unix, ISTR that Unix didn't spread out of Bell before 1974/1975, probably to late to have an influence on CP/M. –  AProgrammer Nov 7 '11 at 16:11

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.