LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-26-2013, 07:05 AM   #1
JLndr
Member
 
Registered: Jul 2013
Location: Brunswick, GA
Distribution: Debian 7.1
Posts: 47

Rep: Reputation: 3
Arrow Share Your Top 10 Linux Commands...


Share your top 10 Linux commands. It's easy to do this from the command line. Just copy and paste this code snippet, and then let us know your results!

Code:
history | 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
Here is mine (I was a little shocked):
Code:
john@breezy:~$ history | 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  142  28.4%  sudo
     2  139  27.8%  ls
     3  104  20.8%  clear
     4  30   6%     cd
     5  27   5.4%   htop
     6  18   3.6%   exit
     7  7    1.4%   ftp
     8  4    0.8%   hostname
     9  4    0.8%   git
    10  3    0.6%   history
Enjoy!

P.S. I found a similar thread like this from a long time ago, but it was a little different. (http://www.linuxquestions.org/questi...mmands-180329/)
 
Old 07-26-2013, 12:19 PM   #2
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 3,128

Rep: Reputation: 793Reputation: 793Reputation: 793Reputation: 793Reputation: 793Reputation: 793Reputation: 793
I get
Code:
1	110  16.0116%   ls
     2	88   12.8093%   cd
     3	85   12.3726%   man
     4	67   9.75255%   rpm
     5	45   6.55022%   md5sum
     6	37   5.38574%   wget
     7	21   3.05677%   openssl
     8	21   3.05677%   gnome-terminal
     9	20   2.91121%   cat
    10	17   2.47453%   su
In other words, I generally use the terminal in user mode only to check the distros I've downloaded for testing. I was a bit puzzled by gnome-terminal and su, then I realised it's recording when I press Super-r and it generates
Code:
gnome-terminal -e "su -"
Now the root terminal is a different business
Code:
 1	161  30.9615%   cp
     2	55   10.5769%   yum
     3	55   10.5769%   nano
     4	52   10%        setenforce
     5	47   9.03846%   ls
     6	29   5.57692%   gedit
     7	25   4.80769%   rm
     8	18   3.46154%   nautilus
     9	16   3.07692%   man
    10	10   1.92308%   cd
 
Old 07-26-2013, 12:56 PM   #3
nonamedotc
Member
 
Registered: Mar 2011
Posts: 343

Rep: Reputation: Disabled
Interesting! Here is mine.

Code:
$ history | awk '{CMD[$4]++;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	279  27.9%  ls
     2	228  22.8%  cd
     3	58   5.8%   exit
     4	40   4%     rm
     5	31   3.1%   su
     6	25   2.5%   scp
     7	25   2.5%   mv
     8	24   2.4%   ffmpeg
     9	16   1.6%   man
    10	14   1.4%   yum
As for my root terminal,

Code:
# history | awk '{CMD[$4]++;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	258  25.8%  yum
     2	161  16.1%  cd
     3	155  15.5%  ls
     4	83   8.3%   exit
     5	36   3.6%   vim
     6	28   2.8%   systemctl
     7	27   2.7%   rm
     8	21   2.1%   yum-config-manager
     9	16   1.6%   cryptsetup
    10	15   1.5%   lsblk
 
Old 07-26-2013, 01:22 PM   #4
suicidaleggroll
Senior Member
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 3,006

Rep: Reputation: 1051Reputation: 1051Reputation: 1051Reputation: 1051Reputation: 1051Reputation: 1051Reputation: 1051Reputation: 1051
Code:
     1	261  26.1%  cd
     2	253  25.3%  ls
     3	88   8.8%   vi
     4	75   7.5%   idl
     5	41   4.1%   cvs
     6	30   3%     gv
     7	18   1.8%   du
     8	18   1.8%   cat
     9	17   1.7%   rm
    10	17   1.7%   lrt
Looks about right
 
Old 07-26-2013, 01:27 PM   #5
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,274
Blog Entries: 1

Rep: Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056
Interesting!

My dev box:

Code:
     1  268  26.8%  cd
     2  158  15.8%  svn
     3  155  15.5%  ls
     4  57   5.7%   ip
     5  54   5.4%   rsync
     6  29   2.9%   vim
     7  27   2.7%   tcpdump
     8  23   2.3%   route
     9  21   2.1%   mysql
    10  18   1.8%   perf
 
Old 07-26-2013, 01:38 PM   #6
DarkShadow
LQ Newbie
 
Registered: Jul 2013
Posts: 18

Rep: Reputation: 0
As a regular user
Code:
     1  143  30.4904%   cd
     2  59   12.58%     mplayer
     3  51   10.8742%   ffmpeg
     4  17   3.62473%   su
     5  16   3.41151%   ls
     6  11   2.34542%   axel
     7  10   2.1322%    rm
     8  9    1.91898%   xwininfo
     9  8    1.70576%   md5sum
    10  8    1.70576%   cat
As root
Code:
     1  12  26.087%   vi
     2  6   13.0435%  exit
     3  6   13.0435%  cd
     4  3   6.52174%  echo
     5  3   6.52174%  atq
     6  2   4.34783%  gpasswd
     7  2   4.34783%  atrm
     8  2   4.34783%  at
     9  1   2.17391%  svn
    10  1   2.17391%  shutdown

Last edited by DarkShadow; 07-26-2013 at 01:40 PM.
 
Old 07-26-2013, 04:01 PM   #7
Habitual
Senior Member
 
Registered: Jan 2011
Distribution: Undecided
Posts: 3,479
Blog Entries: 6

Rep: Reputation: Disabled
Code:
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'
in .bashrc for bash history completion.

Indispensable for sysadmins.
 
Old 07-26-2013, 07:28 PM   #8
frankbell
Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Mageia, Mint
Posts: 7,932

Rep: Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495Reputation: 1495
As user, I get

Code:
     1	191  38.2%  ping  <----My ISP had some problems last week.
     2	97   19.4%  ls
     3	36   7.2%   cd
     4	21   4.2%   rm
     5	18   3.6%   for
     6	17   3.4%   conky
     7	15   3%     traceroute
     8	14   2.8%   exit
     9	11   2.2%   cat
    10	9    1.8%   par2repair
As root, I get

Code:
 1	79  15.8%  ls
     2	56  11.2%  exit
     3	46  9.2%   sh
     4	45  9%     cd
     5	19  3.8%   reboot   <---I usually reboot from the terminal
     6	16  3.2%   ps
     7	12  2.4%   ping
     8	12  2.4%   cat
     9	12  2.4%   avgctl
    10	11  2.2%   pkgtool
H/T to DarkShadow for suggesting checking both.
 
Old 07-26-2013, 08:54 PM   #9
fogpipe
Member
 
Registered: Mar 2011
Distribution: Slackware 64 Current
Posts: 330

Rep: Reputation: 80
Hey interesting thread, seeing what others use.

Heres mine:
Quote:
1 62 12.4% su
2 40 8% more
3 34 6.8% ssh
4 28 5.6% SDLvncviewer
5 27 5.4% vi
6 26 5.2% ls
7 21 4.2% cd
8 17 3.4% locate
9 16 3.2% df
10 14 2.8% nvidia-settings
nvidia-settings is in there because the last few weeks i have been using the vid card to do setiathome work units and im keeping an eye on its temperature.

On another machine that im logged into mostly as root through a terminal:
Quote:
1 71 20.4611% vi
2 35 10.0865% ls
3 29 8.35735% cd
4 21 6.05187% netstat
5 18 5.18732% .
6 13 3.7464% init
7 9 2.59366% more
8 8 2.30548% ps
9 7 2.01729% locate
10 6 1.72911% runlevel

Im suprised that "." made the list.

Last edited by fogpipe; 07-26-2013 at 08:59 PM.
 
Old 07-26-2013, 09:52 PM   #10
Randicus Draco Albus
Senior Member
 
Registered: May 2011
Location: Wallowing in a pit of despair.
Distribution: OpenBSD
Posts: 1,295
Blog Entries: 4

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
Quote:
Originally Posted by JLndr View Post
Here is mine (I was a little shocked):
[code] 1 142 28.4% sudo
I too am shocked. You use Debian, but your most used command is sudo?
 
Old 07-27-2013, 02:58 AM   #11
kooru
Senior Member
 
Registered: Sep 2012
Location: Italy
Distribution: Slackware, NetBSD
Posts: 1,332
Blog Entries: 5

Rep: Reputation: 262Reputation: 262Reputation: 262
Nice thread

Normal user

Code:
     1	125  25%   ls
     2	49   9.8%  rm
     3	49   9.8%  dig
     4	40   8%    ftp
     5	37   7.4%  unrar
     6	30   6%    cd
     7	22   4.4%  su
     8	20   4%    ping
     9	18   3.6%  vi
    10	10   2%    man
root

Code:
     1	178  35.6713%   ls
     2	113  22.6453%   cd
     3	54   10.8216%   vi
     4	30   6.01202%   rsync
     5	22   4.40882%   rm
     6	11   2.20441%   exit
     7	8    1.60321%   ping
     8	8    1.60321%   iptables
     9	7    1.40281%   mount
    10	5    1.002%     umount
 
Old 07-28-2013, 11:45 AM   #12
dereism
LQ Newbie
 
Registered: Feb 2013
Location: Tideland
Distribution: Fedora
Posts: 19

Rep: Reputation: Disabled
What a nifty idea for a thread. I found it interesting to look over my own usage as well as others'.

$:
Code:
 
     1	71  20.0565%   cd
     2	29  8.19209%   ls
     3	28  7.9096%    su
     4	22  6.21469%   wmctrl
     5	21  5.9322%    ffmpeg
     6	19  5.36723%   python3
     7	17  4.80226%   sh
     8	15  4.23729%   xdotool
     9	14  3.9548%    wget
    10	9   2.54237%   mkdir
#:
Code:
     1	201  23.3721%   yum
     2	187  21.7442%   cd
     3	77   8.95349%   ls
     4	41   4.76744%   systemctl
     5	35   4.06977%   umask
     6	31   3.60465%   scribes
     7	26   3.02326%   reboot
     8	26   3.02326%   make
     9	17   1.97674%   rm
    10	14   1.62791%   hg
 
Old 07-28-2013, 12:29 PM   #13
Z038
Member
 
Registered: Jan 2006
Distribution: Slackware
Posts: 804

Rep: Reputation: 157Reputation: 157
$:

Code:
     1  102  20.4%  ls
     2  74   14.8%  cd
     3  52   10.4%  nano
     4  23   4.6%   man
     5  23   4.6%   cat
     6  21   4.2%   exit
     7  19   3.8%   rm
     8  14   2.8%   mv
     9  12   2.4%   less
    10  9    1.8%   su
#:

Code:
     1  112  22.4%  ls
     2  78   15.6%  cat
     3  60   12%    cd
     4  30   6%     echo
     5  27   5.4%   man
     6  24   4.8%   less
     7  20   4%     mail
     8  13   2.6%   dig
     9  9    1.8%   chmod
    10  7    1.4%   which

I have export HISTTIMEFORMAT="%y/%m/%d %T " set in my regular user .bashrc, so I had to change the awk command from CMD($2) to CMD($4).

Last edited by Z038; 07-28-2013 at 12:31 PM.
 
Old 07-28-2013, 12:45 PM   #14
kedarp
Member
 
Registered: Jul 2012
Location: Pune, India
Distribution: Mageia 4
Posts: 182

Rep: Reputation: 22
Here are mine.
Code:
1  110  13.269%    ping
2  69   8.32328%   clear
3  66   7.9614%    cd
4  62   7.47889%   su
5  49   5.91074%   ls
6  42   5.06634%   service
7  40   4.82509%   mysql
8  37   4.46321%   man
9  36   4.34258%   dstat
10  17   2.05066%   reboot
 
1 members found this post helpful.
Old 07-28-2013, 06:33 PM   #15
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 304

Rep: Reputation: 41
Quote:
1 156 15.6% ls
2 136 13.6% ssh
3 66 6.6% catmes ----> sudo cat /var/log/messages
4 63 6.3% sudo
5 57 5.7% catyum ----> sudo cat /var/log/yum.log
6 52 5.2% xferpi ----> copy file to pi
7 52 5.2% rmtor ----> remove torrent file
8 47 4.7% ll
9 40 4% cat
10 34 3.4% mv
I use a few aliases
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
linux performance tuning commands, uptime,top,mpstat,iostat,vmstat ,free,ping,Dstat T anish2good Linux - Newbie 2 07-16-2013 02:00 PM
LXer: Learning Linux Commands: top LXer Syndicated Linux News 0 01-13-2012 05:00 AM
LXer: Top 5 most useful commands or tools for Linux administrators LXer Syndicated Linux News 0 04-06-2010 11:20 AM
What do you think are the top ten UNIX/LINUX commands marigb Linux - Newbie 24 05-17-2004 02:17 AM
poll: What do you think are Unix/Linux top ten most used commands marigb Linux - Newbie 0 05-11-2004 11:23 AM


All times are GMT -5. The time now is 11:43 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration