8 ms·
Amusing, but the standard Unix file system is nothing to be too proud of. I'd very much like to see a file system layout re-imagined for the 2010s.
by bhauer 13y ago
Amusing, but the standard Unix file system is nothing to be too proud of. I'd very much like to see a file system layout re-imagined for the 2010s.
- voidiac 13y agoAt least there are no spaces in the directory names.
- harrytuttle 13y agoYes and UNIX is really better! $ mkdir ".. " $ ls -a . .. .. Fun eh?
- Xylakant 13y agoNow go and fire of "rm -rf ..". Now we're talking fun.
- harrytuttle 13y agoExactly my point!
- pavanky 13y agoYou can't plan for user stupidity. The system paths do not have spaces in them.
- harrytuttle 13y agoNo but allowing leading and trailing spaces is not user stupidity. That is design stupidity. You know like recording numbers as string in the format: "0000000000000000000000000123.23210000000000000"
- icebraining 13y agoThe shell by default ignores spaces, you have to specifically force it to acknowledge them by enclosing the name in quotation marks or escaping with a backslash. In that situation, a command line tool should do what it's told, not disobey a direct command. Leave the rubber padded tools for the GUI land.
- harrytuttle 13y agoRubber padded I do not expect. Retarded I also do not expect. Explain the validity of: mkdir " " mkdir " " mkdir " " ? It at least violates the principle of least surprise
- icebraining 13y agoValidity? It's a string like any other. It's not mkdir's job to second-guess what I tell it to do. And I don't see how it violated such principle. You tell it to create a file with spaces - you even emphasized them with quotes -, and you're surprise it did so?
- harrytuttle 13y agoIt is merely an illustration. The reality is stuff like that occasionally does happen when you use variables and parse results from other commands.
- phaemon 13y agoNo it's not. If you type mkdir ..<space> it tells you "cannot create directory". You have to explicitly tell it you want a space in by using quotes (as you well know). Oh, and it's my computer. I don't want my shell telling me what I'm "allowed" to do. If I explicitly tell it to do something, it should damn well do it!
- harrytuttle 13y agoWhat if you do the following? VARX=".. " # by accident as the result of a command mkdir $VARX
- agumonkey 13y agoSure, but a non-ambiguous external representation should be mandatory when a semantic value conflates with a presentation one. Here ' ' is part of both worlds: . .. .. A first idea: . .. ..\ ls may also take inspiration from bash completion, where dirsep serves as a better delimiter than ' ' noob ~ $ mkdir -pv lsb/wat noob ~ $ cd lsb/wat noob ~/lsb/wat $ mkdir ".. " noob ~/lsb/wat $ ls -lah total 12K drwxr-xr-x 3 noob noob 4,0K august 28 16:52 . drwxr-xr-x 3 noob noob 4,0K august 28 16:52 .. drwxr-xr-x 2 noob noob 4,0K august 28 16:52 .. noob ~/lsb/wat $ cd ..<TAB-COMPLETION> ../ .. /
- tjdetwiler 13y agoI once accidentally did: $ touch ./~ # Much later I noticed the "~" file in the directory # so I mindlessly decided to cleanup: $ rm -rf ~ Luckily $HOME was on a _really_ slow NFS mount so I didn't manage to remove anything too important before I killed it.
- harrytuttle 13y agoHa that's a classic. A friend of mine did a "rm -rf ~ /tmp" rather than "rm -rf ~/tmp" on a fast SCSI local disk on his Sun workstation. His backup strategy of tarring up everything into ~/backup went with that one too. I lectured his ass on that one. However... The same guy, no less than 8 years later carried around a DVD-RAM with his single copy of his life's work on it (I assume this was only 8 years of his life) and jammed it in one of those dodgy Pioneer slot loader drives and proceeded to mount it. bzzzt ... wheee ... clunk ... BANG! DVD span to full speed and promptly shattered taking the drive fascia off and spraying everyone with bits of "I told you so". He now puts up scaffolding which worries me even more...
- tjdetwiler 13y agoLuckily I was on an IT maintained machine that takes nightly snapshots of home partitions so I was safe in the worst case. Had I done that on one of my personal machines I wouldn't have been so lucky.
- taude 13y agoI found not just the naming aspect funny, but the whole munging of 32/64 bit files good, too. That's beyond naming atrocities.
- bhauer 13y agoAgreed. To me, it's even more funny when you realize "WOW" actually means "Windows on Windows." Say what??
- harrytuttle 13y agoMakes sense to me, then again I know NT inside out... It's NT's syscall translation layer, CPU mode switching backend and entry point front end. It was originally used to run 16-bit apps on 32-bit platforms but is now WOW64 so is to run 32-bit apps on 64-bit machines. Basically it's a very light weight virtualisation layer. And it works well. My circa 1996 RPN calculator I wrote in VC++ works perfectly on 2013 x64 machine.
- bhauer 13y agoDon't get me wrong. I know it makes sense once you know what it is. And the result in terms of compatibility and stability is impressive. Still, when I first heard the phrase "Windows on Windows" I had a chuckle. It reminds me that I enjoyed the way x86 apps ran on my old Alpha NT machine. If I recall correctly, the process list included "fx32" beside each.
- quarterto 13y agoWOW doesn't stand for Windows On Windows. WOW64 stands for Windows On Windows 64 [bit].
- bhauer 13y agoOh, that I didn't fully appreciate. That actually makes it more reasonable. (Not being sarcastic!) What are you trying to do? Make me feel bad for having a good laugh at the name when I first looked it up? :)
- pmelendez 13y agoI am agreed. Although the last time I heard about a major attempt for a modern file system was in Longhorn and all we know how that ended. I guess there are still some fears to try it again, considering that current file systems in mainstream OS' are "good enough".
- harrytuttle 13y agoIndeed. I think people worked out that metadata indexing over the top is probably better.
- fiatpandas 13y agoCheck out GoboLinux's file system structure: http://www.gobolinux.org/index.php?page=at_a_glance http://www.gobolinux.org/index.php?page=at_a_glance
- bhauer 13y agoI like it! I suppose I am a tad disappointed that it's a distribution in its own right. But they deserve credit for taking a decent first step.
- Pxtl 13y agoIck, capitalization in a case-sensititive file-system? Of course, as far as I'm concerned case-sensitivity is generally a misfeature in anything user-facing.
- fiatpandas 13y agoIf I remember correctly, their scripts automatically convert lower case letters to uppercase when you are trying to autocomplete typing with TAB. It only does it for the gobolinux-specific uppercase directories
- bhauer 13y agoAgreed! I feel retaining case-sensitivity in file systems in 2013 is basically trolling users. I can think of no practical upside; only the opportunity for annoying jokes and tricks.
- tekacs 13y agoBut what of users (as they often do) descriptively naming files? I've seen plenty of "Accounts for Proctors' Attention.xlsx" style files. Case insensitivity would lose the case there. :/
- mistercow 13y agoThere's a difference between case sensitivity and case preservation. FAT32 and HFS+ are examples of case-insensitive, case-preserving file systems.
- mintplant 13y agoBinaries? Libraries? Let's stick 'em in `/usr`! Oh, but where do user files go? I know, `/home`! What about all this other stuff? Eh, `/etc` will do. Unless it won't, in which case `/var` is the obvious solution. Or maybe even `/opt`, if we're feeling especially hip today.
- Bjoern 13y agoHistorical heritage unfortuantely. /sbin and /usr/sbin are other examples... http://lists.busybox.net/pipermail/busybox/2010-December/074114.html http://lists.busybox.net/pipermail/busybox/2010-December/074... https://news.ycombinator.com/item?id=3519952 https://news.ycombinator.com/item?id=3519952
- antocv 13y agousr doesnt mean user, it meant Unix System Resources, and a user of the system usually puts his stuff at home, what would you like it to be otherwise /users ? That would be describing the users of the system and not where their stuff is, and users are described in /etc/passwd together with their passwords, sort of. /etc isnt called /conf or configuration because it contains examples, scripts and other small stuff as well, which is etcetera. /var is for variable data like logs and pid files, not meant to be changed by the user directly /opt sucks and is for losers who dont know about /usr/local or how to install stuff in ~ The Linux way makes much more sense than Windows or MacOSX way. binaries are in bin libraries are in lib, whats not to like?
- BHSPitMonkey 13y ago> /var is for variable data like logs and pid files, not meant to be changed by the user directly One would certainly never dream of keeping entire web sites in there!
- antocv 13y agoWell thats just wrong, thats what /srv/http is for, to serve http, but historically websites were served from your home, as then they where known as home (personal) sites, and they're still known as "home sites" in many non-english languages. Now when you have web applications they can be in /srv as well and the database is usually wrongly put in /var (looking at you mysql) but what you gonna do when you need a system user, just like a users stuff is supposed to be in home so put your database there /home/postgresql/its_datas here, as anyway you need to run the db as its own user. Makes sense no?
- amenod 13y agoActually it stood the test of time quite well. System directory names are lowercase, short and mostly-standard. Granted, there is the /bin/, /sbin/, /usr/bin/, /usr/local/bin/... stuff, but at least /home/ directory is standard and applications really use it since forever, as opposed to Windows (apps saving user settings to registry, IE6 saving bookmarks to its "Program Files" dir - not sure how it is done now). One could argue that someone who knew Unix 30 years ago could still use command line in today's Linux without much problems.