Settings

Theme

Using extended attributes to tag files

alexlance.blog

6 points by alance 17 days ago · 5 comments

Reader

sureglymop 16 days ago

So you're telling me my size 0 file may unknowingly be a large key/value db? Neat.

The system call to read these attributes is getxattr(), for anyone curious.

  • alanceOP 16 days ago

    Ha, it suddenly sounds like trouble.

    Eg: one could piggy-back an entirely new file onto an existing file (it might have to be text encoded?).

    It looks like the kernel might impose a limit of 64KiB on a file's metadata, but that's still quite a lot of room for data smuggling...

alanceOP 17 days ago

My recent journey sorting through years of files and categorizing/tagging them with the built-in Extended File Attribute functionality.

  • karmakaze 17 days ago

    I've lost extended attributes of files on a number of systems because they aren't always included by default in file operations. I don't trust everything that could possibly write/update a file to preserve them--common 'safe' pattern is to rename as .bak and write new file contents without EA to original name. Nor do I trust myself from archiving without using the right options in a hurry.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection