“En shell dans le texte”
Tuesday, May 27th, 2008Unix Command Line Kung-Fu is 33 interesting pages with a lot of shell tips (linked today by Larry Wright). My small selection with “customized” examples :
$ !!:p
$ !!
$ iwconfig
zsh: command not found: iwconfig
$ /sbin/!!
$ e app/model/user.rb
$ svn diff !$
$ ./script/generate rspec_controler user
$ ^user^session
$ seq -w 1 12
$ awk '{ print $1 }' access.log | sort | uniq -c | sort -rn | head -5
$ less -r +G log/test.log
Some of my own favorites :
$ sudo du -s /home/* | sort -rn | head
$ echo 2048 | sudo tee /proc/sys/vm/min_free_kbytes
$ sudo sh -c "ls /var/archives/*home*"
$ sudo find /var/archives -name "*home*"
$ pgrep nm-applet | head -n -1 | xargs kill
$ alias ifconfig='/sbin/ifconfig'
$ alias myps='ps -u $USER'
Tryphon