LoginSignup
2
1

More than 5 years have passed since last update.

historyコマンドとコマンド再実行のメモ

Last updated at Posted at 2014-06-17

history

history コマンドでコマンドの実行履歴を表示する。

$ history
  101  bundle exec rake db:migrate
  102  git branch master
  103  pwd
  104  bundle install
  105  bundle exec rake db:migrate
  106  bundle exec rails s
  107  mysql.server stop
  108  mysql.server start
  109  bundle exec rails s
  110  mysql.server stop

指定の履歴番号を実行する

例えば履歴番号 101bundle exec rake db:migrate を実行したい場合は下記の通り。

$ !101
2
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
2
1