Live data from Hacker News

The tale of aux.c

heirloom.sourceforge.net

61–70 of 129 posts

Re: The tale of aux.c

#61
Is this when I get to complain about operating systems that allow spaces in filenames which also have a shell language that makes it difficult to use those files?

Re: The tale of aux.c

#62
post #2

We ran into this issue in Servo too. https://github.com/servo/servo/issues/1226

Same thing in Cargo: http://sasheldon.com/blog/2017/05/07/how-i-broke-cargo-for-w... https://github.com/rust-lang/cargo/issues/3982

... and the Linux kernel itself.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=509072

I learned about this when I added cloning the Linux kernel repository to an integration test suite for a cross-platform filesystem. I had to use another project because of that file :)

Re: The tale of aux.c

#63
post #41

Earlier quoted context omitted.

While an interesting story, this is more of a self-imposed customer screw-up and not quite the same thing, IMO.

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

Re: The tale of aux.c

#64
post #47

Earlier quoted context omitted.

But it could have just as easily been a windows batch file, it's not related to the OS at all.

Well, apart from the fact that UNIX-like systems have traditionally dumped core files in programs' working directories if they crash, so needing a script to clean them up. Linux still does, though many distros set ulimit or /proc/sys/kernel/core_pattern to disable it.

Windows does this too, except it hides them in it's system folders, it even comes with a built in clean-up script you can run. Not a problem that is worse on *nix.

Re: The tale of aux.c

#65
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 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 "-".

There's something in my environment that keeps creating a file called "-" in my home directory, and it's driving me crazy.

Re: The tale of aux.c

#67
post #41

Earlier quoted context omitted.

While an interesting story, this is more of a self-imposed customer screw-up and not quite the same thing, IMO.

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.

Re: The tale of aux.c

#68
post #65

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

There's something in my environment that keeps creating a file called "-" in my home directory, and it's driving me crazy.

By convention, when a unix program is passed "--" it means there are no more flags being passed. Try the following:

$ rm -- -

Re: The tale of aux.c

#69
post #41

Earlier quoted context omitted.

While an interesting story, this is more of a self-imposed customer screw-up and not quite the same thing, IMO.

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…

>My video of my kid's first at-bat, in a file I named a.out, got mysteriously clobbered when I took my first programming class.

This is a failure to understand GCC's default behavior, not a fundamental flaw with your operating system.

The "core" thing is a little more understandable, but it can all be remedied by choosing reasonable filenames with accurate file extensions. "aux.c" isn't that unreasonable, and if I'm reading it right, he could've called it "aux.foo" and it still would've been broken.

Re: The tale of aux.c

#70

Lol, a huge wall of text because the OP doesn't want to rename a single file. Jeez.

Most of that text explains the often forgotten issue, it is only the last paragraph that tells his preferences. I didn't even know that CP/M was sane in its naming scheme and thought it was CP/M legacy, not Microsoft's madness. Pretty informative, though not much surprising.
Post reply on HN