On Monday 03 March 2008 20:08, Sridhar Ayengar wrote:
Fred Cisin wrote:
On Mon, 3 Mar 2008, Sridhar Ayengar wrote:
And there really isn't any reason one cannot
create filenames with
slashes in them in UNIX. The only OS I know of that completely
prohibits it is Windows.
Even Windoze can't stop us from creating files with "invalid"
filenames.
You can also create a file named *.*
(getting rid of it may be harder)
Except, in UNIX, one can have a completely *valid* filename with
slashes in it. Or almost any other character in the system
character-set really.
No you can't. The only two characters you can't have in a filename
are "/" and NUL, as far as the kernel is concerned. Of course, you can
have a "\", but that's properly called a "backslash" not a
"slash". :)
I ran into this problem at work once; the HSM we use exports itself as
an nfs share, and through timezone settings it didn't like, "/" got
inserted into filenames that it automatically generated when useres
deleted files.
I can site a reference even (though a different one than I remember
looking at when I was trying out how to fix the HSM):
http://www.faqs.org/faqs/unix-faq/faq/part2/section-2.html
I can't think of any UNIX(-alike) kernel that wouldn't interpret a "/"
passed to it in a filename as a directory separator. The only way to
get around this is to go around the kernel and poke at the filesystem
(or filesystem drivers) yourself, to convince them to shoot you in the
foot.
Pat
--
Purdue University ITAP/RCAC ---
http://www.rcac.purdue.edu/
The Computer Refuge ---
http://computer-refuge.org