Fun fact: you can't name any file anywhere in windows 10 "aux.txt" or "aux" anything with any extension, because it was a reserved name in CP/M before dos was a thing.

If you commit "aux.txt" to a git repo, you break it for windows users. If you distribute "aux.txt" in a zip file, windows computers cannot extract it without error.

If this post hits 100 boosts, I will eat the windows kernel live on stream!

@unlofl You know what's super fun about this?

It works in the Linux Subsystem thing, you can use it to create a file that you can't move, delete, copy or modify on the Windows side.

@gudenau @unlofl What I'm worried about is the fact, that I remember aux and what it was for, because CP/M 2.2 was the first real OS I got hands on...

@unlofl Thanks for the hint.I think I'll put a aux.txt in every archive from now on 😆 😆 😆

@unlofl same with anything called "PRN" or "NUL" (and probably others I'm forgetting)

I used CP/M too!
In 1990 I took my dad's old Kaypro 4 to college. I mainly used it for papers and Hunt the Wumpus though.

Luckily, by the next year I had access to the SparcStations in the Engineering lab, which were pretty.

@unlofl What happens if you write such a file to disk with another OS, then try to view that directory or manipulate that file?

@tinytoydragon @unlofl can't open or move it, as expected

also works for directories named con, or nul, or com1, etc

Turns out "aux.h" is pretty common in some software projects, whoops

@unlofl i once created a kicad project containing a "con.sch" for connectors.
could not checkout the repo on Windows.
would have left me stunning if i dind't come form the "copy con ..." era ;)

@unlofl I didn't even know CP/M! While looking it up I found this: "In 1981, Microsoft paid Seattle Software Works for an unauthorized clone of CP/M, and Microsoft licensed this clone to IBM which marketed it as PC-DOS on the first IBM PC in 1981, and Microsoft marketed it to all other PC OEMs as MS-DOS." and Windows 95 and 98 are still CP/M at their essential core. Interesting.

@igeljaeger @trickster OK it's only evil if you work at a place that has people stuck on Windows

... just a little

if [ ! -e aux.txt ]; then
exit 0;

@unlofl also: con, nul, pen, com0 through com9, and lpt0 through lpt9

@unlofl Its easier to dos mac and windows users, just create a upper-case version of a file and symlink to a lowercase!

@unlofl Filenames with "con", "nul", or "prn" also have magical properties.

In the late-90s or so, when AOL still ruled cyberspace, this was a method used to boot people offline. AOL chatrooms allowed users to play any wave files used by the program, like the "You've got mail" clip, by typing {s gotmail (for example). If the wav existed on other's computers it would play the sound for them as well. Someone found that if you entered {s aux/aux it would crash the computer of every user in the chat room. Good times.

@unlofl This is awesome and scary!
Do we have something silly like that on other OSes? Linux? OSX?

@murks no, they all followed the posix idea of putting that stuff in one reserved place, like /dev

Windows decided to keep special reserved names in every single directory, with all file extensions.

@unlofl On the old days of dialup connections, we used to login on IRC and quickly rotate usernames from "com1" to "com5", saying "hi" privately to everyone in the chat. mIRC was the "de facto" Windows IRC client and for every private chat it would create a <username>.log file.

Since modems would use something from COM1 to COM5 to connect, that would either hang up the connection the mIRC user or make their client crash.

@unlofl (My guess for the disconnection is that modems had a couple of commands you could send to them, like "ATDT <number>" for dialing up. Since Windows would mix the COM* file with the COM* port, it would send the content of the log to the modem, which would not recognize it and simply hang up.)

@unlofl At least the condiments can be of your own choosing.

@unlofl Are you going to have it printed in hex on a sheet of sugar paper and eat it?

@unlofl this is true for many cases, including ones after someone has successfully created a file named aux.txt on a windows computer's filesystem

god, this is seriously evil. I wanted to know what error python would throw: None.
The file isn't created, but the script runs without an error.

@unlofl I still use 'copy con: blabla.txt' out of habit.

Old DOS habits die hard.

@unlofl profil, never name your company aug, con, com1, com2, com3 or com4. You won't be able to name any folders or files with your company name. Back in xp days, computers would crash if you tried

@unlofl you also can't call a directory "Trash" on macOS (or couldn't for much of its life, at least, not sure if it's still the case). Trying yields an error message saying "that name is reserved by the operating system"

except in German, where it says "reserved FOR the operating system"

@unlofl (earlier versions of Windows would also trip over files called COM[number])

@unlofl also also, *at least* until Windows 7 Windows can't shut down the system if notepad.exe is running and has an open/save file dialog open. There's a dedicated error message to tell you about the open dialog in notepad and everything.

@unlofl finally, RagTime, a DTP? app for MacOS classic, had a hardcoded limit for how many files you could have open, somewhere around 10-15. trying to open another file once you had reached the limit would give you an error dialog saying "Do you think you can keep track of this many open files? Because RagTime cannot."

@unlofl I just found out about this yesterday when I tried to install an addon from Github for a game, and I needed to change the folder name to "aux". And now it shows up in my mastodon timeline...hmm... 🤨

@jp if some GitHub project is actually pranking you because of my random toot... I'm still sorry you're using Windows.

@unlofl Nah, the folder name was supposed to be "aux-addon". And yes, I'm travelling and can't make the switch just yet. I do have a Debian install working on a USB pen and I use it as much as I can to make myself comfortable with Linux and try alternatives to the windows software I use 😀

@unlofl maybe I'm the minority here but I'm not down with Windows bashing. I like both and both have their flaws.

@Emmdee you are a fresh account with a hot take! :cate:

You don't HAVE TO hate on it, but Windows is bad, because it is badly made by a company that is bad. If someone does all the extra work to make it do something you like, great.

@unlofl Moe accurately: MS Windows breaks the filesystem for all its users (even those who don't hit that malfeature).

Me naming a file `aux.txt` did not break it :-)

Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!