

Ask YC: Recent *nix history.. - PStamatiou

This seems to be a meme going around. run this and paste what you get:<p>history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head<p>It'll be interesting to see what most people spend their time with.<p>this is what I get for my user:<p>83 ssh<p>51 ls<p>44 ec2-describe-instances<p>44 cd<p>40 sudo<p>20 ec2-run-instances<p>17 ec2-terminate-instances<p>15 ping<p>15 ifconfig<p>15 ec2-describe-images
======
jsrn
most people seem to use cd and ls very frequently. Very often they are used
one after another. This reminds me of a trick I heard in a talk by Damian
Conway:

    
    
        alias cdd='cd $l; ls'
    

I can't find the original slides, here is a writeup by cromatic:

[http://www.oreillynet.com/onlamp/blog/2003/07/oscon_2003_day...](http://www.oreillynet.com/onlamp/blog/2003/07/oscon_2003_day_one.html)

~~~
breily
I did that with this:

function z () { if [ $# = 0 ]; then ls -lFGh else cd "$*" && ls -lFGh fi }

That way if you don't specify a directory it just does an ls.

Edit: and apparently it took away my line breaks there, but it still makes
sense.

------
brianr

      195 vi
      193 python
      163 ls
      100 cd
      54 svn
      37 ssh
      36 ps
      29 paster
      29 kill
      24 ./rollprod
    

Not surprised at all to see ls so high... most of the times I type it I'm not
actually looking for its output, I'm just clearing my mind or trying to
remember what I was doing. I think I should alias ls to print out a ToDo list.

~~~
brianr
annnndd...

    
    
      alias ls='cat ~/TODO'
    

Let's see what this does for productivity :)

------
davidw
Heh... these values are heavily influenced by the Android contest:

    
    
        89 svn
        67 ant
        55 ./reload.sh
        53 java
        43 /opt/android-sdk_m5-rc15_linux-x86/tools/adb
        36 ./build.sh
        28 cd
        25 ./script/server
        16 ls
        11 /opt/android-sdk_m5-rc15_linux-x86/tools/emulator

------
gaika
218 ssh

187 git

61 telnet (was troubleshooting random connectivity issues)

57 script/server

45 ls

45 cd (notice the same #'s as ls, should merge it into one command?)

44 firefox (crashes all the time :( )

32 rsync (backup)

23 ./xgospel (the best game ever! :)

23 alsamixer

------
andr
54 cd

40 dir

33 start

29 c:\python\python.exe

21 c:\tools\php\php.exe

...

just kidding

------
rob

        126 ls
        58 fink
        41 cd
        34 sudo
        33 exit;
        30 host
        22 which
        19 curl
        15 ssh
        15 python

------
staunch

        67 screen
        59 ping
        54 perl
        49 vi
        46 host
        44 dmesg
        39 killall
        36 ps
        30 ls
        30 ip

------
pius
88 ss (alias for 'script/server')

81 rake

72 cd

34 git

23 sc (alias for 'script/console')

19 merb

18 sudo

14 ssh

13 nano

13 ls

------
superchink
This is from 1 week of usage on my MacBook Pro:

38 ssh

33 cd

32 ll

21 scp

16 ant

10 ls

7 ping

6 mkdir

5 mv

4 file

------
PStamatiou
and my friend's htpc

117 sudo

85 ls

45 cd

38 exit

21 yes

19 vlc

17 screen

11 ssh

10 dmesg

8 mplayer

------
bazookaaa
109 sudo

48 s

42 cd

34 touch

30 apache (alias for sudo apachectl)

25 cp

24 gem

17 c

16 mate

14 irb

------
dangoldin
On one machine:

291 nice

93 cvs

17 .

15 pwd

13 emacs

10 cd

9 perl

9 export

7 find

6 cp

------
streblo
114 python

67 cd

65 ls

45 ssh

29 ipython

21 mate

19 man

16 ifconfig

12 sudo

10 svn

------
lg
94 cd 73 ls 64 sudo 30 nano 21 java 13 gawk 13 echo 11 ps 11 killall 8 clojure

java surprised me.

------
jobeirne
132 sudo

84 cd

63 ls

33 HandBrakeCLI

29 rsync

10 java

8 ssh

7 mv

7 mkdir

7 javac

------
Zak
134 sudo

55 csc

37 ls

34 cd

27 gcc

20 cp

19 ./guestbook.cgi

17 mzc

16 rm

14 make

------
ojbyrne
106 python

76 ls

67 emacs

63 cd

28 mysql

24 sudo

17 history

10 mv

9 ssh

6 rm

~~~
yters
I'm surprised emacs shows up so much.

~~~
ojbyrne
I feel a hint of castigation in that small comment, and it's been bugging me
for the last few days ;-) Yes, I admit it, I don't spend my day in emacs. Too
many things don't work quite right inside the emacs shell.

------
ingenium
85 cd

59 ls

47 sudo

47 ssh

20 man

15 cat

14 rm

12 ping

11 ps

11 ./configure

------
pmjordan
81 git

55 ant

52 ls

48 cd

44 clj

37 svn

37 ssh

30 mplayer

29 vim

29 cp

------
mk
272 git

66 ls

61 cd

26 svn

18 less

10 python

10 cp

8 man

7 vim

3 rm

------
ghiotion
178 vi

105 ls

66 cd

50 python

11 links

10 su

7 ps

7 cp

6 id

4 top

------
mcxx
68 ls 57 cd 31 mplayer 24 make 23 less 21 whois 17 man 17 avail 15 rm 15 diff

------
theorique
107 ls 99 cd 43 python 33 less 22 sudo 20 port 18 make 16 screen 15 ll 13 vi

------
ichverstehe
180 ruby 86 cd 40 git 31 ls 20 vim 20 script/server 16 grep 9 ri 8 ssh 6 scp

------
maurycy
b:maurycy:~% history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' |
sort -rn | head 1 21:23

:-)

b:maurycy:~% echo $SHELL /bin/tcsh

------
attack
People still use ls? Why not just tab completion?

------
abstractwater
on my MacBookPro: 74 ps 47 kill 44 ls 33 cd 27 sudo 18 pwd 16 ping 16 open 12
cp 11 scons

------
xlnt
lots of aliases. r is ruby. open is like double clicking something in the mac
finder, i quite like it.

128 p4 83 r 47 p4o 27 p4ch 23 rakts 22 curl 19 cap1d 18 ssh 13 script/scrape
12 open

