手机
当前位置:查字典教程网 >脚本专栏 >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错误解决方法】相关文章:

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

php编译安装常见错误大全和解决方法

Python执行Linux系统命令的4种方法

Shell编程中while与for的区别及用法详解

CentOS下redis自启动shell脚本

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

Shell中的函数、函数定义、作用域问题介绍

linux 监视端口是否正常的shell脚本

Shell脚本实现C语言代码行数统计

awk中NR和FNR的区别小结和实例演示

精品推荐
分类导航