Live data from Hacker News

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

web.archive.org

101–110 of 166 posts

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

#101

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.

What special about NT kernel that's not in linux kernel ?

My os book in college had an appendies on various OS.

Online the oldest is the 7th edition appendies which has details on A)Unix bsd B)Mach and c)windows 2000.

Windows 2000 was the next version of NT. Interesting if long reads about OS architecture.

http://bcs.wiley.com/he-bcs/Books?action=resource&itemId=047...

“ n the mid-1980s, Microsoft and IBM cooperated to develop the OS/2 operating system, which was written in assembly language for single-processor Intel 80286 systems. In 1988, Microsoft decided to make a fresh start and to develop a “new technology” (or NT) portable operating system that supported both the OS/2 and POSIX application programming interfaces (APIs). In October 1988, Dave Cutler, the architect of the DEC VAX/VMS operating system, was hired and given the charter of building this new operating system.”

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

#102
post #70

Earlier quoted context omitted.

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 huma…

Linux User IDs since decades are 32 bit integers; you can just use some mapping system to allocate them automatically and you’ll never run out. The limitation is that there is one user ID, 0 which can do everything and all the other IDs can do almost nothing. This has nothing to do with domains and everything with the distinction you describe between the Windows Administrator, local system or even more powerful trust…

Compared to Windows SIDs, Linux's 32-bit uid is a "smallish integer"

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

#103
post #73

Do you correct people when they say “back slash” when reading out a url? When it’s actually a forward slash? Is there a name for this phenomenon? Everyone knows it’s a slash except when its used for something computery. Then it somehow becomes a backslash.

I don't have an answer but it's exactly the same phenomenon as when people refer to '#' as a hash-tag.

I'm content because that character finally has a name that people will recognize.

But confusing the name of the two slashes (how come?) has the exact opposite effect, so I don't like it.

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

#104
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"

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…

> the problem is caused by Unix allowing any character in filenames (other than slash and null).

Most Unixes don't allow any character; they allow any byte other than ascii slash or zero. Turning bytes into characters is outside the scope of most Unix kernels and the filesystems therein.

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

#105

Earlier quoted context omitted.

What special about NT kernel that's not in linux kernel ?

* 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,…

> the (underused) personalities system you can use to show different apis to different binaries

Linux has this, but it is, as you say, underused.

https://man7.org/linux/man-pages/man2/personality.2.html

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

#106
post #59

Earlier quoted context omitted.

I mean on Windows it's rd /s /q \path\to\something There's zero ambiguity because both "/" and "\" are special characters.

Except that on Windows, you can use "C:/path/to/something" nearly everywhere where it accepts "C:\path\to\something".

Except C:/ is not a command option, and only Unix people would write "/"

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

#107

Do you correct people when they say “back slash” when reading out a url? When it’s actually a forward slash? Is there a name for this phenomenon? Everyone knows it’s a slash except when its used for something computery. Then it somehow becomes a backslash.

Contextually, yes. Sometimes it matters, sometimes it doesn't. Same thing goes for the dash/underscore distinction. I imagine there must be similar grappling in the editor world between usages of dash vs. hyphen

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

#108

Earlier quoted context omitted.

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!

Apart from fork() and custom async io (epoll, iocp) aren’t they pretty compatible even without cygwin? GNU relies on POSIX (afair), so wouldn’t NT features be unused extra?

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

#109
post #73

Do you correct people when they say “back slash” when reading out a url? When it’s actually a forward slash? Is there a name for this phenomenon? Everyone knows it’s a slash except when its used for something computery. Then it somehow becomes a backslash.

I don't have an answer but it's exactly the same phenomenon as when people refer to '#' as a hash-tag.

Or you can raise musicians' blood pressure by calling it a sharp-sign.

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

#110
post #21
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"

Wouldn't / just cause confusion trying to delete a directory called /rf ?

There's no directory called /rf so the mistake can do no harm, as a good design should be.
Post reply on HN