• 企业400电话
  • 微网小程序
  • AI电话机器人
  • 电商代运营
  • 全 部 栏 目

    企业400电话 网络优化推广 AI电话机器人 呼叫中心 网站建设 商标✡知产 微网小程序 电商运营 彩铃•短信 增值拓展业务
    一个简单的linux命令 pwd

    pwd命令主要用于查看当前工作目录的完整路径。

    主要用法:pwd [option]

    常用范例:

    1.查看当前完整路径

    命令:pwd

    输出:

    [root@localhost ~]# pwd
    /root
    [root@localhost ~]#
    

    2.查看链接路径

    命令:pwd -P

    输出:

    [root@localhost soft]# cd /etc/init.d 
    [root@localhost init.d]# pwd
    /etc/init.d
    [root@localhost init.d]# pwd -P
    /etc/rc.d/init.d
    

    特性:当前目录被删除了,而pwd命令仍然显示那个目录

    [root@localhost init.d]# cd /opt/soft
    [root@localhost soft]# mkdir removed
    [root@localhost soft]# cd removed/
    [root@localhost removed]# pwd
    /opt/soft/removed
    [root@localhost removed]# rm ../removed -rf
    [root@localhost removed]# pwd
    /opt/soft/removed
    [root@localhost removed]# /bin/pwd
    /bin/pwd: couldn't find directory entry in “..” with matching i-node
    [root@localhost removed]# cd 
    [root@localhost ~]# pwd
    /root
    [root@localhost ~]#
    

    以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持脚本之家。

    您可能感兴趣的文章:
    • 每天一个linux命令 head命令
    • linux find命令之xargs简单概述
    • linux find命令之exec简单概述
    • linux命令之find命令简单概述
    • 每天一个linux命令 chgrp命令
    • 详解Linux文本文件与WIN文本文件换行格式转换命令
    • 一个简单的linux命令 mv
    • 一个简单的linux命令 cp
    • 一个简单的linux命令 touch
    • 每天一个linux命令 whereis命令
    上一篇:一个简单的linux命令 mkdir
    下一篇:bash脚本编程学习之算术运算与文件查找
  • 相关文章
  • 

    © 2016-2020 巨人网络通讯 版权所有

    《增值电信业务经营许可证》 苏ICP备15040257号-8

    一个简单的linux命令 pwd 一个,简单,的,linux,命令,