You are not logged in.
Pages: 1
For a long time, I've known that UNIX has support for some kind of comment field in its filesystems, and every now and then I get a little confirmation from things like eg a webserver that has an additional "comment" field running alongside the listing (no, that support isn't via a .comments file or something else, I'm pretty sure it really was reading some kind of block from the file descriptor), or some other similar thing. Does Linux have this, and if it does, how do I use it?
If it's filesystem-dependant, I use JFS.
If I'm completely wrong about this comment thing (and I'll be really surprised if I am), what method do you recommend so that I can add comments to files myself? Or what else do you recommend I take a look at for sorting out/organizing a file system via a method similar to using comments or tags?
-dav7
Last edited by dav7 (2008-09-27 12:51:35)
Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.
Offline
Well I didn't know anything about this until today, but your comment intrigued me so I decided to check it out. Linux does indeed support something like the feature you mention, called extended file attributes or xattrs for short. JFS supports these, in fact I use JFS myself so I can confirm first hand that they work. You can assign key-value pairs to a file, then retrieve them later. The key must be set in one of the supported namespaces: "security", "system", "trusted" or "user". You also need to install the "attr" package to be able to work with them (this was already installed on my machine, so...). Here is an example:
[jack@Jackington ~]$ setfattr -n user.author -v "John Smith" drawing.png
[jack@Jackington ~]$ getfattr -d drawing.png
# file: drawing.png
user.author="John Smith"
I think there are easier ways to tag files though, I am using KDE and the Dolphin file manager lets you assign searchable comments and tags to anything you like. However, they are not implemented using the xattr system, so maybe you don't want to use that. There might be another file manager that can do this with xattrs, but you'll have to ask someone better informed, I'm afraid!
Offline
Wow, cool
I can use "user.tags" and stuff
Thanks a heap for this info!
-dav7
Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.
Offline
I don't think this is sticky material. Make a wiki page if you like.
Offline
Allan: okay, I might (or might not...) do a Wiki page then.
-dav7
Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.
Offline
Pages: 1