One reason might be that DOS used the "/" character for options, whereas in other operating systems the "-" character is used.
Why is the DOS path character "\"? (2005)
11–20 of 166 posts
Re: Why is the DOS path character "\"? (2005)
#12One reason might be that DOS used the "/" character for options, whereas in other operating systems the "-" character is used.
> They couldn't use the *nix form of path separator of "/", because the "/" was being used for the switch character.
Re: Why is the DOS path character "\"? (2005)
#13Re: Why is the DOS path character "\"? (2005)
#14Thanks to Microsoft's recent release of the MS-DOS 2.0 source code, we can now peek under the hood and confirm that Microsoft specifically intended for the DOS 2.0 file APIs to be compatible with Unix. From XENIX.ASM [1], the code that implements the new API: ; ; xenix file calls for MSDOS ; TITLE XENIX - IO system to mimic UNIX And the CONFIG.DOC [2] file discusses the 'AVAILDEV' option which lets the system mimic U…
I really look forward to the day NT's source is released. It's a truly fascinating kernel. Imagine somebody building an entire Unix on top of NT! Like WSL, but even beyond.
Re: Why is the DOS path character "\"? (2005)
#15In addition to its use as a path separator in DOS and Windows, the backslash character itself is also interesting because it is very likely a modern invention, with the first attestation in 1940s (!). Its original use in ASCII (1960s) was for ALGOL operator digraphs `\/` and `/\`. Its early use as the C escape sequence (1970s, replacing `*` in BCPL) suggests that it carried no significant semantics at that time.
https://web.archive.org/web/20100612011533/http://thocp.net/...
Re: Why is the DOS path character "\"? (2005)
#16One reason might be that DOS used the "/" character for options, whereas in other operating systems the "-" character is used.
I never understood why Unix chose "-" for options. It creates unnecessary confusion. E.g. when deleting a directory called "-rf"
Re: Why is the DOS path character "\"? (2005)
#17Earlier quoted context omitted.
I really look forward to the day NT's source is released. It's a truly fascinating kernel. Imagine somebody building an entire Unix on top of NT! Like WSL, but even beyond.
What special about NT kernel that's not in linux kernel ?
Re: Why is the DOS path character "\"? (2005)
#18In addition to its use as a path separator in DOS and Windows, the backslash character itself is also interesting because it is very likely a modern invention, with the first attestation in 1940s (!). Its original use in ASCII (1960s) was for ALGOL operator digraphs `\/` and `/\`. Its early use as the C escape sequence (1970s, replacing `*` in BCPL) suggests that it carried no significant semantics at that time.
One of the comments on that blog post says the backslash was invented by Bob Bemer at the time he developed ASCII in the 1960s, also linking to a page that supports the claim: https://web.archive.org/web/20100612011533/http://thocp.net/...
Re: Why is the DOS path character "\"? (2005)
#19TL;DR: Because the / character was used for options. (as opposed to -, on UNIX)
https://news.ycombinator.com/item?id=26272844
So in principle they could have thought of having something like PATHCHAR=/ as well.
Re: Why is the DOS path character "\"? (2005)
#20One reason might be that DOS used the "/" character for options, whereas in other operating systems the "-" character is used.
I have a feeling that the "-" character for an option is a unix (multics) only thing. It is also worth looking at https://retrocomputing.stackexchange.com/questions/4695/slas... where there is some discussion of the history. Along with https://retrocomputing.stackexchange.com/questions/7030/why-... and https://retrocomputing.stackexchange.com/questions/4686/wher...
> (I still think the Multics path seperator looks more natural >etc>bin - too bad Unix diverted here)
Looks more natural indeed. In fact it's visually similar to how paths are stylised in some file picker GUIs.