Frequent commands
To get the 10 commands I used most often on linux, I typed in some ruby.
Anyway here's the result
#!/usr/bin/env ruby
f = File.open('#{ENV["HOME"]}/.bash_history')
counts = {}
counts.default = 0
f.each { |line|
command = line.split[0]
counts[command] += 1
}
((counts.sort_by {|x, y| -y} ).first 10).each {|x, y| puts "#{x}: #{y}"}
This last line is how I tend to end a program if I'm not using it again. I keep adding code to one line 'till it doesn't fit in my screen anymore.
Anyway here's the result
- ls: 79, the main use is file browsing on the command line. Often when I am downloading a file and want to see if it's ready yet, I type ls a lot of time I could use the command watch ls more often.
- emacs: 34, that's a text editor ;)
- less: 32, less is actually quite useful for different files. It can be used for directories, pdf's, binaries, etc...
- make: 28, that's for building things
- grep: 24, usualy with -R
- su: 22, should use sudo more often.
- ./configure: 19, this is what you type before make.
- equery: 18, that's part of the portage system on gentoo
- cd: 17, it's good to change things.
- autoreconf: 15, this is for developing with autoconf
0 Comments:
Post a Comment
<< Home