Awesome, Tomas, awesome.

So it was implicit in my system all this time.

Good grief.

Anyhow, yes, that's exactly what i was looking for.

Well, i guess a little more: i want programmatic access to the
attributes as well.

But obviously the attr program has programmatic access to the
attributes, so presumably all i need to do is hunt down its code and
look at it.

dan

On Tue, Dec 19, 2017 at 10:39 AM,  <to...@tuxteam.de> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Tue, Dec 19, 2017 at 10:27:38AM -0800, Dan Hitt wrote:
>> BeOS had (and i imagine Haiku has) a file system that allows all kinds
>> of attributes to be attached to a file.
>
> Most self-respecting file systems on Linux have extended
> attributes these days (at least for a value of "ext4" for
> "self-respecting", that is; for the others, consult the
> file system's man page ;-)
>
> You need the program "attr" for that, present in the Debian
> package "attr" (not installed by default).
>
> Sample session:
>
>   # create a file to play with:
>   tomas@trotzki:~$ touch mumpf
>   # set mumpf's 'color' attribute to the value 'red'
>   tomas@trotzki:~$ attr -s color -V red mumpf
>   Attribute "color" set to a 3 byte value for mumpf:
>   red
>   # list mumpf's attributes:
>   tomas@trotzki:~$ attr -l mumpf
>   Attribute "color" has a 3 byte value for mumpf
>   # get mumpf's 'color' attribute's value:
>   tomas@trotzki:~$ attr -g color mumpf
>   Attribute "color" had a 3 byte value for mumpf:
>   red
>
> Is that what you were looking for?
>
> Cheers
> - -- tomás
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
>
> iEYEARECAAYFAlo5XOoACgkQBcgs9XrR2kYhYgCdHInAo4tBODcWUMfRpLJzygIZ
> Oz4Anim4XbLSNgJjQ7ySF7/XciFgM0N7
> =M+du
> -----END PGP SIGNATURE-----
>

Reply via email to