Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Aug 21 '10 at 4:37

This question came from our site for professional and enthusiast programmers.

    
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. –  Masi Apr 17 '09 at 9:31
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
    
@Jaap: How can I edit that fork? –  Masi Apr 17 '09 at 21:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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