手机
当前位置:查字典教程网 >脚本专栏 >linuxshell >getcwd cannot access parent directories错误解决方法
getcwd cannot access parent directories错误解决方法
摘要:复制代码代码如下:[root@web-serverphp]#/etc/init.d/httpdrestartshell-init:error...

复制代码 代码如下:

[root@web-server php]# /etc/init.d/httpd restart

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

该错误表示 getcwd 命令无法定位到当前工作目录。一般来说是因为你 cd 到了某个目录之后 rm 了这个目录,这时去执行某些 service 脚本的时候就会报 getcwd 错误。只需要 cd 到任何一个实际存在的目录下在执行命令即可。

【getcwd cannot access parent directories错误解决方法】相关文章:

如何编写健壮的Bash脚本(经验分享)

获取站点的各类响应时间(dns解析时间,响应时间,传输时间)

Shell脚本统计当前目录下目录和文件的数量

bash scp command not found的解决方法

shell中使用echo打印彩色字体和彩色背景的方法

一天一个shell命令 linux文件内容操作系列-cat命令详解

Shell处理带空格的文件名的方法

gearman队列持久化引发的问题及解决方法

linux下实现ftp自动备份shell脚本

Centos下查看网卡的实时流量命令

精品推荐
分类导航