Linux入門–pwdコマンドの使い方
1.現在のディレクトリの場所を確認
# pwd
/opt/jmeter/data
2.リンクのパスを確認
# cd /etc/init.d
[root@localhost init.d]# pwd
/etc/init.d
[root@localhost init.d]# pwd -P
/etc/rc.d/init.d
3.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 ~]#