pwd命令
【pwd】 打印当前的工作目录 pwd==print work director
命令格式:
pwd [OPTION]...
命令功能:
打印当前工作目录的全路径
命令参数:
-L, --logical 目录连接链接时,输出连接路径
-P, --physical 输出物理路径
命令实例:
实例1:查看当前路径
命令:
pwd
输出:
[root@localhost ~]# pwd
/root
实例2:目录连接链接时,pwd -P 显示出实际路径,而非使用连接(link)路径;pwd显示的是连接路径
命令:pwd -P
输出:
[root@localhost init.d]# pwd
/etc/init.d
[root@localhost init.d]# pwd -P
/etc/rc.d/init.d
[root@localhost init.d]# ll
lrwxrwxrwx. 1 root root 11 Jul 5 09:38 init.d -> rc.d/init.d
实例3:/bin/pwd
输出:
[root@localhost init.d]# /bin/pwd
/etc/rc.d/init.d
[root@localhost init.d]# /bin/pwd -P
/etc/rc.d/init.d
[root@localhost init.d]# /bin/pwd -L
/etc/init.d
实例4:当前目录被删除了,而pwd命令仍然显示那个目录,/bin/pwd不显示
命令:
pwd /bin/pwd
输出:
[root@localhost hello]# pwd
/nihao/hello
[root@localhost hello]# /bin/pwd
/nihao/hello
[root@localhost hello]# rm -rf ../hello/
[root@localhost hello]# pwd
/nihao/hello
[root@localhost hello]# /bin/pwd
/bin/pwd: couldn't find directory entry in `..' with matching i-node
pwd命令的更多相关文章
- linux常用命令(2)pwd命令
pwd 命令1 命令格式:pwd [选项]2 命令功能查看当前工作目录的完整路径3 常用参数一般不带任何参数如果目录是链接时:pwd -P 显示实际路径,而非使用链接路径4 常用实例:4.1 用pwd ...
- Linux命令学习总结:pwd命令
命令简介: 该命令用来显示目前所在的工作目录.指令英文原义:print work directory 执行权限 :All User 指令所在路径:/usr/bin/pwd 或 /bin/pwd ...
- 每天一个linux命令(3):pwd命令
Linux中用 pwd 命令来查看”当前工作目录“的完整路径. 简单得说,每当你在终端进行操作时,你都会有一个当前工作目录. 在不太确定当前位置时,就会使用pwd来判定当前目录在文件系统内的确切位置. ...
- 【初级】linux pwd 命令详解及使用方法实战
pwd:查看当前工作目录 前言: Linux中用 pwd 命令来查看”当前工作目录“的完整路径,就是经常提及的所在目录,多用在生产环境多级目录中查看当前所在路径,使用此命令能给运维人员/操作人员带来很 ...
- linux命令(3):pwd命令
Linux中用 pwd 命令来查看”当前工作目录“的完整路径. 简单得说,每当你在终端进行操作时,你都会有一个当前工作目录. 在不太确定当前位置时,就会使用pwd来判定当前目录在文件系统内的确切位置. ...
- 每天一个Linux命令(3):pwd命令
Linux中用 pwd 命令来查看"当前工作目录"的完整路径. 简单得说,每当你在终端进行操作时,你都会有一个当前工作目录. 在不太确定当前位置时,就会使用pwd来判定当前目录在文 ...
- Linux命令详解之—pwd命令
Linux的pwd命令也是一个非常常用的命令,本文为大家介绍下Linux中pwd命令的用法. 更多Linux命令详情请看:Linux命令速查手册 Linux pwd命令用于显示工作目录. 执行pwd指 ...
- pwd命令(转)
Linux中用 pwd 命令来查看”当前工作目录“的完整路径. 简单得说,每当你在终端进行操作时,你都会有一个当前工作目录. 在不太确定当前位置时,就会使用pwd来判定当前目录在文件系统内的确切位置. ...
- linux命令 --> pwd命令
关于 pwd 命名前面在cd命令中已经出现过啦!!不过还是简单的说一下吧! pwd命令简单的介绍: pwd - print name of current/working directory(这... ...
随机推荐
- oracle日常——数据库备份
1.进入cmd 2.运行命令 exp [scott]/[orcl]@[orcl] file=[d:\oracle_back\scott_orcl.dmp] owner=scott 格式如下: exp ...
- android-配置文件AndroidManifest.xml
AndroidManifest.xml 是每个android程序中必须的文件.它位于整个项目的根目录,描述了package中暴露的组件(activities, services, 等等),他们各自的实 ...
- Oracle查询时间字段并排序
select * from geimstatus_history twhere to_date(t.data_time,'YYYY-mm-dd') = to_date(sysdate,'YYYY-mm ...
- 【转载】STL之priority_queue
参考资料:传送门先回顾队列的定义:队列(queue)维护了一组对象,进入队列的对象被放置在尾部,下一个被取出的元素则取自队列的首部.priority_queue特别之处在于,允许用户为队列中存储的元素 ...
- FZU 2105Digits Count(线段树 + 成段更新)
Description Given N integers A={A[0],A[1],...,A[N-1]}. Here we have some operations: Operation 1: AN ...
- Généralement c'est un mélange qui me devient personnellement
Parmi mes plus grands problèmes personnels avec maisons de rue conventionnelles est en fait ils sont ...
- 数据结构之平衡查找树(AVL)
AVL树的旋转操作 图解 最详细 各大教课书上讲的都是左旋与右旋,其实这样很容易理解错误,我们换一种叫法.我们称呼左旋为:逆进针旋转.我们称呼右旋为:顺进针旋转.
- svn提交时提示 Aborting commit: remains in conflict 解决办法
出现在rename一个目录时,再提交时一直报错 Aborting commit: remains in conflict 使用右键菜单 svn - resolve 即可解决.用cleanup之类的都没 ...
- [Java] Maven 建立 Spring MVC 工程
GIT: https://github.com/yangyxd/Maven.SpringMVC.Web 1. 建立 WebApp 工程 下一步: 下一步: 选择 maven-archetype-web ...
- SPSS课程学习思路及流程
数据挖掘领域对行的分析