Files with slashes on Linux and Mac?


#1

But “/” is special, as it’s the directory separator: When you pass a string to the open system call, then I believe the kernel splits the string on “/” and then walks the directory hierarchy based on the results.


Can't open preferences pane anymore
#2

Not to the file system.The linux kernel may stop any system call from entering it but there are ways to talk directly to the file system. Disk editors can do it. Also other OS’s can write to a unix file system.

If you want proof, google the zillions of people who are asking how to delete a file with a slash in the name. It can be done using regular expressions in the find command.


#3

There are zillions of people asking how to delete a file with backslash in the name, but I find little information about forward slash. There is a StackOverflow posting: http://stackoverflow.com/questions/9847288/is-it-possible-to-use-in-a-filename
But then, none of the zillion hits mention disk editors.

Okay, now I googled for “use disk editor to delete a file with forward slash in the name” which finds fewer instances of backslashes, and there is this little gem here:
https://groups.google.com/forum/#!topic/comp.sys.amiga.misc/1BCX8VqxITI
Absolutely awesome suggestion, but it’s for the Amiga…

It’s a fascinating topic, though not closely related to Atom. But if you have more information to share, I’d be interested. Should make fascinating bed-time reading :smile:


#4

Not shure if i follow, but i didn’t have a problem deleting this folder, i just send it to trash. Although it wasn’t visible for me until i activated show hidden files.


#5

I stand corrected. My memory was wrong.

I still claim the file system can store names with slashes in inodes. In other words it’s the linux kernel, not the file system, that blocks slashes. Actually, this thread is about Macs, not linux, but I think the situation is the same. For fun I will try to create a file with a slash and show it to you. It will be linux though. I don’t have a Mac.


#6

On MacOSX, Finder gives the illusion of allowing forward slashes in file names – for example when renaming – but actually uses colon characters in the real file name (as can be seen when typing “ls” in a terminal).
Maybe supposed to help somehow with MacOS <= 9 files which used ‘:’ as directory separator. nfi