2

I am at the folder wcw. I run

$pwd
/Users/cs/Coding-projects/wcw
$ls -lsa
total 0
0 drwxr-xr-x   5 M  staff   170B Apr  5 16:56 .
0 drwxr-xr-x   3 M  staff   102B Apr  4 11:25 ..
0 drwxr-xr-x  12 M  staff   408B Apr  5 16:56 .git
0 -rw-r--r--   1 M  staff     0B Apr  4 11:29 README
0 -rw-r--r--   1 M  staff     0B Apr  5 16:56 test

I want to go to the folder "test". I run

$cd test 
/Users/M/Documents/test

I run the following to see where I am now

$pwd
/Users/M/Documents/test

The folder test is not a symlink, as you can see from the above ls command.

What is the folder test?

How can it throw me to a random place?

  • test isn't a directory, it is an empty file. Your terminal output makes no sense. cd test should have failed, it shouldn't have printed anything. Care to provide a zip of the directory? Also, what shell are you running? – freespace Apr 17 '09 at 4:56
  • This isn't a programming question, but IMO you should run fsck. – derobert Apr 17 '09 at 6:23
  • @freespace: I run Bash. – Léo Léopold Hertz 준영 Apr 17 '09 at 9:31
3

Judging from your directory structure you are on an Apple system. Apple HFS still supports forks and since the file test has 0 zero there maybe a fork which links somewhere else.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.