7 ms·
Why are hidden files with a leading tilde treated as super-hidden?
- officialchicken 9y agoLegacy compatibility reasons, I presume. I know this worked to super-hide files with NT 3.5x/4 and Win-9x or used when copying files by those OS's. And I'm fairly certain that it existed for "temporary" files with MS-DOS 6.x and 5.x too, maybe even earlier version. Are there any MS-DOS 2.x / pre lan-manager pros on HN who know how long this has been around?
- DanBC 9y agoI have an old MSDOS 2.0 manual. ~ is listed as an acceptable character for filenames. Here are some photos of various pages: http://imgur.com/a/E952T http://imgur.com/a/E952T
- andrey_utkin 9y agoViolation of orthogonality of design. http://www.catb.org/esr/writings/taoup/html/ch04s02.html#orthogonality http://www.catb.org/esr/writings/taoup/html/ch04s02.html#ort...
- dorianm 9y agoOr simply a "simple is better than complex" from PEP-20 https://www.python.org/dev/peps/pep-0020/ https://www.python.org/dev/peps/pep-0020/ Also, "Explicit is better than implicit." and "Special cases aren't special enough to break the rules.", etc.
- astrobe_ 9y agoDoesn't apply here: it's not a designed system, it's a pile of hacks.
- nebabyte 9y agoDoesn't matter; it's what shipped, and so is a system in spite of its quality or lack thereof. There's no problem pointing out a non-computer as not turing complete if it was shipped and sold as a computer.
- dorianm 9y agoSo, how do we fix it?
- mintplant 9y ago> This problem was fixed in Windows 8 as a side-effect of a re-write of the way the shell copy engine copies files. The shell now uses the CopyFile2 function to copy files, relying on the kernel function to do the heavy lifting, and using the callback function to monitor progress and possibly cancel the operation. The kernel function doesn't know about these mysterious shell item IDs. All it knows how to do is copy files, and it obtains the attributes directly from the source file, which as we recall is marked hidden but not system.
- therein 9y agoYeah, that sounds better.
- deleted 9y ago[deleted]
- stratigos 9y agoYou use Linux :-D
- bsenftner 9y agoInteresting personification of Explorer. One might think it were a person the way it is described.
- drewbug 9y agohttp://catb.org/jargon/html/anthropomorphization.html http://catb.org/jargon/html/anthropomorphization.html
- UnoriginalGuy 9y agoBackwards compatibility. Older versions of the Office suite used ~ files as locks. New versions flag those same files as hidden and system, so Microsoft hacked in a compatibility fix for old versions of Office to mark all ~ files similarly automagically.
- drinchev 9y agoOkay, so who decided on that? Is it a PM or a developer? What's their reasons and why didn't they document it? Do I have other "invisible" files around that I can't see?
- ma2rten 9y agoThis particular behavior sounds more like a bug than an explicit design decision. Do I have other "invisible" files around that I can't see? Most system files in Windows are hidden. I think it's an effort to prevent users from deleting some important system file, either accidentally or because they read on some website that it's a virus.
- donarb 9y agoOr the ever popular habit of deleting large unknown files to free up space on disk.
- stevebmark 9y agoHow could this be in the core of an OPERATING SYSTEM? At one of the largest software manufacturers in the world? I legitimately do not understand.
- jonchang 9y agoNot to be too snarky, but tons of other operating systems have these kinds of "features". The most prominent example is in macOS and Linux with file names starting with a dot being hidden by default.
- ams6110 9y agoYes, but the reason for that convention is just to avoid clutter in the output of ls. It's not to prevent users from deleting files that they shouldn't -- file system permissions, and not logging in as "root" all the time, are the correct way to handle that.
- stevebmark 9y agoHiding files starting with a dot is just a cosmetic, view level implementation. This article shows that Windows had coupled this behavior directly to system level file flags.
- badosu 9y ago> Hiding files starting with a dot is just a cosmetic, view level implementation. Is it? [0] [0]: https://plus.google.com/u/0/+RobPikeTheHuman/posts/R58WgWwN9jp https://plus.google.com/u/0/+RobPikeTheHuman/posts/R58WgWwN9...
- sratner 9y agoThis is also just a cosmetic, view level implementation in Explorer (complete with a bug, also in Explorer). In fact, the fix was to use kernel fs functions directly.
- paulddraper 9y ago> cosmetic, view level implementation Sort of. The kernel doesn't treat it special but the OS does. Any POSIX compliant shell won't include dot files for a single wildcard. E.g. rm -fr * doesn't empty the current directory.
- youdontknowtho 9y agoI love all the comments here about "how could this be?" Repeat after me...There is no magic. There is no perfect. This software was used by hundreds of millions, if not billions, of people. They got work done with it. Think your favorite pile of C code is "more correct" or "more sublime"? Maybe. By many measures of successful that doesn't matter. And that's why those "it will be perfect this time" rewrites of UNIX/Linux aren't in use and Unix/Linux is.
- wruza 9y agoBy many measures of correct, success also doesn't matter. Let's remember how many flaws were the cause of time, money, mood loss of many people. How do you know which is more important at the level of something like an OS? Btw, the time when legacy support was crucial is long gone. App stores and automatic updates will make it absolutely transparent in few decades. Windows is probably the last OS where you download and execute random ancient chunks from the raw internet -- nothing to be proud of.
- amluto 9y agoOne might argue that the correct fix is to remove the concept of super-hidden files entirely. For backwards compatibility, just never report that a file is super-hidden. Normal users don't see hidden files, so normal users are served well. Users who want to see the complete list of files (to clean up garbage, notice crap left behind by malware, fix problems caused by leftover malware, etc) probably want to see files that start with ~. Alternatively, the options could be "hide hidden files", "show hidden files but not protected operating system files", and "show all files, even protected operating system files", rather than having separate, confusing controls.
- userbinator 9y agoThat's why you have to disable "Hide protected operating system files" in order to see them. One of the settings, along with hiding the file extensions, that I always disable without exception.