cdコマンド

UNIXサーバ構築 OnTheVMware

unixコマンドについて使用例を用いて解説
HOME > 基本操作コマンド >

cdコマンド

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

スポンサードリンク
 HOME / 免責事項 / サイトマップ /  問い合わせ
Copyright (C) 2008  UNIXサーバ構築 OnTheVMware  All rights reserved





スポンサードリンク