日期:2014-05-16  浏览次数:20706 次

cd ..出错,是什么情况

zhangys@hj03:/platform_soft/Interlocking/src/core$ cd ..
cd: 获取当前目录时出错: getcwd: 无法访问父目录: 没有那个文件或目录
zhangys@hj03:/platform_soft/Interlocking/src/core/..$ cd ..
cd: 获取当前目录时出错: getcwd: 无法访问父目录: 没有那个文件或目录
zhangys@hj03:/platform_soft/Interlocking/src/core/../..$ cd ..
zhangys@hj03:/platform_soft$ ls
cmake1  mytest  Old  Samba服务器构建步骤.docx  test  平台软件词汇表.xlsx
zhangys@hj03:/platform_soft$

上面cd ..为什么出错了,从来没遇到过呢,操作系统是ubuntu12.04

------解决方案--------------------
目录被删除啦
linux:/home/mymtom/tmp$ mkdir -p foo/bar
linux:/home/mymtom/tmp$ cd foo/bar
linux:/home/mymtom/tmp/foo/bar$ rm -rf ../../foo
linux:/home/mymtom/tmp/foo/bar$ cd ..
cd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
linux:/home/mymtom/tmp/foo/bar/..$ pwd
/home/smgview/tmp/foo/bar/..
linux:/home/mymtom/tmp/foo/bar/..$ 
------解决方案--------------------
太狠了  父亲被干掉了  孩子当然找不到爹了