5 ms·
A better question is why are hard drives still being assigned drive letters? Multiple "roots" in the file system hierarchy is just plain stupid. You need to spe
by programmer_dude 5y ago
A better question is why are hard drives still being assigned drive letters? Multiple "roots" in the file system hierarchy is just plain stupid. You need to special case your path navigation commands for for drive letters. (E.g. cd v/s cd /d). etc.
- zabzonk 5y ago> A better question is why are hard drives still being assigned drive letters? Backwards compatibility. I agree it is unfortunate.
- beardyw 5y agoI had an old Windows machine with 2 drives (C and D of course). I wanted to use it for Linux but keep the old system. I moved all of D into a directory on C, but obviously all the old paths would be wrong. But it turns out that tinkering with the registry I could declare the new folder as D! I wonder what would happen if you called it A or B?
- programmer_dude 5y agoLol, that's a slick way of working around this mess.
- richij 5y agoIt's not mandatory. You can tell Windows not to assign a letter to a new volume (but I wouldn't try to remove the assignment from C:). And you can mount new volumes under an empty directory, just like *nix. The best place to do this is in the Disk Management app. The easiest way to access it is via the Win+X menu.
- mrlonglong 5y agoUNCs are the best thing since sliced bread, and does exactly what you want. \\machine\c\your_folders \\machine\d\yet_more_folders
- Jaruzel 5y agopedantry correction (I can't help myself!): it's c$ and d$ not c and d.
- mrlonglong 5y agoQuite right, I was being bit lazy typing all that out.
- netsharc 5y agoIn the command line in Windows you can still do magical things like, say you want to convert some videos in D:\Videos\ and ffmpeg is in C:\Program Files\ffmpeg\bin . You can open the command line and enter: D: # changes to D: Drive cd Videos # enter the Videos directory cd "C:\Program Files\ffmpeg\bin" At this point the prompt will still say D:\Videos> and you can type "C:ffmpeg my-movie.avi" and Windows will execute ffmpeg from the "current directory" of the C: drive, but process the file D:\Videos\my-movie.avi .
- programmer_dude 5y agoThis is cool. I guess there's some utility in keeping things separate as well.
- mkj 5y agoThe root of the hierarchy being one of the arbitrary drives seems a bit strange. Why is my USB stick (a physical thing I can hold) part of a Linux partition of my hard disk? Having fixed letters is a bit antiquated, but drives as separate entities seems to match the real world quite well.
- thesuperbigfrog 5y ago>> Why is my USB stick (a physical thing I can hold) part of a Linux partition of my hard disk? It is not part of the partition. It is just an arbitrary path that is mapped to your USB stick. You can choose where you want it to be mapped depending on your needs and what you are trying to do. There are conventions about where most Linux distributions will map removable media (/mnt or /media), but conventions do not have to be followed if you do not want to. The "one filesystem" design of Unix / Linux is all about abstraction. Anything that follows file-like conventions can be mapped into the filesystem. For example, on Linux there is a virtual filesystem under /proc. "/proc is very special in that it is also a virtual filesystem. It's sometimes referred to as a process information pseudo-file system. It doesn't contain 'real' files but runtime system information (e.g. system memory, devices mounted, hardware configuration, etc). For this reason it can be regarded as a control and information centre for the kernel. In fact, quite a lot of system utilities are simply calls to files in this directory. For example, 'lsmod' is the same as 'cat /proc/modules' while 'lspci' is a synonym for 'cat /proc/pci'. By altering files located in this directory you can even read/change kernel parameters (sysctl) while the system is running." Source: https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.html https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.ht...
- mkj 5y agoAre there any mainstream distros (not things like OpenWRT) that have / as not-your-main-hard-disk though? If / were some abstract place then sure it would make sense, but that isn't usually the case.
- programmer_dude 5y ago