LoginSignup
0
0

More than 1 year has passed since last update.

UNIXで1つ前のディレクトリに戻る方法

Posted at

1つ前のディレクトリーに戻る方法

$ cd -

cdコマンドについて

cdコマンドは、カレントディレクトリを移動するコマンドです。
Change Directoryの頭文字が由来と思われます。

その他の使い方

echo "tempdirディレクトリに移動"
cd tempdir

echo "tempdir/tempdirAディレクトリに移動"
cd tempdir/tempdirA

echo "1つ上のディレクトリに移動"
cd ..

echo "ホームディレクトリに移動"
cd "${HOME}"

echo "1つ前のディレクトリに移動"
$ cd -

終わりに

はじめまして、先物パンダと申します。
初めての投稿となります。
間違ってる部分があったらコメントで教えてください。

参考

Ten ESSENTIAL UNIX Commands

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0