Live data from Hacker News

The tale of aux.c

heirloom.sourceforge.net

81–90 of 129 posts

Re: The tale of aux.c

#81
post #49
post #13

On Windows, paths can be accessed with \\?\ prefix: mkdir \\?\V:\con notepad \\?\V:\con\aux.txt This avoids reserved filenames as well as 260-character length restriction. But many programs that try to do any path processing fail after seeing an unexpected prefix, even File Open dialog (on Win7 at least).

It was finally fixed on Windows 10.

Not really. Windows 10 made it easier in certain ways for a program to support long file names. But it still requires explicit support, and programs can and did support it previously. And importantly explorer still doesn't support it properly.

Re: The tale of aux.c

#82
post #41

Earlier quoted context omitted.

A more direct (though fictional) illustration that Unix also has reserved file names that you'd better avoid: "I was writing a novel about digging to the center of the Earth, entitled "core". One day I was running some program that crashed, and my novel turned into a bunch of binary gibberish." Or how about: "My video of my kid's first at-bat, in a file I named a.out, got mysteriously clobbered when I took my first p…

If you'd like a real world example, I once used the predictably of core dump filenames to (legitimately) gain root access to a busy public nameserver. https://inopinatus.org/2015/08/24/privilege-escalation/ has the detail.

(^predictability)

Re: The tale of aux.c

#83
post #60
post #41

Earlier quoted context omitted.

A more direct (though fictional) illustration that Unix also has reserved file names that you'd better avoid: "I was writing a novel about digging to the center of the Earth, entitled "core". One day I was running some program that crashed, and my novel turned into a bunch of binary gibberish." Or how about: "My video of my kid's first at-bat, in a file I named a.out, got mysteriously clobbered when I took my first p…

You don't really put videos into a program's source tree. Also I don't think any modern Unix-like OS would overweite a file with a core dump no matter what is the name, and doubt that ancient versions did so too. Having the same set of device files under every directory is quite a different thing.

Actually, not only did they do exactly that, they could even be induced to do so through a symlimk, with hilarious results.

Re: The tale of aux.c

#84
post #50

I came from a BBC Micro background and found MS-DOS to be a step backwards from what I knew. I couldn't believe how naff MS-DOS was and how lazy the coders must have been to make it so primitive. I also found PC vendors to be lazy too, it wasn't as if any of them made an effort to do any code to improve on matters, they just shoved the same old MS-DOS in the box. What I had not realised before reading this article wa…

ADFS allowed directories, but used "." as the separator, giving you paths like "Letters.Memo1". Were you thinking of DFS?

Both DFS and ADFS used .

Re: The tale of aux.c

#85
post #73

Earlier quoted context omitted.

If we're going to criticise Unix file naming, I'd rather talk about how file names with spaces in them break things, or how hard it is do delete a file named "-".

>I'd rather talk about how file names with spaces in them break things Not really a Unix thing, but some tools (rather common even) are indeed very broken when it comes to certain types of file names. However... >how hard it is do delete a file named "-" While it's certainly a corner case of sorts, if you call that task hard, I wonder how you fare with using more complex software, like a web browser...

> I wonder how you fare with using more complex software, like a web browser...

That snark isn’t necessary. It’s easier to use a web browser than to delete a file called - from the terminal. Or haven’t you used a non-GUI system before?

Re: The tale of aux.c

#86
post #50

I came from a BBC Micro background and found MS-DOS to be a step backwards from what I knew. I couldn't believe how naff MS-DOS was and how lazy the coders must have been to make it so primitive. I also found PC vendors to be lazy too, it wasn't as if any of them made an effort to do any code to improve on matters, they just shoved the same old MS-DOS in the box. What I had not realised before reading this article wa…

ADFS allowed directories, but used "." as the separator, giving you paths like "Letters.Memo1". Were you thinking of DFS?

You couldn't do hierarchy though, it was only one deep.

Re: The tale of aux.c

#87

In 1991 I was working at a place with a Novell Netware network. I decided to make a system that would execute remote commands by writing them to a shared directory and other machines would see the files and execute the commands. I named those files COMXXXXX.TXT where the X's were a random number (yeah, that was a bad idea). Every few days the system would hang and stop working. I finally narrowed it down to the rando…

To be fair, that was not at all obvious from your tersely worded post.

Re: The tale of aux.c

#88
post #31

So, you smug Linux guys think it can't happen to you? Well, before you get off my lawn, let me tell you a story... Early versions of FrameMaker kept all resource files (internationalized strings, dialog box layouts, etc.) in the two subdirectories .../FrameMaker/Resources/{Unix,Core} (the first one for the Unix platform-specific resources, and the second for the cross-platform ones also used by the Mac and Windows po…

Nice story, but unrelated. And I'm not sure why you mention Linux at all.

Re: The tale of aux.c

#89
post #31

So, you smug Linux guys think it can't happen to you? Well, before you get off my lawn, let me tell you a story... Early versions of FrameMaker kept all resource files (internationalized strings, dialog box layouts, etc.) in the two subdirectories .../FrameMaker/Resources/{Unix,Core} (the first one for the Unix platform-specific resources, and the second for the cross-platform ones also used by the Mac and Windows po…

We had a source directory named "core" in an early version of the Rosegarden sequencer. At the time our build system was a simple Makefile, but in 2000 we switched to Automake and quickly learned that in some circumstances, using the Automake-generated Makefiles, "make clean" would delete the entire directory. Have generally avoided that name since then.

Re: The tale of aux.c

#90

So, all that text to tell people he is refusing to rename a single file? :-P I encountered that issue a few times in the past, most recently when a couple of years ago i was writing the console support for my 3d game engine and made two files called `con.c` and `con.h`, checked them in to version control and then at some point (much) later synced it on the Windows side. Fossil (the VCS i use) simply skipped that file…

I found it an interesting and well-written piece of history.
Post reply on HN