The tale of aux.c
heirloom.sourceforge.net
heirloom.sourceforge.net
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 (maybe it complained? i don't remember, but the files weren't created) and when i tried to build the engine it didn't work - i thought that i forgot to add the files, rebooted to Linux, forced a re-add, back to Windows and nothing again.
Eventually it clicked that "con" is a bad word in Windows filesystems, so i simply renamed the files to `csl.c` and `csl.h` :-P. I found this a bit irritating because my naming convention follows a mostly rigid pattern where `xxx_` prefixed functions will always recide on `xxx.c/h` (or `xxx_yyy.c/h` where yyy is a subsystem or specialization) and i really prefer the `con_` prefix to the `csl_` one. So far i've kept the `con_` prefix and made a special note for that in the readme file where i explain the naming conventions, but every time i have to use or work with that part of the engine i feel the irritation :-P.
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 ports). We had hundreds of happy customers, and had been shipping for 4 years or more.
But one new customer was calling in a panic. They'd installed the product, and it would work fine, but the next morning, it wouldn't even start up, and they had to re-install it. And then it would break again over night. After much pulling of hair and gnashing of teeth, it turns out that due to some other flakey product they were running, they had previously instituted a nightly cron job that ran around removing any core files it could find (since they were large and wasteful of precious disk space back in the day). And the knucklehead who wrote the script had it do a case-insensitive match on "core" and had it essentially do a "rm -rf" even though no true core file could be a directory. So, every night, our Core resource directory was blown away.
We actually had to change the product, as this was a big, important customer, and they outright refused to fix their cron script. Never had this problem on the Windows and Mac ports.
Linux still does, though many distros set ulimit or /proc/sys/kernel/core_pattern to disable it.
The first, `core`, isn't relevant. `/proc/sys/kernel/core_pattern` configures that value, and by default it's named "core.$PID" nowadays.
That's far better than windows' wart since it's configurable, disableable, etc.
Your second example is even more contrived. If you run a tool which writes files, of course it can overwrite files. I don't complain that in windows when I type "copy foo bar" my "bar" file is overwritten by "foo".
In the same way, someone who voluntarily runs "gcc x.c" or "cat > foo" should not be surprised when "a.out" and "foo" respectively are overwritten.
There's a massive difference between an unconfigurable gotcha based on a filename and an explicit action which writes a file.
Not saying it's remotely likely, just saying that having video files in a program's source tree isn't the only way it could happen :)
$ rm -- -
rm -- -The problem is names that could be interpreted like options, like '-f' or '--help'.
This means, if you're in a directory with the files a, b, -rf, and the directories foo/ and bar/, running "rm * " will not delete all the files and keep all the directories; instead it will be turned into "rm a b bar foo -rf", meaning it will delete all the files and directories except for the file -rf.
https://inopinatus.org/2015/08/24/privilege-escalation/ has the detail.
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.
Ah, yes, the age old Unix trope of, "it's not the system, it's the user's fault".
As a Linux user for many years, that doesn't excuse such boneheaded errors. By default no application should clobber existing files, unless asked to. Avoid data loss and all that.
Heck, I remember back when:
tar myfile.txt myarchive.tar
would result in myfile.txt being truncated to 0 bytes (therefore deleting its contents) and a snarky message that myarchive.tar can't be archived because it can't be found.
For those that don't remember how tar works, the arguments are reversed compared to, say, cp.
At least I think they've fixed it, newer tar version says something like "Cowardly refusing to create an empty archive".
The Unix ecosystem, dragged kicking and screaming towards user-friendliness since 1970.
Well, if the user had read the manual before using GCC, it wouldn't have happened.
Regardless, I don't blame them or look down my nose at them. It's bad design. If it's anyone's fault, it's GCC's. But it's certainly not a problem with Unix. This makes it incomparable to the system-level issue of having global filenames like DOS did, apparently.
While Unix was kind of Ok, when coupled with its common userland utilities, the whole often felt like a cactus. Possibly useful, if you don't mind the scars :D
Of course, the man page is a great resource for looking things up, but I can't imagine many people sit down with GCC's man page and actually read it through.
Except that example could also happen on Windows.
> Ah, yes, the age old Unix trope of, "it's not the system, it's the user's fault"
Ah, yes, the age-old complaint that a car driver should be able to run a forklift with no practice.
I don't think Unixen should strive for 'user friendliness'. Hacking in "Do you really want to" dialogs would (a) be contrary to all expectations developed over a long time, (b) break a lot of existing software, (b) annoy the bloody hell out of everyone, and (d) not solve anything, because those dialogs don't prevent mistakes.
Not all systems need to converge, and Unix has been a professional toolchain since the beginning. You're expected to know something about it, just like you don't let kids run plasma cutters.
> For those that don't remember how tar works, the arguments are reversed compared to, say, cp.
Tar doesn't have positional file arguments; you use the 'f' flag to specify an archive file. You might be thinking of zip or some similar archiver in the DOS heritage.tar cvf/czvf/cjvf archive files (or -cvf/-czvf/-cjvf).
I don't think I've ever seen anyone actually using tar by going:
tar -c files -f archive
Online tutorials seem to also use my form: http://www.thegeekstuff.com/2010/04/unix-tar-command-example...
Either way, bad form, I'm glad they fixed it :)
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 is disabled by default due to backwards compatibility.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa3...
The file explorer does not support it on purpose.
https://superuser.com/questions/1114359/windows-10-home-anni...
The backwards compatibility here is only in the fine details of how you deal with long paths. The old way and the new way both require application support. The new way is easier, but the old way worked fine even on XP and earlier.
This setting isn't actually future-looking. It was already possible to make these files with certain tools. And they could have let it always be on for programs that support it. This setting exists so you can signal to programs that they shouldn't use long paths, even when they are capable of it.
> The file explorer does not support it on purpose.
Sure, it's on purpose, but it's a good example of how impotent the setting is.
It is a shame because I think Mr. Ritter deserves more recognition for his work.
IMHO, some of his versions are real improvements over the BSD ones, e.g., troff (doctools) and nailx.
I for one am very thankful for the Heirloom Project and very glad to see it live on.
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 :)
...huh
>If you want to use mailx, there is the technically and morally sane option of using a free Unix implementation.
I mean it's really not that hard to release a Windows compatible version. You change a single file name?
This just sounds like throwing gas on the flame war that is unix vs windows.
Now it's just because some code hidden away under 10s of layers a millions of lines in some obscure line-of-business applications is accidentally dependent on this quirk and "it works now" and no one will ever fix it.
I think they just keep it because it feeds into the backwards compatibility myth that MS has built up.
Without a manifest, you'll see pre-XP common controls, and GetVersion will return an old version, so every modern application has it anyway.
I was working on a C++ program, editing, compiling, debugging as one does. After a while, my efforts to compile were stymied due to a flood of weird compiler errors that didn't make sense. After rewinding recent changes to a point where I knew it used to compile, it still refused to compile.
Finally I figured it out. During debugging, I created two copies of log file, one called "old" and one called "new". Somewhere in an include file (which probably included other files, etc), there was a statement "#include <new>". Rather that picking up the library source code, it tried to interpolate the contents of the local file "new" during the compile phase.
What I had not realised before reading this article was that the file system was as flat as Acorn's ADFS, i.e. no hierarchy. How this joke of a product came to take over the world and take us from networked computing to standalone 'personal computing' was a tragedy, holding computing back 'decades' rather than enabling a better world.
Were you thinking of DFS?
I transferred several programs, in those days and on that system with a maximum of six characters for the name, from one machine to another via magtape. One was named "CR" (customer report or credit report, who knows). It disappeared on the new system because it was mistaken for the Card Reader.
Jeez.
See also: https://news.ycombinator.com/item?id=15335209 and https://news.ycombinator.com/item?id=15335474