backslash

Roger Oberholtzer roger at opq.se
Wed Jun 25 23:25:45 PDT 2008


On Wed, 2008-06-25 at 17:25 +0100, 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?

Not in the file system. Escaped characters do not get a backslash in a
symbolic link.

> touch "stupid name"
> ln -s stupid\ name psn
> ll psn stupid\ name
lrwxrwxrwx 1 roger users 11 2008-06-26 08:20 psn -> stupid name
-rw-r--r-- 1 roger users  0 2008-06-26 08:19 stupid name

But perhaps in a file that describes the file system there could be a
backslash. And note that in my access to the stupid file name, I had to
use a backslash. Either that or enclose the name in quotes. Perhaps you
are looking at a file that choose not to use quotes around file names,
and opted for "\ " to deal with spaces in names?

-- 
Roger Oberholtzer

OPQ Systems / Ramböll RST

Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Office: Int +46 8-615 60 20
Mobile: Int +46 70-815 1696

And remember:

It is RSofT and there is always something under construction. 
It is like talking about large city with all constructions finished. 
Not impossible, but very unlikely.





More information about the Linux-users mailing list