2013年9月15日星期日

cd .. wrong, what is the situation


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$

above cd .. why it went wrong , and never encountered it , the operating system is ubuntu12.04
------ Solution -------------- ------------------------------
directory is deleted it
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 / .. $
------ Solution ------------------ --------------------------
father was too hard to kill the child , of course can not find the father the
------ For reference only ---------------------------------------

Great God let me suddenly, very grateful

没有评论:

发表评论