Category Archives: Utilities

useful analysis tools - usage reminder

How to obtain multiple files during a capture:
$ tethereal -i <interface> -a filesize:3000 -b 14 -s 96 -w <capture_file>
(3MB files of 96 bytes length)
NOTE: tcpdump defaults to 96 bytes length, also, but I am not sure if it supports ring buffer?!?
******
If multiple files matching the regexp FOOBAR are to be merged :
$ mergecap -w bigfile.cap [...]

vim

To change all instances of one word to another within one line use:
:s/word/replacement/g
To change all instances of one word to another within the entire file use:
:%s/word/replacement/g
To ask for confirmation before replacing each instance of a word use:
:%s/word/replacement/gc

rsync reminder

$ rsync -a a b <==> b/a/foo
$ rsync -a a/ b <==> b/foo
destination (b) <==> destination/ (b/)
If you need to pass parameters to rsync-over-ssh, then includ them in ‘ - as in:
$ rsync -ave ’ssh -i /home/netfortius/.ssh/remote_private_dsa’ user_at_remote@remote_system:/path/ ./local/path