10 ms·
The complexity of the `find` command is the least of Unix's problems. How about defending these? 1. Unnecessary and confusing directory structure. `/etc`? Why
by IshKebab 11y ago
The complexity of the `find` command is the least of Unix's problems. How about defending these?
1. Unnecessary and confusing directory structure. `/etc`? Why not `/config`? `/usr` instead of `/system`, `/var` instead of ... well who knows. The maximum directory name length is no longer 3 characters.
2. Programs are mushed together and scattered through the filesystem rather than stored in separate locations. This basically means applications are install-only. Yeah, package managers try to keep track of everything, but that is just hacking around the problem, and most developers don't want to spend hours creating 5 different distro packages.
3. Not strictly Unix, but the mess of glibc with respect to ABI compatibility, static linking, etc. is ridiculous. Musl fixes most of this fortunately.
4. Emphasis on text-based configuration files. This is often ok, but it does make it hard to integrate with GUI tools, hence the lack of them.
5. Emphasis on shell scripts. Fortunately this is starting to change, but doing everything with shell scripts is terribly bug-prone and fragile.
6. X11. 'nuff said about that. When is Wayland going to be ready again?
7. General bugginess. I know stuff works 90% of the time, but that 10% is infuriating. Windows is a lot more reliable than Linux at having things "just work" these days.
- Jedd 11y ago> How about defending these? > 1. Unnecessary and confusing directory structure. `/etc`? Why not `/config`? > `/usr` instead of `/system`, `/var` instead of ... well who knows. The maximum > directory name length is no longer 3 characters. I know yrro already explained the ludicrously inconsistent nature of the OS you're apparently defending, but I'll add in: Why do I need to edit c:\Windows\System32\Drivers\etc\hosts (in what way is hosts related to bit-length or a driver?) Why .htm rather than .html? Why programiwanttorun.exe rather than programiwanttorun /system is as overloaded a word as any in IT. /config doesn't accurately reflect what /etc is about (but in any case, the latter is not a great barrier to entry) If you're complaining about limits on directory entries .. you're skating around on very thin ice if you're on the NTFS lake (compared to any of xfs, btrfs, reiserfs, ext2/3/4fs, etc) > 2. Programs are mushed together and scattered through the filesystem rather > than stored in separate locations. This basically means applications are > install-only. Yeah, package managers try to keep track of everything, but > that is just hacking around the problem, and most developers don't want to > spend hours creating 5 different distro packages. 14,000 registry entries for one suite of software ... how is that not 'mushed together and scattered'. Applications are not install-only. Because package managers (or, rather, distributions) managed to solve this problem elegantly more than a decade ago, I don't know how you can credibly make this claim. Is 'mushed together and scattered' a contradiction? Building packages for a variety of distros is a solved problem (again, it has been for a decade or more). > 3. Not strictly Unix, but the mess of glibc with respect to ABI compatibility, > static linking, etc. is ridiculous. Musl fixes most of this fortunately. It's hard to not sarcastically comment with the observation that the phrase DLL Hell did not originate within the nix world. More pragmatically, I rarely (in twenty years) have had glibc issues. I think perhaps 3 times. All easily solved. > 4. Emphasis on text-based configuration files. This is often ok, but it does > make it hard to integrate with GUI tools, hence the lack of them. The biggest complain with Win95 was the move away from .ini files (text-based). GUI tools do not intrinsically have an issue dealing with text-based configuration files. I posit the problem you're describing is the fact that text-based configuration files often contain useful human-readable components (which non-text-file config systems, such as 'the registry' lack) which is slightly harder to maintain using automated tools. But only slightly. As noted elsewhere, these are typically only a library call away. > 5. Emphasis on shell scripts. Fortunately this is starting to change, but > doing everything with shell scripts is terribly bug-prone and fragile. Doing anything badly is fragile. Shell scripts aren't intrinsically bad - as evinced by the success of shell scripts. I don't know many people who have significant experience with apt|rpm && sccm (for example) ... but I know a couple, and the fragility of shell scripts leads to fewer expletives than the alternative. > 6. X11. 'nuff said about that. When is Wayland going to be ready again? Are you suggesting that a system that completely disavows any network-awareness is preferable to one, designed >20 years ago, that does it fairly well? What problems have you had with X11 that aren't dwarfed by citrix / rdp / single-user consoles / etc? > 7. General bugginess. I know stuff works 90% of the time, but that 10% is > infuriating. Windows is a lot more reliable than Linux at having things > "just work" these days. Sounds like hyperbole. If things in the GNU/Linux world broke 10% of the time there'd be a lot fewer people using it - and if Microsoft Windows was more reliable than GNU/Linux, there'd be a lot more people moving towards it rather than away from it.
- bitwize 11y agoX11 is inherently insecure. With Wayland, the compositor itself is privileged but all clients get access to only their frame buffers and event streams. Network transparency is mostly irrelevant on modern desktop systems, X11 remotes modern apps poorly at best, and if you really need remote desktop access you know where to find RDP and SPICE. The Wayland switch will be a win because X11 is almost pure cruft. The good parts are what was kept in Wayland.
- pdkl95 11y ago> X11 is inherently insecure. That depends on your perspective. Why are you accepting connections from malicious X clients? > Network transparency is mostly irrelevant on modern desktop system For you, maybe. That's an opinion that many of us do not share. > X11 is almost pure cruft It's only cruft if you limit your use cases to stuff like GTK+ that decided to only use X as a dumb framebuffer. > The good parts are what was kept in Wayland. Except for a long list of features, such network transparency, support for copying PRIMARY selections in addition to CLIPBOARD, or overriding input events of arbitrary programs. Until Wayland supports these, it isn't compatible with a lot of my tools. Just because something is "old" or has features that you personally don't mean they are "bad" features that should be removed. There are more use cases than those in you definition of "desktop".
- kachnuv_ocasek 11y ago>it does make it hard to integrate with GUI tools, hence the lack of them. I don't understand this point. Care to explain, please?
- hasenj 11y agoMy guess is that GUI tools often clobber configuration files once they touch them, because it's easier to write code that stores configuration as a hashmap and when it saves it back, the output is not going to preserve things like, user comments, the order of things, etc.
- jimktrains2 11y agoIs it really though? And why are we just calling out GUI tools? Command line tools also must read in a config file, and they manage with text. json, ini, yaml, xml parses and writers exist in every language. There really isn't an excuse to not use a text-based config.
- hasenj 11y agoI think command line tools (like say, git-config) manage one option at a time. GUI tools tend to manage everything at once. Imagine the giant options box from MS Word 2003.
- jimktrains2 11y agoIt still has to read in the current config, mutate it, and write it out.
- seanp2k2 11y agoIf the Windows registry + INI files + config files anyway is the alternative, I'll take the text files please.
- ygra 11y agoI guess they mean that because GUI tools often have, well, a GUI to change options, they tend to write their configuration files. Whereas for command-line tools it's rare that they provide methods for changing their options and thus they tend to only read their config, thus never running into the problem of clobbering user edits. Mind you, there are plenty of GUI applications that get this right anyway. But usually for the vast majority of users there is never a need of mangling configuration files by other means.
- sz4kerto 11y agoThe answer for most of these: legacy. Changing all these is very hard, as it'd be difficult to change the \ to / under Windows, etc.
- douche 11y agoWhere does using / in paths rather than \ not work in Windows? Sorry to pick on your example, but from what I can see, they've already done that.
- sz4kerto 11y agoIt clashes with command line switches. dir /w does not list the contents of the directory called w.
- douche 11y agoOn Windows, you've really got to be quoting your paths everywhere anyway, since spaces abound, and if you do that, then dir "/w" works as expected.
- ygra 11y agoConsidering that most file systems these days allow spaces in paths, I'd guess you can safely remove the »On Windows« there. The amount of shell and build scripts on Unix-likes that die horrible deaths when encountering spaces is not funny. And well, yes, in a way that probably means that spaces in paths are not »supported« there, but you could then say the same about Windows. As well as using non-ASCII in paths.
- fnbr 11y ago> The amount of shell and build scripts on Unix-likes that die horrible deaths when encountering spaces is not funny. That's so accurate. I used to write shell scripts with command $1 until I got a few too many nasty surprises with dashes in filenames.
- ZoF 11y ago>Windows is a lot more reliable than Linux at having things "just work" these days. Ha, I'm server tech at a hosting company and this is spit-take worthy. I really can't see how anyone could possibly think this. Unless you're talking end-users local PC's this is wrong, and even then it generally isn't 'Linux bugginess' it's 'user ineptness'
- digi_owl 11y agoIndeed. http://www.computerworld.com/article/2467082/data-center/london-stock-exchange-to-abandon-failed-windows-platform.html http://www.computerworld.com/article/2467082/data-center/lon...
- alkonaut 11y agoThe two are completely different, and "just works" is definitely Windows strong side on the desktop. On my desktop system I want apps installed in isolated directories, with few or no central dependencies. Even if it means I have some unpatched vulnerability in 10 places. For a server system I don't mind having to tinker, and central libraries can even be a security win.
- digi_owl 11y agoWindows "just works" when the box is freshly unwrapped. Use it for a month and all manner of oddities bubble to the surface.
- alkonaut 11y agoI think that can be attributed to user skill for both, I render my Linux machines weird more often than my Windows machines, but admit it's because I'm better at driving Windows machines. I have had zero problems with Windows machines since win7 that can't be attributed to hardware failures. Also by "just works" I meant mostly being able to get binaries from a random website and installing without having to use a package manager or failing to have the right deps. If you go to the 100 biggest app sites (Skype, Spotify, ...) and try to set up from a download, the "just works" is probably a lot better on win and Mac. This is of course a lot due to the size of the market, but it's no secret that standard cross-distro/desktop-env prebuilt binary installers for GUI apps are still not exactly a strong point on Linux.
- yrro 11y agoSome comments on some of your questions: 1. Legacy and convention. Why do my 64-bit system files live in C:\Windows\system32? Why is the first volume on my system C and not A? Why are there multiple 'global' window stations on my system? Why is the real path to my disk drive \GLOBAL??\PhysicalDrive0, but for some reason I have to use a different path (\\.\PhysicalDrive0) in my programs or else it won't work; a path that I can't discover by myself but have to be told to use by scouring the darkest depths of MSDN? What the heck is ipv6-literal.net and why do I have to refer to some weird third-party domain to connect to a file share on IPv6 within my own network? Making these changes would be disruptive for the software that has to make the change, and impossible for the software that can not be modified. Distributions exist that try to improve the hierarchy (GoboLinux) but no one adopted them. We're currently seeing a push to unify the / and /usr hierarchies, so at least in the future things will get a bit simpler here. 2. Legacy and convention. In the days when storage was scarce, you could keep the contents of /usr/share and /usr/lib on central file servers; a single export for the former could serve all your clients, and you'd only need a single instance of the latter for each architecture in use, rather than having a separate copy on each machine. Besides, even in a world where each program lives in its own directory, as soon as you want one program to install a component for the other to consume, you have to bring in a package manager to remember the fact that /app/A installed a plugin into the /App/B/Plug-Ins directory... not to mention the unusably long PATH environment variable that would result... I find the package manager approach is overall superior to unreproducible the crap-fest you get when applications arbitrarily dump files all over the system. 3. Perhaps I'm in the minority, but I've never had problems relying on glibc via dynamic linking; you just have to build against the oldest version that you want to support, which is a bit of a pain but it's hardly the end of the world. The tradeoff with musl is, that you can no longer rely on dynamically loaded NSS and gconf modules. If you don't need these, fine, knock yourself out--but you should be aware of the tradeoffs when you switch your libc implementation out; namely that you can no longer use mdns, myhostname, ipv6literal, winbind, LDAP, etc. for looking up hosts, users, groups and so on. 4. System-wide configuration is better kept in text form where it can be read by a human, contain comments, and be kept in Git. Desktop programs can store their config in dconf, or otherwise do whatever they want as long as it lives in ~/.config and I don't have to care about it. 5. As long as you use “set -eu” with an understanding of its shortcomings, and know how to quote variables properly, writing small and medium systems in shell is a great tradeoff between development speed and robustness. Components can be rewritten in a real systems programming language once they stabilize or require better integration than can be had by parsing the output of other commands.
- RGamma 11y ago8. Lack of proper, well integrated, easy to use, expressive permissions system, ideally with a notion of complete isolation by default. Right now most users rely on the benevolence of software writers to not mess with their personal files, but sometimes things goes awry (that Steam homefolder deletion disaster comes to mind). Imagine mobile OSs with just the Unix permissions system, the malware spread on those would be so humongous, it'd almost be funny again (arguably this was a long-time problem anyway privacy-wise, with software requiring privileges that couldn't be faked (e.g. giving the application a fake address book instead of your own), but at least apps couldn't easily nuke/hijack all your personal files.)
- yrro 11y agoThis is coming with wayland and xdg-app. I say this not to try to refute your point but to give you something to Google for if you're curious about how things will probably work in the future.
- digi_owl 11y agoAndroid it just that, and what they do there is run each app as its own user.
- bcook 11y agoThough, Android also uses SELinux. I am not sure I would consider SELinux part of standard Unix permissions.
- digi_owl 11y agoThat is something introduced in recent versions. And i suspect they did it more to get onto government approval lists than anything else (though it may also placate the *AAs).
- pseu 11y ago@7 - is that so ? I just gave up installing F# developer tools in Windows last night after two hours, 3 general install methods (check the F# foundation site) and some 6+ installer packages (some of which wanted to eat 8GB of diskspace). - And yes, my copy of windows is reasonably modern (8.1) and legal. Contrast that with Ubuntu, where installing F# took all of 5 minutes, with one command, 200MB and I had a full IDE and F# support. The one concession I'll make is the one you yourself seem ignorant of - ease of use pertains to your expertise with the system. If you grew up on Windows, you may get its idiosyncrasies.
- RaleyField 11y ago> Contrast that with Ubuntu, where installing F# took all of 5 minutes, with one command, 200MB and I had a full IDE and F# support. Unless you want the latest version then you are cloning a few repos, compiling and hunting dependencies because building mono + ide isn't straightforward.
- AsyncAwait 11y agoThere's always the rolling release route, which I have been happily running for 4+ years without any issues.
- Aeolos 11y agoSame here (Arch), but I just wanted to point out that Ubuntu has PPAs for almost every piece of software out there. Including new versions of Mono, Monodevelop and F#.
- RaleyField 11y agoThere isn't any middle ground though. I want most of my software to be stable with a few packages of the same version. Windows does this scenario. Also I have trust issues (after mint who should blame me), is there any rolling release that is backed by a company?
- 11y ago
- MereInterest 11y agoRegarding #5, I quite enjoy text-based configuration files, and can't stand systems that force me to use a GUI to change settings. If I have a text-based config file, I know that it will play nicely with git. If there are many related settings, users can change them all quickly with their preferred text editor.
- gtf21 11y ago+1 for GUI-based configuration being a pain, having a dotfiles repo that I can edit, clone, fork, etc. is magical (and far more flexible).
- digi_owl 11y agoNever mind being able to put comments in line with the settings to potentially document why the seemingly crazy changes have been applied.
- Ao7bei3s 11y agoAgreed, text based config files are good and not the problem. (Though binary formats != GUI tools only.) I think the real problem is config files either in hard-to-parse-correctly custom ad-hoc formats or even "config files" written in a scripting language (-> impossible to parse). All config files should use the same standard format. I'd say "like YAML", but I'm not aware of a widely-used format with standard features like file includes or data types beyond "int" and "string" (e.g. for time intervals; these really shouldn't be "just a string... with a custom format").
- vacri 11y ago> Windows is a lot more reliable than Linux at having things "just work" these days. As long as you only do the things you're allowed to do. I just replaced my 6-year old Windows gaming machine, the only win machine I have. I can't even change the windowing theme - it has to be MS's preselected graphics. I wanted to turn off all the 'phone home' stuff except updates and windows defender; these are spread through half-a-dozen locations. I hadn't even got to install my first bit of software yet (firefox) and already I was limited over what can normally be done with a desktop. "Just works" isn't really an argument when it's paired with "but you can only do these things". Not to mention that back in the server world that lightweight virtual servers are an impossibility with Windows arena. ^nix servers are small in volume size, can run on fumes, and are largely disposable. Windows servers are (relatively) huge, slow to launch, require much more system resources, and require licensing. That isn't "just works" for me. > [text config] This is often ok, but it does make it hard to integrate with GUI tools, hence the lack of them. Only if your GUI tools are written from the viewpoint that nothing else should touch the config file. After all, if I can write a bash script that upserts a config value in a text ini file, why can't a GUI programmer?
- woodman 11y ago> 1. Unnecessary and confusing directory structure. "Unnecessary" for you maybe, but have you considered the possibility that there is a reason why the directory structure is the way it is - and that the problems originally addressed may still be relevant? Here is a hint: partitions. Partitioning the files roughly by usage pattern allows you to tune performance, safety and security in a way that you would have a very hard time doing otherwise. Your suggested names make me think that you aren't very clear on the directory's actual purpose [0]. While longer names may have helped you out in understanding their purpose, once you actually learn it you're stuck with an unnecessarily long PWD that wraps each prompt. > 2. Programs are mushed together and scattered... Again, consider why it is the way it is. Do you really want to have a PATH that includes every directory for every binary on the system, or manage individual file permissions within all those directories? You want to do that with libraries as well? Just consider the complexity of what you're proposing and how you'd address: system defaults, setuid, per user preferences, dependencies, build environments... Years ago I basically did what you're suggesting, when Redhat was my daily driver. I'd build from source and install into ~/bin. Try it out for a while, you'll hate it. > 4. Emphasis on text-based configuration files... hard to integrate with GUI tools... What are you suggesting, a windows like registry? The text-based configs are no more difficult to use through a GUI than a binary representation, they're both a library function call away. Unless you are suggesting a windows like registry... but you've already pointed out how developers don't want to spend time on portability - so that can't be it. > 7. General bugginess... Windows is a lot more reliable than Linux... Ah, well try out an OS that is closer to Unix than Linux - maybe one of the BSDs. I'd put my Freebsd workstation against any flavor of Windows in a contest of uptime and performance, that is a bet I'd be happy to take. As far as Windows just working, that is true for the majority of tasks for the majority of users. But if you fall outside of that happy band of the target market, you are SOL. Consider the whole Windows telemetry issue. Also, I just noticed in my network logs that Windows update is sending out IPv6 dns requests despite the fact that I've disabled it on the network interface and tweaked several registry variables... there is nothing I can do about it. It would be a pretty simple fix for any opensource OS though. [0] https://www.freebsd.org/doc/handbook/dirstructure.html https://www.freebsd.org/doc/handbook/dirstructure.html
- marcosdumay 11y ago
- AndyMcConachie 11y agoLinux != UNIX
- jsz0 11y ago> `/etc`? Why not `/config`? /etc contains more than just config files so /config would be a misleading (or at least overly specific) name. If we went that route we'd need dozens of top level directories to cover everything. I do prefer OSX's more user friendly directory layout but the traditional directory structure has been around for decades. It works fine.
- Retra 11y ago/etc contains more than just config files because it's called '/etc' and not '/config'. Any why would you need dozens of top level directories? I can't imagine that you could name even one dozen completely orthogonal aspects of program and system configuration that can't be put into a _some_ meaningful hierarchy.
- dominotw 11y ago>Programs are mushed together and scattered through the filesystem rather than stored in separate locations. This basically means applications are install-only. Yeah, package managers try to keep track of everything, but that is just hacking around the problem, and most developers don't want to spend hours creating 5 different distro packages. What about things like encap/gnu stow which symlink files from one single package dir.
- skocznymroczny 11y agoAs for 1. and 2., I kind of like how Apple solved it. When moving Xcode from one Mac machine to the other, I only needed to copy /Applications/Xcode.app directory to the other machine and everything magically worked, configuration files are kept to their applications rather than littering the filesystem.
- mystikal 11y agoOS X is actually certified as a Unix, unlike many Linux distros.
- cyphar 11y agoDo you mean POSIX? In which case you should be aware that it actually costs money to get licensed as a POSIX-certified OS. If you actually meant UNIX, then of course GNU (GNU is not UNIX) isn't UNIX. It's in the name. At best the Linux kernel is a cousin of UNIX.
- mystikal 11y agoI meant Unix, but I should have said unlike all Linux distros except Inspur K-UX. I thought there were more but WP doesn't list any and seems comprehensive otherwise. My point was really that some/most of those complaints about "Unix" don't apply to OS X for most people and sound more like the pain that users running Linux have to deal with, even though it's not typically an official Unix. I hope this was more clear.