shell pwd -P

shell pwd -P 显示当前路径的物理路径,与pwd命令的结果,在以下这种情况是不同的:

Ethan@Ethan-mac > ~/self_work/learn/shell > ln -s ~/env/data ./tmp

Ethan@Ethan-mac > ~/self_work/learn/shell > ll
total 0
lrwxr-xr-x 1 Ethan staff 21B 9 22 17:53 tmp -> /Users/Ethan/env/data
Ethan@Ethan-mac > ~/self_work/learn/shell > cd tmp

Ethan@Ethan-mac > ~/self_work/learn/shell/tmp > pwd
/Users/Ethan/self_work/learn/shell/tmp

Ethan@Ethan-mac > ~/self_work/learn/shell/tmp > pwd -P
/Users/Ethan/env/data

0 评论
最新
最旧 最多投票
内联反馈
查看所有评论
滚动至顶部