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. Do people other than the OS
by cobertos 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.
Do people other than the OS tend to use these? Are they well-trodden and portable between OS's? I've seen Unity's .meta files and kind of haten them but assumed they were sort of the "the way"
- 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...
- kccqzy 4y agoI pretty much treat them as macOS only. Useful for things like Spotlight comments, Finder tags, and other macOS-exclusive features. They were originally introduced in Tiger, by the way. https://arstechnica.com/gadgets/2005/04/macosx-10-4/7/ https://arstechnica.com/gadgets/2005/04/macosx-10-4/7/
- PeterWhittaker 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. Extended attributes have existed in Linux for many years and are used extensively in security controls. The two most common examples are likely access control lists (ACLs) and SELinux contexts. For the latter, many commands (mv, cp, ls, ps, etc.) have a -Z option to preserve or view the SELinux context associated with a file/process.