2

I create a directory called [email protected]/

I wanted to use this email address as the directory name - I know - not a good idea for many reasons - but lets assume this is a very temporary directory that I delete seconds later :)

I give the command

mkdir [email protected]

However when I check the directory I see it actually created it with quotes around it.

...
'[email protected]`
...

I then found this is due to the @

What are the rules for special characters in directory names and how does the system decide to quote them

Michael Durrant
  • 41,213
  • 69
  • 165
  • 232

1 Answers1

6

This is just the way that ls displays the name, and does not mean that the name contains literal quotes.

If your ls is aliased to use --quoting-style=locale, that would produce:

[email protected]

... with unicode "LEFT SINGLE QUOTATION MARK" and "RIGHT SINGLE QUOTATION MARK" characters surrounding the filename(s).

Kusalananda
  • 320,670
  • 36
  • 633
  • 936
Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250