Live data from Hacker News

Why is the DOS path character "\"? (2005)

web.archive.org

61–70 of 166 posts

Re: Why is the DOS path character "\"? (2005)

#61

Earlier 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.

NT originally had a Unix subsystem: https://en.wikipedia.org/wiki/Microsoft_POSIX_subsystem

Yeah, and WSL1 was something similar, but I was suggesting just Unix here, no Win32. Imagine GNU/NT!

Re: Why is the DOS path character "\"? (2005)

#62

Earlier quoted context omitted.

Release != leak

Even the leaks contain enough of Microsoft's spirit in their comments: https://gist.github.com/turbo/75f0905275c29a3049f983cfe273ea... ;)

But sadly a lot of interesting fun and research that could be done with this code won't ever see the light of day because lawyers are scary.

Re: Why is the DOS path character "\"? (2005)

#63

Earlier quoted context omitted.

>in Linux you have ‘root’ and everything else Well, you do have: - capabilities (which are so coarse-grained as to be practically useless) - 8 types of namespaces - seccomp-bpf - LSM (AppArmor, SELinux, TOMOYO, etc)

Yes though a lot of this came "long after" the NT kernel (at least after NT 4.0) A lot of innovations on NT are late as well to be fair, like the whole Application Views (?) of the system (basically an FS/Registry app sandboxing)

This is more like LD_PRELOAD. I’m not sure this is a kernel level feature.

Re: Why is the DOS path character "\"? (2005)

#64
post #51

Earlier quoted context omitted.

Another viewpoint: the problem is caused by Unix allowing any character in filenames (other than slash and null). Other platforms are more restrictive in what characters filenames are allowed to contain. If you banned the '-' character from starting a filename, the problem wouldn't happen. I personally think Unix allowing almost any character in filenames was a mistake. You can put newlines and other control characte…

A coworker of mine got into trouble when he named a directory ~ and then tried to delete it.

I once named a file $HOME and then carelessly tried to delete it without thinking twice.

Re: Why is the DOS path character "\"? (2005)

#66
post #45

Earlier quoted context omitted.

Well, there is this different timeline in the universe where Microsoft decides to keep selling Xenix instead of focusing on MS-DOS.

... and where it is not successful.

That we will never know, Xenix was the most successful PC UNIX clone after all, Microsoft just decided UNIX wasn't the future of PCs.

And they were kind of right, the Year of Desktop UNIX/POSIX is WSL, Android, ChromeOS, macOS.

Re: Why is the DOS path character "\"? (2005)

#67
post #40

Earlier quoted context omitted.

Because paths don't have to start with a drive letter – a path like \foo\bar is relative to the current drive. "DIR \W" does a DIR of the "\W" directory on the current drive. "DIR /W" does a DIR listing in wide format.

I see, didn't know that

Yes, and this is absolutely maddening when trying to do cross-platform work because some programs support / in filenames while others interpret them as arguments.

(Another key difference is that on UNIX the shell expands '*' before passing it to a program, but CMD doesn't so each program has to do its own globbing)

Re: Why is the DOS path character "\"? (2005)

#69
post #27
post #11

Earlier quoted context omitted.

I never understood why Unix chose "-" for options. It creates unnecessary confusion. E.g. when deleting a directory called "-rf"

For everybody reading, a directory called "-rf" is deleted by writing "rm -- -rf"; -- indicates the end of all user-provided options.

If you're working with files, another (perhaps more reliable) way is `rm ./-rf`.

Re: Why is the DOS path character "\"? (2005)

#70

Earlier quoted context omitted.

* It is (with a lot of ifs and buts) a microkernel * it is optimized for integration with third party software from people who don’t have the source, so for instance the driver model is interesting * the built in configuration system (the registry) and how it’s used throughout * the (underused) personalities system you can use to show different apis to different binaries * the security model is much more interesting,…

>in Linux you have ‘root’ and everything else Well, you do have: - capabilities (which are so coarse-grained as to be practically useless) - 8 types of namespaces - seccomp-bpf - LSM (AppArmor, SELinux, TOMOYO, etc)

The big difference is when you're in a multi-computer (Active Directory / NIS / LDAP) environment. On UNIX all the IDs are smallish integers, so you have to be careful to ensure they're unique and non-overlapping. On Windows you have a "SID" which is variable length and (for users) usually a big random number.

https://docs.microsoft.com/en-us/troubleshoot/windows-server...

Windows also differentiates between the human ADMINISTRATOR account and machine "root" accounts like "LOCALSYSTEM".

User accounts are also disambiguated by "domain"; ADMINISTRATOR on the local machine is not automatically the same as the domain-wide ADMINISTRATOR.

Post reply on HN