LoginSignup
0
1

More than 5 years have passed since last update.

linuxコマンド実行の小技

Last updated at Posted at 2016-07-31
  1. 直前に実行したコマンドを再現

    $ !!
    
  2. 以前のコマンドを実行

    $ history
    $ !n(nは番号)
    
  3. 前のコマンドの引数を利用

    $ vim ~/.bash_profile
    $ source !$
    

    !^が最初の引数、!$で最後、!:nでn番目、!*ですべての引数を表す。

参考

bash/zshのコマンドライン履歴機能。直前のコマンド、直前の引数

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