From 60ca5f3d1680086432d1e570e9e5e8fdaf16fcb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=BC=9F=E8=B0=83=E8=B0=83=E2=84=A2?= Date: Fri, 8 Apr 2022 00:35:19 +0800 Subject: [PATCH] Update pwd.md --- command/pwd.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/command/pwd.md b/command/pwd.md index 47c0cae8b1..1d7ec0bec6 100644 --- a/command/pwd.md +++ b/command/pwd.md @@ -69,9 +69,11 @@ pwd [OPTION]... /var ``` +显示软连接文件最终指向的文件路径 + ```shell -[root@localhost ~]# cd /var/ #进入/var目录,该目录下有个mail连接文件,方便对比查看 -[root@localhost var]# ll +[root@localhost ~]# cd /var/ # 进入/var目录,该目录下有个 mail 软连接文件 +[root@localhost var]# ls -al total 164 ... lrwxrwxrwx 1 root root 10 Oct 17 2015 mail -> spool/mail @@ -81,7 +83,7 @@ lrwxrwxrwx 1 root root 10 Oct 17 2015 mail -> spool/mail /var/mail ``` -不使用逻辑路径,连接文件最终指向的文件 +使用 `-P` 参数,显示的不是逻辑路径,而是连接(软连接)文件最终指向的文件 ```shell [root@localhost mail]# pwd -P