リナックス コマンド cd ディレクトリ移動
【cd コマンド 構文 】
cd [dir]
説明
現在のディレクトリを変更します。
指定したディレクトリに移動する。
[dir]は
相対パス,絶対パスの
どちらでも指定できます。
また,ディレクトリの表記方法として
以下のような記号を使える。
directoryに何も指定しないとホーム・ディレクトリに移動する。
★PR VAIO type N ホワイト
【ディレクトリの表記方法】
cd /
ルート・ディレクトリ へ移動
cd .
現在のディレクトリ へ移動
cd ..
親ディレクトリへ移動
cd ~/
ホーム・ディレクトリへ移動
★PR USB接続でノートPCでもマルチディスプレイ
【cdコマンド 使用例 】
[root@localhost /]# pwd
/
[root@localhost /]# cd bin
[root@localhost bin]# pwd
/bin
[root@localhost bin]# cd ~
[root@localhost ~]# pwd
/root
★PR 大容量 8000mAh(3.7V) バッテリー
ノートPCからケータイまで幅広く対応
【参考】
cd [-L|-P] [dir]
Change the current directory to dir. The variable HOME is the
default dir. The variable CDPATH defines the search path for the
directory containing dir. Alternative directory names in CDPATH
are separated by a colon (:). A null directory name in CDPATH is
the same as the current directory, i.e., ''.''. If dir begins with
a slash (/), then CDPATH is not used.
The -P option says to use the
physical directory structure instead of following symbolic links
(see also the -P option to the set builtin command);
the -L option
forces symbolic links to be followed. An argument of - is equiva-
lent to $OLDPWD. If a non-empty directory name from CDPATH is
used, or if - is the first argument, and the directory change is
successful, the absolute pathname of the new working directory is
written to the standard output. The return value is true if the
directory was successfully changed; false otherwise.
サーバ運用(ランキング)
【cd コマンド 構文 】
cd [dir]
説明
現在のディレクトリを変更します。
指定したディレクトリに移動する。
[dir]は
相対パス,絶対パスの
どちらでも指定できます。
また,ディレクトリの表記方法として
以下のような記号を使える。
directoryに何も指定しないとホーム・ディレクトリに移動する。
★PR VAIO type N ホワイト
【ディレクトリの表記方法】
cd /
ルート・ディレクトリ へ移動
cd .
現在のディレクトリ へ移動
cd ..
親ディレクトリへ移動
cd ~/
ホーム・ディレクトリへ移動
★PR USB接続でノートPCでもマルチディスプレイ
【cdコマンド 使用例 】
[root@localhost /]# pwd
/
[root@localhost /]# cd bin
[root@localhost bin]# pwd
/bin
[root@localhost bin]# cd ~
[root@localhost ~]# pwd
/root
★PR 大容量 8000mAh(3.7V) バッテリー
ノートPCからケータイまで幅広く対応
【参考】
cd [-L|-P] [dir]
Change the current directory to dir. The variable HOME is the
default dir. The variable CDPATH defines the search path for the
directory containing dir. Alternative directory names in CDPATH
are separated by a colon (:). A null directory name in CDPATH is
the same as the current directory, i.e., ''.''. If dir begins with
a slash (/), then CDPATH is not used.
The -P option says to use the
physical directory structure instead of following symbolic links
(see also the -P option to the set builtin command);
the -L option
forces symbolic links to be followed. An argument of - is equiva-
lent to $OLDPWD. If a non-empty directory name from CDPATH is
used, or if - is the first argument, and the directory change is
successful, the absolute pathname of the new working directory is
written to the standard output. The return value is true if the
directory was successfully changed; false otherwise.
サーバ運用(ランキング)
サーバ構築(ランキング)を見る。