3 ms·
> I didn't know about extended attributes before this, but also I grew up with Windows and now Linux and just haven't run into them. The somewhat similar mecha
by loeg 4y ago
> I didn't know about extended attributes before this, but also I grew up with Windows and now Linux and just haven't run into them.
The somewhat similar mechanism on Windows is Alternative Data Streams. ADS are like named subfiles below your main file. If you squint pretty hard, unix xattrs look kind of similar -- they're also named binary objects attached to files. But xattrs are typically limited to much smaller amounts of data due to implementation details, and are also namespaced with some sort of integer enum (on Linux, "user" and "system" are common).
I would not really assume they're a portable construct, although commonly used unix-likes (Mac and Linux) both support them in their most popular filesystems.
- ciupicri 4y agoOne of the most popular ADS is probably the Zone.Identifier [1][2] which is how Windows knows if the program you're trying to run was downloaded from the Internet. [1]: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/6e3f7352-d11c-4d76-8c39-2516a9df36e8 https://learn.microsoft.com/en-us/openspecs/windows_protocol... [2]: https://devblogs.microsoft.com/scripting/powertip-use-powershell-3-0-to-identify-zone-information-of-files/ https://devblogs.microsoft.com/scripting/powertip-use-powers...