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

1170 ssh
525 shmux
299 ls
119 ping
113 nslookup
95 cat
83 vi
82 ps
80 getent
73 cd

link

answered 16 Jul '13, 03:22

slimer's gravatar image

slimer
1
accept rate: 0%

edited 16 Jul '13, 03:23

Here is my list. I use mercurial (hg) repository for my projects.

    261 hg
    215 scbuild
    209 cd
     53 ./ltib
     42 sudo
     42 ls
     27 make
     21 ./generate_image.sh
     17 cp
      8 cat
link

answered 31 May '13, 11:45

suvidh's gravatar image

suvidh
111
accept rate: 0%

        318 sudo
        112 cd
         52 ls
         50 rails
         36 bundle
         31 gem
         29 rvm
         12 nano
link

answered 28 May '13, 00:15

Ahron%20Townsley's gravatar image

Ahron Townsley
112
accept rate: 0%

edited 28 May '13, 00:15

I have to say my most used commands are ls -l, free, df -h and sudo in Ubuntu and su in openSUSE.

link

answered 16 May '13, 15:43

Freshmeadow's gravatar image

Freshmeadow
711
accept rate: 0%

Mine 246 exit 129 ls 84 su 66 nmon* 52 cd 50 ssh 43 du 36 ping 31 crontab 25 tail

link

answered 11 Mar '13, 12:40

wsteward's gravatar image

wsteward
1
accept rate: 0%

1367 mv

1046 l ## an enhanced version of 'ls -l'

616 rm

595 locate

577 mvf ## specific-use wrapper for mv

450 mvie ## ditto

436 f ## the 'file' command

394 grep

369 cd

322 dic ## look up the arguments in several dictionaries

315 t ## 'less'

312 file

264 type

263 echo

235 ln

221 wget

221 man

219 calc ## Floating point calculator using awk

196 sudo

195 find

194 pr1 ## Print arguments, one to a line

178 xv

176 xx.sh ## file containing the latest snippet I'm working on

170 sed

157 xpdf

152 md ## 'mkdir' and optionally cd into the directory

137 urpmi ## function that calls 'sudo urpmi'

134 for

133 time

124 touch

123 r ## enhanced 'ls -lt'

121 lsc ## enhanced 'ls', basis for all other ls uses above

118 shgrep ## search shell scripts for a pattern

106 shcat ## find script and examine it with less

103 printf

103 cpsh ## Copy a script from development to production

In addition, there are app that are always open, and though used constantly, are only called once per session: alpine, emacs, slrn, bash, rxvt, firefox, vlc, gentoo

link
This answer is marked "community wiki".

answered 01 Mar '13, 05:03

cfajohnson's gravatar image

cfajohnson
213
accept rate: 0%

edited 03 Apr '13, 00:24

Can't really say I'm surprised by any of these.

81 man
55 sudo
50 ls
31 cd
17 tmux
17 ./adb
11 nautilus
10 dd
 9 pknfo
 8 apropos

tmux is a screen alternative. adb is an android thing, and pknfo is a bash alias for aptitude show

link
This answer is marked "community wiki".

answered 28 Jul '10, 00:02

Klink-a-dink-dink's gravatar image

Klink-a-dink...
233
accept rate: 0%

These are my stats:

139 su
139 exit
89 ll
65 cd
47 yum
41 espeak
39 cat
34 renrot
31 rpm
16 ping

I see I'm the only one closing my consoles using exit :-)

link
This answer is marked "community wiki".

answered 24 Jul '10, 11:32

Andres's gravatar image

Andres
7615
accept rate: 20%

Here's a fresh box I just set up a few days ago and haven't had the time to really do much with ;)

 30 ls
 26 dig
 21 cd
 20 ssh
 14 pico
 13 whois
 11 man
 10 pine
 10 ./rsync_slackware-current.sh
 9 ping

Just gotta love that second to the last line there LOL!

link
This answer is marked "community wiki".

answered 03 Jul '10, 02:23

tallship's gravatar image

tallship
390111
accept rate: 20%

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