Linux

Share a bash session using screen

This is a short post on how you can “share” a bash session/prompt with other users. User A connects to the server and types in the command # screen User A hist the key combination <Ctrl + a> and the type :multiuser on User B connects to the same server as user A and can […]

Read More
Web

Using vlogger to split Apache logs

Vlogger is a program that handles large amounts of virtualhost logs and splits it to separate files. This is a short HOWTO to configure it using Apache. Install vlogger in debian etch # aptitude install vlogger Make sure you have working Apache server Configuring vlogger Change the LogFormat line (there are multiple LogFormat lines – […]

Read More
Network

Using arp_announce

It is possible to control which source address is put in to ARP headers using the ARP_ANNOUNCE option in the kernel. It takes the following values. 0 (default) Any local address 1 Use address from the same subnet as the target address 2 prefer primary address. This is worth knowing because the default can give […]

Read More
Scripting

‘tail -f’ with highlight

This is an example of how you can use tail with colors. # tail -f /var/log/maillog | perl -pe ‘s/colorthisword/\e[1;32;40m$&\e[0m/g’ The ;;; values explained 0 all attributes off 1 bold 32 foreground green 40 background black “colorthisword” can be any perl regular expression: (foo|bar) highlight the strings foo and bar \b((foo|bar)\b highlight the words foo […]

Read More