32

The following picture is snapped in a real Linux environment.

ls output showing characters similar to forward-slash (/) in a filename

Why can Linux show a file name containing character '/'?

9
  • 7
    So what character is it? Please update your question with the hexdump output. Commented Sep 5, 2014 at 5:09
  • 1
    Even if all APIs enforce filename character restrictions on write, it could be possible (but unwieldy) to edit the filename directly in the disk image. (I do not know if today's usual filesystems check filenames on read.) Commented Sep 5, 2014 at 6:52
  • @cjm,I have reverted the snapshot of vmware. Commented Sep 5, 2014 at 9:33
  • 5
    @xmllmx: That's one of the reasons why rather than (or in addition to) a picture, it's best to copy and paste the output as text. Commented Sep 6, 2014 at 7:16
  • 2
    Ext* only bans two chars from filenames: \0 and /. This is a kernel- and FS-level limitation; even if you managed to do it by mucking around with directory entries yourself, i'm about 82% certain Linux wouldn't be able to navigate to the file to open it. Commented Sep 6, 2014 at 16:01

1 Answer 1

53

It's not a / character (U+002F); it's some Unicode character that just looks similar.

Try

ls | hexdump -C

to see what it is.

Some possibilities are FRACTION SLASH (U+2044), DIVISION SLASH (U+2215), MATHEMATICAL RISING DIAGONAL (U+27CB), and the combining solidus characters U+0337 and U+0338, but there's no way to tell which one from your screenshot.

1
  • 2
    cool...thanks, that ls | hexdump -C seems to be useful in a number of cases. Commented Sep 5, 2014 at 6:06

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.