backslash
Jorge Almeida
jjalmeida at gmail.com
Wed Jun 25 14:26:43 PDT 2008
On Wed, 25 Jun 2008, Bill Campbell wrote:
> On Wed, Jun 25, 2008, Jorge Almeida wrote:
>> This may look a somewhat strange question, but anyway: can I be
>> reasonably sure that no file belonging to a [sane] package ever has a
>> backslash in its path?
>
> Presuming that the backslash you are talking about is ``\'', not
It is.
> what Windows users may think of a backslash, ``/'', the backslash
> is not an illegal character in a path, but I would be extremely
> surprised to find any except, perhaps, is something a cracker was
> attempting to hide.
>
>
> I don't know about gentoo/debian systems, but I would suspect
> that there would be a command similar to ``rpm -qf filename''
> that would reveal the package name. At least in the rpm world
There is, it's called 'equery'. But it is really slow. I think it just
reads text files associated with packages until it founds what it wants.
> this seems to work regardless of symlinks.
symlinks are my home made solution, it has nothing to do with equery.
I'm just toying with the idea of learning some C, and I want something
low-tech (meaning: no real database involved, only something that could
be queried by elementary means, making use of the filesystem itself as a
"database"--although in practise a C program would be used to add/remove
symlinks or to find the package owning a file).
Jorge
More information about the Linux-users
mailing list