I've sort of "lost" some files under a hidden directory in my home called .node_libraries When I ls its content from another directory, i see the wanted files and directories, but when i cd to it and then list the content, i can only see one directory. See below:
marvin:lib gu$ pwd
/Users/gu/dev/node.js/express/lib
marvin:lib gu$ ls ../../../../.node_libraries/
admin.js crypto gridfs request.js view.js
bson cursor.js index.js response.js
collection.js db.js jade responses
commands express middleware server.js
connection.js goog public utils.js
marvin:lib gu$ cd ../../../../.node_libraries/
marvin:.node_libraries gu$ ls
connect
What could be going on? Thanks
..
, it uses the “physical” cwd. The shell’s pwd shows (and cd uses) the “logical” cwd. If one of the path components ofdev/node.js/express/lib
(under/Users/gu
) is a symlink, then the physical and logical cwds will not match. Useset -P
(orcd -P
andpwd -P
//bin/pwd
) to escape the “symlink-in-cwd conspiracy”.