2

I create a directory called bob@example.com/

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 bob@example.com

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

...
'bob@example.com`
...

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

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:

‘bob@example.com’

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

Kusalananda
  • 333,661
Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255