-   Linux - Newbie (
-   -   (Gmail-like) labels on local files? (

FrancescoPx 11-28-2012 08:31 AM

(Gmail-like) labels on local files?
do you know the labels Gmail (and possibly others) allow to use with emails? I find them very useful, you can tag each email with many labels (instead of organizing them into directories), and then displaying only those with a particular label.

I was wandering if files in linux can be tagged the same way. In a particular example, I have many articles in .pdf which I want to organize better than building directories. One article could have different labels on it.

I guess one method could be still using directories and links, but I don't really like it. I would prefer to stamp the information on the file itself, and leaving all the files in a single directory, extracting only those that have the label I am interested in.

do you have any suggestion? does this feature exist? how would you do it?


shivaa 11-28-2012 09:46 AM

Labels in gmail are nothing but folder tags. As you mentioned, creating individual directories is one option, but one thing I'd like to ask that do you want such labels in command line (while you displaying files) or in GUI i.e. when you open a windows (e.g /home/user) and you see files/dir. tagged with colorful labels?

FrancescoPx 11-28-2012 10:04 AM

well, a colorful GUI with movable labels with a search engine would be nice, but hard to get I guess.
So I will be happy with a terminal command (find-like?).
The problem with (sub)directories+links is that the information of the label would not be stored within the file.
Soft links could suffer if the original file is modified.
Probably using hard links is a reasonable solution?
(in this case I could use a software to organize articles and bibliography, but I don't like any of them...)

thanks for the help

shivaa 11-28-2012 11:23 AM

Which OS you're using? Once check if dircolors command exists there, as:

which dircolors
man dircolors

I have found a useful link ( ), using which you can set colors of same type of file extension. Although it's very uncommon command, so we will do some experiments and explore it further.

FrancescoPx 11-28-2012 05:53 PM

I guess what I'm looking for are extended file attributes

FrancescoPx 11-29-2012 06:24 AM

... and this link is extremely useful

ntubski 11-29-2012 10:09 AM


Originally Posted by FrancescoPx (Post 4839082)
I guess what I'm looking for are extended file attributes

I think what you are really looking for is a tag based filesystem; searching the web turns up quite a few hits for that, but I get the impression most of the projects are at alpha level and not really ready to just install and go.

FrancescoPx 11-29-2012 04:57 PM

Yes, that is it. It really seems a good idea to me, though apparently difficult to implement.
Here a nice discussion.
I'll give a try with xattr, but a graphical interface in this case (with e.g. autocompletion for existing tags) is quite fundamental.

All times are GMT -5. The time now is 12:25 PM.