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