LoginSignup
4
4

More than 5 years have passed since last update.

らくらくディレクトリ移動

Last updated at Posted at 2013-11-13

開発中に前開いていたディレクトリに戻ったり, 毎回指定したディレクトリ名をうつのがめんどくさいので, 調べてみた.

直前に開いていたディレクトリに移動する

$ cd  - 

特定のディレクトリ間を移動する

popd, pushdコマンドを利用する.

$ pwd
/
# ルートにいたとして...

$ pushd /hoge
$ pwd
/hoge
# pushdで /hoge に移動.

$ dirs
/hoge /
# /hogeが登録されている

$ popd
$ pwd
/
# 戻ってきた!!!

Windowsのコマンドプロンプトでも利用できるらしい.

参考

4
4
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
4
4