This depends only on implementation details of links..
This is not the usual way to do it, but I don't see a special difficulty in having the 'link' commands registering the source in an attribute of the destination, in which case you can answer 'what other tags does this file have?' quite easily.
Another way to do it would be to have a separated database which would register such things.
A find command would work too, even if the answer would be much slower.
Posted Oct 16, 2012 21:21 UTC (Tue) by mathstuf (subscriber, #69389)
[Link]
The problem is that now `mv dir/ foo` is slow if dir/ is large. Every moved file must be checked against the database for multiple links and the new path updated. And we need foo to be fully resolved from the root of the filesystem. Alternatively, each link could be stored in the table as a (name, dirinode) pair and the path generated from the recursion over the dirinode (the mount point that the request was based in should probably be used as the "above the root" path prefix. The functionality could probably also be worked into the locate/updatedb tools.
Implementation detail
Posted Oct 17, 2012 10:32 UTC (Wed) by etienne (subscriber, #25256)
[Link]
> The functionality could probably also be worked into the locate/updatedb tools.
Maybe also most files in the filesystem could be tagged with the name of the rpm/deb package it comes from...