Linux中的 pwd, $PWD 与 cwd
访问量: 21841
refer to: http://unix.stackexchange.com/questions/174990/what-is-pwd-vs-current-working-directory
一句话解释: 都指某个进程运行时所在的 目录.
$PWD 是个系统变量
pwd 是linux 自带的命令. 全称: pathname of the current working directory.
cwd: 不是系统自带的命令, 但是属于 系统的属性 . 全称: current working directory . 不但在 /proc/{id} 这个目录下可以看到cwd, 在很多其他的编程语言中也可以看到( 例如grunt )
有时候 pwd 与 $PWD 给出的结果不同. 不过这个有点儿太学究了. 知道上面的就足够了.