LoginSignup
1
2

More than 3 years have passed since last update.

pushdとpopd

Last updated at Posted at 2019-06-17

最近、知名度が低いpushdとpopd

  • 老兵が当たり前だと思ってたコマンド。
  • 最近はGUIや様々なインタフェースが進歩してコマンドラインだけで作業することが少なくなった。
  • バディ作業しているときに何気に使うと「なにそれ、ちょっとかっこいい」と自惚れられる。

pushdとpopdの機能

ディレクトリ位置をスタックして、任意のタイミングでスタック位置に戻れる機能(たぶん)

pushdとpopdの使い方の例

現在のディレクトリをスタックする
pushd .

作業するためルートディレクトリに移動
cd /

作業を終えて、元のディレクトリに戻りたい
popd

Windows7でもOK

C:\Windows\system32>pushd .

C:\Windows\system32>cd \

C:\>popd

C:\Windows\System32>
  • Windows10も大丈夫なはず(たぶん)

pushdとpopdの用途

  • 手順などで「現在のディレクトリをコピーして保存」などがあればこのコマンドにすると良いです。
1
2
1

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
1
2