Check These Out
Works with files containing spaces and for very large directories.
Default output-file is "liveh.txt".
This uses only BRE, in case you're using an older version of sed(1) that doesn't have support for ERE added.
With a modern sed(1), to reduce false positive matches, you might do something like:
liveh(){ tcpdump -lnnAs512 -i ${1-} tcp |sed 's/.*GET /GET /;s/.*Host: /Host: /;s/.*POST /POST /;/GET |Host: |POST /!d;/[\"'"'"]/d;/\.\./d;w '"${2-liveh.txt}"'' >/dev/null ;}
Anyway, it's easy to clean up the output file with sed(1) later.
Grabs all rar files in any current subdirectories and feeds it to unrar. Doesn't work well with things packaged like file.part01.rar. Works best with File.rar. You can recurse into other directories by adding more /*'s
Using this command you can track a moment when usb device was attached.
This will fetch a metascore from metacritic.com.
It requires a url from metacritic without the http://www.metacritic.com/
Example:
$ metascore games/platforms/wii/supermariogalaxy
-
$ metascore tv/shows/marriageref
-
$ metascore video/titles/newmoon
Would be cool to use this in some sort of a graph.
And then to complete the task:
Go to target host;
$ssh host
Turn everything off:
$for i in `chkconfig --list | fgrep :on | awk '{print $1}'` ; do chkconfig --level 12345 $i off; done
Create duplicate config:
$while read line; do chkconfig --level $line on; done < foo
Converts any number of seconds into days, hours, minutes and seconds.
sec2dhms() {
declare -i SS="$1"
D=$(( SS / 86400 ))
H=$(( SS % 86400 / 3600 ))
M=$(( SS % 3600 / 60 ))
S=$(( SS % 60 ))
[ "$D" -gt 0 ] && echo -n "${D}:"
[ "$H" -gt 0 ] && printf "%02g:" "$H"
printf "%02g:%02g\n" "$M" "$S"
}
Shows all block devices in a tree with descruptions of what they are.
This allows to switch from horizontal to vertical split, putting the current buffer on the right side of the vertical split. To put it on the right use ^W-H.
In a similar way, to switch from Vertical to Horizontal, do ^W-J (for bottom) and ^W-K (for top), but you vimers all guessed that one already :P