backslash

Bill Campbell linux-sxs at celestial.com
Wed Jun 25 12:42:28 PDT 2008


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
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.

> In case you're wondering, I want to cook up a setup to find which
> package owns a file (the gentoo way is really slow): a directory is
> populated with symlinks, each corresponding to a file; the target is the
> package owning the file; of course, the symlink name can't have a slash,
> hence the question...

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
this seems to work regardless of symlinks.

Bill
-- 
INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186

The ultimate result of shielding men from the effects of folly is to fill
the world with fools. -- Herbert Spencer (1891)



More information about the Linux-users mailing list