cd命令

•概述
切換工作目錄

•選項
Cd:切換回家目錄
Cd ~:切換回自己的家目錄
Cd~USERNAME:切換至指定用戶的家目錄
Cd -:在上一次所在目錄與當前目錄之間來回切換
注意:bash中,~表示家目錄

•實例
[root@localhost ~]# cd /etc/
[root@localhost etc]# cd -
/root
[root@localhost ~]# cd -
/etc
[root@localhost etc]#

[root@localhost ~]# cd ~tom
[root@localhost tom]# pwd
/home/tom
[root@localhost tom]# cd ~
[root@localhost ~]# pwd
/root

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章