News for hackers. Stuff that matters.
Re:A surprising way to lose your files on Windows by SCLeo on Saturday October 01, 2022 @05:40PM (#33050393)
Same can be said about linux. where exactly is "~"? And which hard drive is /etc currently on? Sure, if you have setup the system yourself or know how to use linux commands, you can figure it out with ease, but so does on Windows (Right click -> properties).
Re:A surprising way to lose your files on Windows by kuratkull on Saturday October 01, 2022 @06:50PM (#33050913)
I use both operating systems. I never have questions about my locations in Linux, but I constantly wonder about the abstractions Windows throws at me.
Re:A surprising way to lose your files on Windows by brokenmachine on Wednesday October 05, 2022 @02:00AM (#33091828)
I've been using Linux for years and still don't know the difference between /etc and /var.
Re:A surprising way to lose your files on Windows by d110af5ccf on Saturday October 01, 2022 @07:05PM (#33051009)
Not really. May Windows programs actively obfuscate certain paths. On linux, ~ is simply shorthand for your home directory. Note that knowing what particular block device is backing a given path is not at all the same thing as being able to see the path in the first place.

Beyond that, getting a full path is trivial (realpath) and figuring out which block device backs it is also quite straightforward (findmnt).

Re:A surprising way to lose your files on Windows by psd1 on Saturday October 01, 2022 @08:50PM (#33051638)
This is the first time I've heard of realpath, so it may be simple, but it's at least slightly obscure
Re:A surprising way to lose your files on Windows by emodendroket on Saturday October 01, 2022 @07:18PM (#33051092)
What program does that?
Re:A surprising way to lose your files on Windows by d110af5ccf on Saturday October 01, 2022 @07:30PM (#33051150)
Well for starters, the example in the post at the top of this page would presumably not have happened if the paths in Explorer hadn't been obfuscated. So that's one example.

There are also strange constructions that don't actually correspond to a single folder, or at least there were the last time I used Windows which was quite a few years ago now. A place that looked like a photo directory in Explorer, but actually it was a view of multiple directories and I don't know where stuff ended up if you copied into it.

Re:A surprising way to lose your files on Windows by mananaysiempre on Saturday October 01, 2022 @08:17PM (#33051435)
> There are also strange constructions that don't actually correspond to a single folder

The Explorer does not browse the file system, it browses a graph of (COM) objects called the “shell namespace”[1], and has been since Windows 95. Notable examples of non-filesystem nodes include My Computer, Recycle Bin, Control Panel, and Network Neighbourhood; a more obscure one is the All Tasks (“god mode”) collection of all settings applets that exists so that the Start menu can search it[2].

I actually think it’s neat how seamlessly this approach has been integrated—we don’t usually think about it even though we actually encounter it all the time. Microsoft’s attempts to extend this to a full-blown object-oriented (Cairo) or relational (Longhorn) filing system were always so muddled I don’t really get what the actual idea was, though.

[1] https://learn.microsoft.com/windows/win32/shell/namespace-in...

[2] http://brandonlive.com/2010/01/04/the-so-called-god-mode/

Re:A surprising way to lose your files on Windows by nikau on Saturday October 01, 2022 @10:31PM (#33052261)
The advantage is unix systems are virtually always setup correctly - your home drive will be persistent storage on a network share somewhere.

Contrast to windows where your "Documents" folder might be getting backed up via one drive or roaming profile, or it might just be local disk on that machine.

In my experience for a corporate windows environment its best to map a H: drive to a network home drive share and get users to always save in there - if its not mapped it means you are probably on misconfigured host.