4
6

linux でよく打つコマンドを知りたい時

Last updated at Posted at 2024-07-30

コマンド - bash

history | awk '{$1=""; print substr($0,2)}' | sort | uniq -c | sort -rn | head -n 10

alias したい物あったけどなんだっけ、という時に使う

解説 - 表示結果

左の数字は打ち込んだ回数。右は打ち込んだコマンド

  74 git st
  56 dku
  40 git df
  28 docker attach myapp
  27 git add .
  26 git push origin HEAD
  16 dkd
  13 git co develop
  11 login_myapp

最後の head -n 10 を取れば全コマンドが見られる

history | awk '{$1=""; print substr($0,2)}' | sort | uniq -c | sort -rn
  74 git st
  56 dku
  40 git df
  28 docker attach myapp
  27 git add .
  26 git push origin HEAD
  16 dkd
  13 git co develop
  11 login_myapp
   7 git co .
   7 cd workspace/myapp
   6 ls
   6 git pull
   5 git log
   5 docker exec -it mydb /bin/bash
4
6
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
6