Robert R Evans | 9c7cd9a | 2010-10-02 11:55:34 -0700 | [diff] [blame] | 1 | function rh { |
| 2 | history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head |
| 3 | } |
| 4 | |
| 5 | function ips { |
| 6 | ifconfig | grep "inet " | awk '{ print $2 }' |
| 7 | } |
| 8 | |
| 9 | |
| 10 | # View man documentation in Preview |
| 11 | pman () { |
| 12 | man -t "${1}" | open -f -a /Applications/Preview.app/ |
| 13 | } |
| 14 | |
| 15 | |
| 16 | pcurl() { |
| 17 | curl "${1}" | open -f -a /Applications/Preview.app/ |
| 18 | } |
| 19 | |
| 20 | pri() { |
| 21 | ri -T "${1}" | open -f -a /Applications/Preview.app/ |
| 22 | } |
| 23 | |
| 24 | |
| 25 | # disk usage per directory |
| 26 | usage () |
| 27 | { |
| 28 | if [ $1 ] |
| 29 | then |
| 30 | du -hd $1 |
| 31 | else |
| 32 | du -hd 1 |
| 33 | fi |
| 34 | } |