5 ms·
One reason might be that DOS used the "/" character for options, whereas in other operating systems the "-" character is used.
by fjfaase 6y ago
One reason might be that DOS used the "/" character for options, whereas in other operating systems the "-" character is used.
- peteri 6y agoI 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/slash-versus-backslash-as-directory-separator-what-who-caused-this-rift/ https://retrocomputing.stackexchange.com/questions/4695/slas... where there is some discussion of the history. Along with https://retrocomputing.stackexchange.com/questions/7030/why-did-unix-use-slash-as-the-directory-separator/ https://retrocomputing.stackexchange.com/questions/7030/why-... and https://retrocomputing.stackexchange.com/questions/4686/where-do-command-line-switches-originate-from https://retrocomputing.stackexchange.com/questions/4686/wher...
- rnhmjoj 6y agoFrom the third link: > (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.
- account42 6y agoYeah but imagine having to use Shift for every path separator you type.
- TheCycoONE 6y agoKeyboards may have evolved differently to compensate. The location of non-alphanumeric characters wasn't so consistent back then.
- hibbelig 6y agoGermans type Shift+7 to get /. Imagine their horror when having to type AltGr+- to get a backslash. At least with Shift you can choose which of the Shift keys to use, but there is only one AltGr key (it is to the right of the spacebar, the US keyboard layout has the right Alt key there). It used to be you could use Ctrl+Alt+-, too, and at least those were available on the left hand side, too. But I do not know if Ctrl+Alt works nowadays.
- account42 6y ago> Germans type Shift+7 to get /. Those that are too stubborn to use QWERTY, yes. Seriously, the german keyboard layout is horrible for programming and the few umlauts can easily be entered using compose keys / dead keys / alt combinations / whatever you fancy.
- vincent-manis 6y agoMultics inherited - as a switch character from the earlier MIT time-sharing system CTSS.
- est 6y agoI never understood why Unix chose "-" for options. It creates unnecessary confusion. E.g. when deleting a directory called "-rf"
- Felk 6y agoTechnically deleting a directory is done with the rmdir command. But rm with flags is flexible enough that I've seen very few people use rmdir
- Anarch157a 6y agormdir is usefull when you want to remove all empty subdirs, without touching files or directories with files. Just do 'rmdir *' and you're done.
- account42 6y agoI like using rmdir even for individual directories that I think are empty just so that I don't accidentally delete any files that I did not expect to be there.
- Splognosticus 6y agoI use it whenever I expect a directory to be empty and want an error if for whatever reason it isn't. It's a bit niche, but good to have in your toolbelt.
- josefx 6y agoWouldn't / just cause confusion trying to delete a directory called /rf ?
- est 6y agoThere's no directory called /rf so the mistake can do no harm, as a good design should be.
- 6y ago
- laurent123456 6y agoNot sure if you realise but this is not an "Ask HN" post, it's a link to an article, which of course mentions the reason: > They couldn't use the *nix form of path separator of "/", because the "/" was being used for the switch character.