Please note that LinuxExchange will be shutting down on December 31st, 2016. Visit this thread for additional information and to provide feedback.

9
7

We all use the shell on a daily basis and know, what advantages it has.

I'd like you to post the most used commands you fired up in your shell.

If you use Bash, use this code:

cut -d\   -f 1 ~/.bash_history | sort | uniq -c | sort -rn | head -n 10 | sed 's/.*/    &/g'

If you use ZSH, use this code:

history 1| awk '{print $2}' | sort | uniq -c | sort -rn | head -n10

My Top 10 on a Subversion server is the following:

    135 cd
    113 ll
     73 vim
     59 less
     56 ls
     50 ps
     47 svnadmin
     47 df
     36 rm
     33 top

Now post your own!
Note: Please put 4 spaces in front of every row or click on the "Code" button (labeled with 101010). This makes your listing more readable.

Inspired by reddit.com. This question is marked as community wiki, so I'm not a reputation whore.

I learned you can close a shell without typing exit. Just press Ctrl+D!

This question is marked "community wiki".

asked 02 Jun '10, 13:45

guerda's gravatar image

guerda
5533515
accept rate: 38%

edited 01 Mar '13, 11:03

jeremy's gravatar image

jeremy ♦♦
1.0k1516

I have ls as most used :) I had no doubt.

(02 Jun '10, 14:39) Web31337

May be, but sometimes, there are gems in the top ten. sth. like an alias "gimme" for "sudo apt-get install" .)

(02 Jun '10, 15:28) guerda

If you want to give your fingers some rest with typing cd all the time you can use shopt -s autocd.

(02 Jun '10, 17:44) maszynista

172 yaourt, 160 sudo, 114 ls, 61 cd, 50 find, 37 rdup, 31 wine, 31 rdup-simple, 26 killall :) I didn't realise, I installed (and killed) so many programs lately...

(02 Jun '10, 21:12) martvefun

like the others I would have expected a few more 'sudo' in your list... also, I guess that 'tee' and other piped commands like 'more' or 'less' will be greatly under-represented when using $2 only

(03 Jun '10, 14:51) pmarini

pmari: I don't have sudo rights on this server :)

(03 Jun '10, 15:54) guerda

um... gimme? I like that. Alot LOL!

But I had this prof years ago that would basically do the equivalent of the ol' "Sister Teresa whacking you on the back of the hand w/a ruler", if we aliased anything - kinda broke my spirit in that regard, although I will still alias nano to pico.

(03 Jul '10, 02:45) tallship
showing 5 of 7 show 2 more comments



123next »

You can move a lot of the functionality into awk and remove a bunch of pipes via:

awk '{a[$1]++}END{for(x in a)print a[x],x}' ~/.bash_history | sort -rn | head

Anyway, here is my list that spans over a full month

1618 echo
746 man
414 awk
357 vi
341 ps
196 su
159 cat
122 ll
112 wcc
109 grep

I do a lot of bash scripting and compiling.

link

answered 03 Jun '10, 20:43

SiegeX's gravatar image

SiegeX
1213
accept rate: 50%

Interesting point with awk, thanks!

(04 Jun '10, 05:29) guerda

I accepted this question because there's no reason why not.

(15 Jul '10, 13:56) guerda

Here's mine:

223 vi
179 ls
176 cd
55 svn
33 git
32 la
32 cp
27 rsync
23 rm
22 screen

This seems a little telling of only what I have been doing lately. For instance, I just tried to learn about git and so all 33 hits were from one session and very rarely used before. ll and la are aliases for ls. It is interesting as I had expected very different results. I will probably need to increase the size of my history cache and try again later. I look forward to seeing the results.

link

answered 04 Jun '10, 04:57

kainosnous's gravatar image

kainosnous
3243
accept rate: 18%

That looks like a developer @ work :D

(07 Jun '10, 20:36) guerda

My development box:

1668 git
 945 make
 801 E     - script/alias that launch my editor (kwrite)
 740 cd
 551 ls
 466 sudo
 340 cat
 261 ll    - alias ls -lh
 250 K     - script/alias that open a file in my IDE (kate)
 229 rm

Personal laptop (and personal development):

 245 sudo  - admin (that much, I must say that this computer is fairly new, that's perhaps the reason)
 161 cd
  96 ls
  62 E     - script/alias that launch my editor (kwrite)
  61 cat
  54 s     - script that start the command in background and mute its output
  52 ll
  44 git
  41 yum   - install packages on my fedora
  36 ./tbuild  - my personal project of the moment
link

answered 08 Jun '10, 16:14

mildred's gravatar image

mildred
91124
accept rate: 66%

Here is mine:

113 cd
105 ll
60 lf
47 mytar
24 df
19 bzip2
14 rm
14 du
10 find
8 ps

mytar is a script I use daily that takes a directory and tar's into a bz2. :)

link
This answer is marked "community wiki".

answered 09 Jun '10, 19:50

Andy's gravatar image

Andy
2972920
accept rate: 14%

edited 09 Jun '10, 19:53

guerda's gravatar image

guerda
5533515

mytar...

Cheater ;)

(03 Jul '10, 02:40) tallship

18 ls 12 exit 10 sudo 9 cd 3 synclient 3 gnome-shell 3 apropos 2 whereis 2 rm 2 ll

link

answered 03 Jun '10, 04:39

FewClues's gravatar image

FewClues
249129
accept rate: 5%

At home, my Top Ten looks like this:

423 sudo
348 cd
148 l
133 ls
128 ll
116 rm
 99 less
 72 git
 71 exit
 64 vim

Much more sudo as on the subversion server.

link
This answer is marked "community wiki".

answered 03 Jun '10, 15:54

guerda's gravatar image

guerda
5533515
accept rate: 38%

     94 git
     78 make
     46 sudo
     38 ls
     26 ./autogen.sh
     25 ./version_checker
     25 man
     17 rm
     16 gedit
     15 gcc
link

answered 05 Jun '10, 05:31

Joehillen's gravatar image

Joehillen
1462512
accept rate: 40%

If you replace gedit with emacs, you have approximately my most-used list! Go developers! :D

(07 Jun '10, 22:48) Jazz ♦
     95 ssh
     56 cd
     31 su
     30 echo
     29 ll
     27 ls
     25 mplayer
     15 mv
     13 vi
     12 man
link

answered 05 Jun '10, 12:37

Fede's gravatar image

Fede
1
accept rate: 0%

well, I'm a newbie so I

sudo ls

all the time to experiment with software

link

answered 05 Jun '10, 19:16

Ed's gravatar image

Ed
1
accept rate: 0%

1

What are you trying to do with sudo ls?

(07 Jun '10, 20:35) guerda
     135 mc
     56 make
     35 configure
     33 qemu
     19 rmmod
     19 cls
     13 htop
     12 installpkg
     11 upgradepkg
     10 pkgtool
link

answered 06 Jun '10, 04:55

Hendronicus's gravatar image

Hendronicus
112
accept rate: 0%

What's mc? Mic check?

(07 Jun '10, 20:34) guerda

Midnight Commander - Probably the best text mode file manager ever made.

(15 Jun '10, 19:30) Hendronicus
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×4

Asked: 02 Jun '10, 13:45

Seen: 7,192 times

Last updated: 16 Jul '13, 03:23

powered by OSQA