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

@gudenau @unlofl You can also name it that way by accessing the NTFS filesystem in a POSIX compatible way (using \\.\ in Powershell), allowing you to create and delete files with those names.

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

@nipos @unlofl Ditto here for all my GitHub projects. (They're Linux-only anyway, so if anyone downloads them on Windows, I'm instantly suspicious.)

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

@yakkoj @unlofl recently ran into this when creating a folder named CON

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 ;)

@xor @unlofl The copy con era... Wow. That takes me back.

A:\> copy con autoexec.bat

@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

@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 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 Too lazy to test it. Fascinating if true.

@trash "everybody talkin about Windows bugs, I'm just sittin here watching porn in vlc on Ubuntu"

@unlofl You mean watching porn by downloading individual pornhub videos via youtube-dl and using mpv to watch them on ArchLinux? Yes.


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! We adhere to an adapted version of the TootCat Code of Conduct and have documented a list of blocked instances. Ash is the admin and is supported by Fuzzface, Brian!, and Daniel Glus as moderators. Hosting costs are largely covered by our generous supporters on Patreon – thanks for all the help!