3

I have a folder in my system with no name in it. It is empty. But that folder has files inside it.

Just out of curiosity, I tried to create another folder and try to rename it by not giving any name. But I could not do it.

Any idea, how can it be achieved?

On the same topic, how to access that folder in the shell?

5
  • If you do ls -l in the parent directory, what is the output?
    – Braiam
    Aug 9, 2013 at 12:53
  • I am sorry, in the height of excitement, I renamed it to "/". I was trying to use the escape sequence "\ " ( Read it as \<space> ) Aug 9, 2013 at 12:55
  • 1
    I could create a folder called " " (space) just typing mkdir " ". It had name, just that it was named " "
    – Braiam
    Aug 9, 2013 at 12:56
  • @Braiam, Vow, Thanks, Any idea, how do we access in the terminal? Aug 9, 2013 at 12:57
  • 1
    cd \ / works just fine
    – Braiam
    Aug 9, 2013 at 12:58

1 Answer 1

3

Accourding with these Rules For Naming File And Directory Names, no, it can't have no name, but can be named with one or more space/blank characters:


enter image description here

From the above picture you can deduce that you can access a directory having only a space in the name with:

cd ' '
3
  • For example mkdir '' returns mkdir: cannot create directory ‘’: No such file or directory or mkdir -p some//path just create some/path.
    – Braiam
    Aug 9, 2013 at 13:00
  • @Braiam Yes, but for example mkdir ' ' is creating a ' ' directory :/ Aug 9, 2013 at 13:30
  • Sorry, I was under the perception you have read my other comment
    – Braiam
    Aug 9, 2013 at 13:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .