cdコマンド
スポンサードリンク
【説明】
cdコマンドは現在のディレクトリから他のディレクトリに移動するときに使用します。
【構文】
cd [ ディレクトリ名 ]
例 絶対パス指定し、ディレクトリ移動。testユーザのホームディレクトリへ移動します。
[root@localhost ~]# pwd
/root
[root@localhost test]#
[root@localhost ~]# cd /home/test
[root@localhost test]#
[root@localhost test]# pwd
/home/test
|
→pwdコマンドの詳細を見る
例 相対パス指定し、ディレクトリ移動。カレントディレクトリから1階層上へ移動し、testディレクトへ移動します。
[root@localhost test1]# pwd
/home/test1
[root@localhost test]#
[root@localhost test1]# cd ../test
[root@localhost test]#
[root@localhost test]# pwd
/home/test |
|
|