apt-get

Monitoring network traffic

tcpdump You want to track all incomming http-Headers on your Webserver? sudo tcpdump -A -s 10240 ‚tcp port 80′ | egrep –line-buffered „^……..(GET |HTTP\/|POST |HEAD )|^[A-Za-z0-9-]+: “ | sed -r ’s/^……..(GET |HTTP\/|POST |HEAD )/\n\1/g‘ Show the HTTP Requests only: sudo tcpdump -A -s 10240 ‚tcp port 80′ | egrep „^……..(GET |HTTP\/|POST |HEAD )|^[:alnum:]+: “ | sed -r ’s/^……..(GET |HTTP\/|POST |HEAD )/\n\1/g‘ capture for a specific URL string (only inside the url’s path) sudo tcpdump -s0 -A -vv | grep „myPathString“…

0
Read More

image handling with ImageMagic

ImageMagic is the tool of choice when you have to manipulate images on the command line.   You can easily install it from a shell with the following command: sudo apt-get install imagemagick Change all images in the current folder to a with of 800 pixels with a quality of 80%: for file in *.jpg; do convert $file -resize 800 -quality 80 $file; done Convert a *.gif image to a *.jpg image convert -strip test.gif test.jpg  

0
Read More