What are your top ten command lines?
Adrian Mejia

Adrian Mejia @amejiarosario

About: First do it, then make it better.

Location:
Boston, MA
Joined:
Aug 27, 2018

What are your top ten command lines?

Publish Date: Jun 20 '19
50 35

Run the following command list to find out!

history | cut -c8- | sort | uniq -c | sort -rn | head -n 10
Enter fullscreen mode Exit fullscreen mode

Mine is the following:

image

Since I used a lot of aliases, here is the expanded version:

  1. git status (alias gst)
  2. git push (alias ggpush='git push origin "$(git_current_branch)"')
  3. git commit (alias gca='git commit -v -a')
  4. ls (list files current directory)
  5. code . (opening visual studio in the current folder)
  6. git pull (alias ggpull='git pull origin "$(git_current_branch)"')
  7. .. (go back previous directoy)
  8. grunt serve (alias eos='cd "$LOCKHART"/eos && git pull origin "$(git_current_branch)"; grunt serve')
  9. git checkout master (alias gco='git checkout')
  10. grunt karma:... (run unit tests)

Comments 35 total

  • Oscar Bastardo
    Oscar BastardoJun 20, 2019


    312 git status
    148 ls
    112 git log
    90 docker-compose up
    79 docker ps
    72 yarn test
    67 yarn start
    58 git diff
    54 cd ..
    43 yarn dev

    I just came to realise I'm a JS developer :')

  • Leighton Darkins
    Leighton DarkinsJun 20, 2019
    1. git status
    2. clear - I love me an empty terminal window
    3. ls
    4. git add .
    5. git push
    6. git pull
    7. git checkout .
    8. project - alias to get me straight into my project directory
    9. git commit --amend --no-edit - I hate doing this (special thanks to the client that demands all changes exist in a single commit on a branch
    10. ../
    • Adrian Mejia
      Adrian MejiaJun 20, 2019

      I use git commit --amend --no-edit too. Mostly for small changes (e.g., missed semicolon) that worth a commit.

      • Ifenna
        IfennaJun 21, 2019

        I honestly didn't know about --no-edit until now. Thanks for saving me the keystrokes 😂.

        • Adrian Mejia
          Adrian MejiaJun 21, 2019

          There's another one I used when for whatever reason I need to retrigger CI/jenkins without making any change

          git commit --allow-empty -m 'trigger'
          
    • Lee Jarvis
      Lee JarvisJun 20, 2019

      Mine are all very similar to this! Although I don't use clear -- CMD/CTRL+L does the trick

      • Adam Hammond
        Adam HammondJun 21, 2019

        Oh my god, I never knew the CTRL+L tip, you've LITERALLY changed my life.

  • Brad
    BradJun 20, 2019
    167 git status - spam this one
    58 ls
    53 git add -A
    52 git commit
    50 git branch
    28 clear
    25 git log
    21 npm start
    17 glxgears - sanity checking if gpu acceleration is on, for my chromebook :D
    16 git fetch
    

    I guess I hit a lot of git commands haha!

    • Adrian Mejia
      Adrian MejiaJun 21, 2019

      Interesting, I didn't know about the glxgears

  • Jesse David
    Jesse DavidJun 20, 2019
     423 cd ..
     362 bin/build
     318 npm run start
     225 bin/start
     169 ls
     164 yarn install
     159 bin/test
      99 npm install
      87 yarn run gulp
      87 git push heroku master
    

    I'm a js developer that traverses his file structure often.

  • Lee Jarvis
    Lee JarvisJun 20, 2019

    I'm using zsh and this command didn't work well. I found this post which includes something nice! Here's mine:

    ~% history 1 | cat | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a; }' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10
         1  300  25.5537%    ag
         2  95   8.09199%    g
         3  61   5.19591%    gl
         4  49   4.17376%    gb
         5  45   3.83305%    ls
         6  43   3.66269%    cm
         7  42   3.57751%    cd
         8  39   3.32198%    cat
         9  28   2.38501%    brew
        10  26   2.21465%    rm
    

    ag is the command for the_silver_searcher -- I guess I search a lot!

    • jappe999
      jappe999Jun 20, 2019

      If you use zsh you can use the command zsh_stats.

      • Adrian Mejia
        Adrian MejiaJun 21, 2019

        Nice! I didn't know about zsh_stats. It would have saved me some time tinkering with cut and uniq :P

        $ zsh_stats                                                                      
             1  828  7.84165%     git
             2  691  6.54418%     gst
             3  533  5.04783%     gco
             4  469  4.44171%     cd
             5  439  4.15759%     ggpush
             6  367  3.47571%     gca
             7  363  3.43783%     grunt
             8  357  3.381%       ls
             9  299  2.83171%     npm
            10  291  2.75594%     make
            11  288  2.72753%     code
            12  248  2.34871%     open
            13  188  1.78047%     node
            14  188  1.78047%     hexo
            15  171  1.61947%     z
            16  156  1.47741%     brew
            17  145  1.37324%     ggpull
            18  141  1.33535%     ..
            19  138  1.30694%     cat
            20  136  1.288%       eos
        
    • Adrian Mejia
      Adrian MejiaJun 21, 2019

      Oh, that's weird it didn't work for you. I'm also using zsh. I'm just curious, what was not working with the original command?

      • Lee Jarvis
        Lee JarvisJun 22, 2019

        It just shows a bunch of commands with a count of 1 :-) The zsh_stats thing is very cool!

  • Blue7wings
    Blue7wingsJun 21, 2019

    never use command in windows 🤣

  • Max Ong Zong Bao
    Max Ong Zong BaoJun 21, 2019
    • git status
    • git commit -a
    • git push
    • git add .
    • git branch
    • git pull
    • ls
    • mv
    • cd
    • pwd
  • Rizwan
    RizwanJun 21, 2019

    Its clear that I'm slowly turning into JS developer from iOS developer

     714 l
     382 pod install
     331 clear
     328 cd ..
     319 ls
     273 yarn start
     198 bundle exec pod install
     157 code .
     143 yarn test
     107 yarn run jest -u
    
  • Vitor Bari Buccianti
    Vitor Bari BucciantiJun 21, 2019
    1. gst
    2. gapa
    3. ggpush
    4. ls
    5. exit
    6. git diff
    7. kubectl get pods
    8. clear
    9. ggpull
    10. ktx
    
  • Adam Hammond
    Adam HammondJun 21, 2019
      49 ls
      39 terraform apply
      24 docker logs test-container
      22 terraform plan
      20 git status
      16 git push
      12 ./index.sh 
       9 aws-creds status
       8 aws-creds login
       7 cd ..
    
    • Adrian Mejia
      Adrian MejiaJun 21, 2019

      I guess you are in devOps, or at least that's what your commands looks like

  • Ifenna
    IfennaJun 21, 2019
    zsh_stats
         1  564  27.6878%    git
         2  178  8.73834%    cd
         3  145  7.11831%    vim
         4  106  5.20373%    sudo
         5  71   3.48552%    ls
         6  68   3.33824%    yay
         7  60   2.94551%    go
         8  56   2.74914%    exit
         9  39   1.91458%    ftm
        10  38   1.86549%    l
    
    

    yay is my package manager, l is an alias for ls -al and I seem to use vim a lot.

  • David Ojeda
    David OjedaJun 21, 2019

    I don't use aliases :P

    Commands

    • David Ojeda
      David OjedaJun 21, 2019

      IDE takes care of commands for running/testing app and stuff

      • Adrian Mejia
        Adrian MejiaJun 21, 2019

        nice, what IDE are you using that runs git commands for you?

  • Jyotishman Saikia
    Jyotishman SaikiaJun 21, 2019

    72 gs
    50 clear
    34 git add .
    22 git push origin develop
    20 cd
    18 cordova run android
    14 git pull origin develop
    13 code .
    11 git push origin master
    8 npm start

  • Mohammad Fazel
    Mohammad FazelJun 21, 2019

    Ls
    ..
    Code .
    Cd d:\
    Npm version "1.0.0"
    Git status
    Git commit --amend --no-edit
    Git push
    Git pull
    Touch index.php

  • Jonathan Kuhl
    Jonathan KuhlJun 21, 2019

    Huh

     165 node challenge.js
      16 cargo run
      13 python3 quadratic2.py
      12 make linkedlist
      11 ls
      11 ./linkedlist
       9 rustc hello.rs
       9 python3 multiply.py
       8 python3 multiply.py 4 -3
       6 python3 numberofcalls.py rumford augusta
    

    Not typical at all. The first one is a set of 50 javascript challenges, so that makes sense.

    The second, I was learning Rust for a bit.

    The linkedlist was me trying to implement a Linked List in C++, and realizing I don't know C++ well enough to do so.

    Last week or so I was playng with Rust and a bit of Python, while working through a JavaScript challenge, so I guess it makes sense, but it's not typical.

    It should be the five basic git commands (init, status, add, commit, push), shortcuts I've aliased for my most used directories and clear

  • Matt Curcio
    Matt CurcioJun 22, 2019

    The only that stand out from list are htop and R. haha

    gits - git status
    htop - see ditty below

    Oh lord won't you buy me 32 gigs of ram,
    My friends all have 16 I must make amends,
    Worked hard all my life time, no help from my friends...
    Sung to the tune of Janis Joplin's - Mercedes Benz

    cd
    ls
    gitp - git pull
    gita - git add all
    xed
    git remote
    git push
    R - Can you tell I do Stats alot?? ;))

  • Boots
    BootsJul 3, 2019

    This is fun!

    Also lol they're all git and yarn for me:

     168 gits
      38 yarn dev
      31 yarn
      19 gita
      18 yarn repl
      17 git diff
      12 git pull
      11 git log
      10 gpo
      10 git checkout devel
    
    • gits is my alias for git status
    • gita is my alias for git add all
    • gpo is my alias for pushing to origin
Add comment