Announcement

Collapse
No announcement yet.

My top ten most used shell commands...

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    My top ten most used shell commands...

    I got curious after reading an article about it and entered on a Konsole this command:
    jerry@sonyvgnfw140e:~$ history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head
    108 bzr
    95 sudo
    65 locate
    59 man
    46 vdir
    40 exit
    36 cd
    23 cat
    22 gpg
    17 lshal
    jerry@sonyvgnfw140e:~$
    What's yours?
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    #2
    Re: My top ten most used shell commands...

    Either your CLI command is faulty, or I don't have something you have. When I run your command (copied and pasted) in a console, I get:
    paul@mybrainonlinux:~$ history | awk '{a[$2]++}END{for(i in a){print a " " i}}' | sort -rn | head
    awk: (FILENAME=- FNR=158) fatal: attempt to use array `a' in a scalar context
    paul@mybrainonlinux:~$
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: My top ten most used shell commands...

      lol

      You've been "forumed"

      Notice how the text changes from regular to italics at an odd spot

      Well, put [ i ] (spaces added for obvious reason 8) ) in the suspect location and the command works.

      Not: history | awk '{a[$2]++}END{for(i in a){print a " " i}}' | sort -rn | head

      but: history | awk '{a[$2]++}END{for(i in a){print a [ i ]" " i}}' | sort -rn | head -> spaces added again

      lol...


      Here's mine:

      stuart@office:~$ history | awk '{a[$2]++}END{for(i in a){print a [ i ]" " i}}' | sort -rn | head
      310 sudo
      282 ls
      177 cat
      99 ll
      97 locate
      87 cd
      38 free
      27 mount
      27 la
      22 top
      stuart@office:~$

      Clearly, I use the CLI more than GG plus my alias file is being put to good use!

      Please Read Me

      Comment


        #4
        Re: My top ten most used shell commands...

        Originally posted by oshunluvr
        lol

        You've been "forumed"

        Notice how the text changes from regular to italics at an odd spot


        Okay, using your command, copied and pasted, I now get:
        paul@mybrainonlinux:~$ history | awk '{a[$2]++}END{for(i in a){print a [ i ]" " i}}' | sort -rn | head
        23 exit
        22 dir
        12 cd
        9 clear
        7 ls
        6 sudo
        6 show
        6 nano
        6 cat
        5 simI
        paul@mybrainonlinux:~$
        show and simI are aliases in my .bash_aliases file. And, I use the console a fair amount too.
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Re: My top ten most used shell commands...

          bruce@Toshiba-Laptop:~$ history | awk '{a[$2]++}END{for(i in a){print a [ i ]" " i}}' | sort -rn | head
          170 sudo
          24 kdesudo
          15 cd
          13 cmake
          9 sh
          8 convert.sh
          7 kfmclient
          7 glxinfo
          7 ffmpeg
          5 nvidia-settings
          bruce@Toshiba-Laptop:~$
          Using Linux since 1999<br />Current system openSUSE 11.3 <br />Toshiba A505-S6035<br />Intel core i7, Nvidia 300m GT<br />4 gigs of DDR3, SATA 500 gig 7200 rpm hard drive

          Comment


            #6
            Re: My top ten most used shell commands...

            wizard@wizard-desktop:~$ history | awk '{a[$2]++}END{for(i in a){print a [ i ]" " i}}' | sort -rn | head
            234 sudo
            53 cd
            33 man
            30 sh
            18 ls
            16 mencoder
            11 ssh
            9 magicrescue
            8 ping
            8 mount
            wizard@wizard-desktop:~$
            we see things not as they are, but as we are.
            -- anais nin

            Comment


              #7
              Re: My top ten most used shell commands...

              Here's my list.

              286 sudo
              36 man
              31 gksu
              18 cd
              10 sensors
              8 ls
              6 service
              6 cat
              5 lspci
              4 wget

              Comment


                #8
                Re: My top ten most used shell commands...

                Do I need to be embarrassed if "sensors-detect" showed up in my list?

                Comment


                  #9
                  Re: My top ten most used shell commands...

                  No. I am having problems getting my sensors detected. I've run sensors-detect weekly to check. My sensors work fine in Fedora 13. They don't work in Lucid. But that's a different thread.

                  Comment


                    #10
                    Re: My top ten most used shell commands...

                    Code:
                    257 echo
                    234 exit
                    47 free
                    10 apt-get
                    3 kdesudo
                    3 dir
                    2 rm
                    2 killall
                    2 kate
                    2 history
                    And maybe mount even if it isn't there.
                    Multibooting: Kubuntu Noble 24.04
                    Before: Jammy 22.04, Focal 20.04, Precise 12.04 Xenial 16.04 and Bionic 18.04
                    Win XP, 7 & 10 sadly
                    Using Linux since June, 2008

                    Comment


                      #11
                      Re: My top ten most used shell commands...

                      dibl@lucid:~$ history | awk '{a[$2]++}END{for(i in a){print a [ i ]" " i}}' | sort -rn | head
                      310 sudo
                      87 exit
                      21 ls
                      19 cd
                      13 glxgears
                      7 uname
                      4 uptime
                      4 glxinfo
                      4 apt-get
                      3 lsmod

                      Comment


                        #12
                        Re: My top ten most used shell commands...

                        glxgears and glxinfo? Did you have any problems with your graphics card?
                        Multibooting: Kubuntu Noble 24.04
                        Before: Jammy 22.04, Focal 20.04, Precise 12.04 Xenial 16.04 and Bionic 18.04
                        Win XP, 7 & 10 sadly
                        Using Linux since June, 2008

                        Comment


                          #13
                          Re: My top ten most used shell commands...

                          Originally posted by oshunluvr
                          .....
                          Clearly, I use the CLI more than GG plus my alias file is being put to good use!
                          True!

                          And I don't use cmake, like Bruce does. I use QtCreator but you'll notice how often I use the version control system, bzr (baazar) to version changes in software I'm supporting.
                          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                          – John F. Kennedy, February 26, 1962.

                          Comment


                            #14
                            Re: My top ten most used shell commands...

                            On MacOS X

                            Code:
                            192 javac
                            117 appletviewer
                            55 cd
                            17 sed
                            13 ssh
                            12 bzfs
                            7 locate
                            6 make
                            5 telnet
                            5 smultron
                            EDIT: Am I a thread killer?
                            Registered Linux User 545823

                            Comment


                              #15
                              Re: My top ten most used shell commands...

                              Originally posted by kjjjjshab
                              Do I need to be embarrassed if "sensors-detect" showed up in my list?

                              Don't look now - your sensors are showing!

                              Sorry for the delay in my quip - out of town...

                              Please Read Me

                              Comment

                              Working...
                              X