It Hurts My Teeth When You Say Backslash

 

It Hurts My Teeth When You Say Backslash

How are your floppy disks holding up?

HISTORY

https://commons.wikimedia.org/wiki/File:Windows_PowerShell_1.0_PD.png#/media/File:Windows_PowerShell_1.0_PD.png
Microsoft Corporation, Public domain, via Wikimedia Commons

See that “C:\” in the screenshot? That “\” is a backslash. The “/”’s in “http://somewhere.com/whatever.html” are slashes, not backslashes.

That’s all you need to know. You may stop reading now and go about your business.

But I’m going to stay here rant on for a while because I still sometimes hear people say “h t t p colon backslash backslash” and it hurts me. It makes me grit my teeth and I’m going to tell you why.

Some of this is taken from my 2008 “Linux and Unix Troubleshooting” book which has been on Amazon for many a year but they are going to kill it soon because, duh, who cares in 2021?

Slashes: some history

Way back in the beginning, just after the dinosaurs all died, Microsoft DOS didn’t have sub-directories. You could put files on a disk (usually on a floppy, because hard drives were very expensive back then), but you couldn’t make directories to organize your files.

Unix, which had been around a decade or so longer than anything Microftish, did have subdirectories, and then, as now, a path through multiple directories would be indicated by a “/”. That’s a “forward slash”, or just “slash”. It’s not a “backslash” — “\” is a backslash.

If you are coming from DOS, you might think that “\” is a slash and that “/” is a back-slash, but you’d be wrong. You’ll even hear that on TV or the radio now and then: “double u double-u u double-u backslash greatstuff.com” isn’t uncommon. But it’s wrong.

Even Microsoft itself knows the difference: for example, they once explained a bug in Microsoft Excel at a now dead page as:

When you open a Microsoft Excel for Windows workbook in Microsoft Excel 2004 for Mac, the yen character may appear as a backslash (\) ( from defunct http://support.microsoft.com/kb/870839)

See? Even Microsoft knows what a backslash is.

Unix was here long before Microsoft- so when you see that some Unix thing is vastly different than the way Windows does it, understand that it’s not because Unix didn’t pay attention to Microsoft: Microsoft didn’t exist. It was Microsoft who ignored Unix.

How did we get here?

Anyway, since DOS didn’t have directories, it didn’t need either slashes or back-slashes for that, so they decided to use “/” for something else: command line arguments, like “DIR /P”, which would indicate you wanted to pause your directory listing to keep it from scrolling off the screen.

Why? Because that was the way CP/M did it, and CP/M was the most popular little computer OS, and it didn’t have hierarchical directories either. Unix almost always uses “-” for options like /P, and the designers of both CP/M and DOS certainly knew that. Maybe they wanted to be different, or more likely they felt the “/” was easier to reach on the keyboard, or more obvious. Whatever the reason, that’s what they decided.

New Features!

But very soon, sub-directories were added to DOS. They couldn’t use “/” to separate directories because that was being used for command flags like /P.

So they used “\”, instead.

Oops!

Microsoft knew that this was a problem. Because they knew that people used to Unix would find that confusing (and back then, there were a lot more of those people than people used to DOS!), they added a new command “SWITCHCHAR” (or was it SWITCHAR?) that would swap these characters internally so you could type “/” between directories and “\” for flags. That never caught on, and got dropped after a few years.

So, you need to use “/” in Unix and, because Mac operating systems are Unix based, on Macs. The path of a file on Macs and Unix is separated by “/”’s. Slashes, not backslashes.

Websites

Website addresses are also separated by slashes, not backslashes. That is because Microsoft ignored the Web forever, so by the time they got there, the Unix traditions were already firmly in place. Score one for Unix.

So what?

The most common problem I saw from this confusion was getting people to type “/” when I was trying to lead them through something over the phone. Windows folks would almost always type “\” when I said “slash” and that wouldn’t work.

However, nowadays I rarely lead anyone through anything on the command line, and even the people who say “h t t p colon backslash backslash” will type it correctly, so why do I grind my teeth when I hear it?

Because I’m a grumpy old man and I don’t have a cane to thump while I yell at you.

That’s it. That’s the reason. It really doesn’t matter what you say because we all know what you mean. Since almost nobody works at the command line in Windows or Mac now, you probably haven’t typed a “\” in years and you might be too young to have ever typed one.

So it doesn’t matter except to grumpy old people who were doing ‘puter stuff before Jeff Bezos had anything but his parents’ money to spend. It doesn’t matter except to old farts who have forgotten enough about Unix, CP/M, TRSDOS, and Windows to fill a book (which I did). It doesn’t matter.

But it matters to me and it hurts my teeth!

If you are a grumpy old person or a baffled younger person with something to tell me, have at in the comments or, if you have subscribed to receive these posts by email, you can respond privately from your mailbox.

Content Index

Comments

Popular posts from this blog

Apple Has Fixed More of My Gripes and One of Them is Really Funny

I Owe an Apology to Anyone Using Voice Over

Apple Fitness+ Was a Big Help for My Weight Loss