Posts Categorized: linux

Screen – Watching 2 log files at once

I needed to tail two log files in one terminal so on the server I was using: yum install screen  [or apt-get install screen]screenCtrl-A  c        [create new session]Ctrl-A Shift-s [spilt the screen]Ctrl-A TAB     [move to the other frame]Ctrl-A ”         [choose a screen session for this frame] Run “tail -f filename1” in one frame then Ctrl-A… Read more »

Building an RPM Package (DansGuardian 2.10)

After putting together an RPM for DansGuardian v2.10.1.1 I thought I would make a few notes. The version of DansGuardian in the repositories is currently version 2.8 and the only other repo or rpm I could find was a 32-bit 2.10.  Why DansGuardian 2.10? Content Scanning Support with Clamd or Kapersky Regular Expressions to enforce… Read more »

Business Value of Open Source Software – Mark Shuttleworth

I was at the Enterprise Ireland ‘The Business Value of Open Source Software’ event yesterday. The speakers included: Simon Phipps (Open Source Initiative) Tim Willoughby and Tom Mackey (Limerick City Council) Ronan Kirby (Red Hat) David Coallier (Open Source Programmer) Mark Shuttleworth (Canonical/Ubuntu) Simon Phipps provided the overview of software freedom(gratis vs libre) including the… Read more »

Text mangling with Grep, Sed and Awk

Just an example for future reference of text mangling on unix/linux making use of sed, awk, and grep on a CSV/text file containing names, email addresses etc delimited with a semi-colon ; cat emailaddresses.csv | grep “@” | awk -F “;” ‘{print $1}’ | sort | uniq | tr [:upper:] [:lower:] | sed ‘s/\@mydomain\.tld\.uk/\ $… Read more »

Firefox Windows 7 and Linux proxy.pac

Had a problem today with Firefox on Windows 7 and Firefox on Linux. Upon reading our proxy.pac (wpad) file the if statements were not working: if(isInNet(myIpAddress(), “”,”″)) According to this post on Mozilla the problem is due to how FF/Win7 reports the ipv6 address, rather than the ipv4 version. So the solution was to add… Read more »

Justniffer Monitoring Network Traffic

Just read about Justniffer on UbuntuGeek and decided to give it a whirl. Downloaded deb installer from SourceForge and ran with: justniffer -i eth0 I received the following output showing a few web connections and a telnet session to a mail server. – – [27/Oct/2010:21:33:52 +0100] “GET /wikipedia/en/b/bc/Meta-logo-35px.png HTTP/1.1” 200 1611 “” “Mozilla/5.0 (X11; U; Linux… Read more »

Some vi Tips

A few tricks using vi for increased? productivity: Global Search and Replace :% s#changefrom#changeto#g Delete from the cursor to the end of the line: D Replace from here to the end of line: C Delete All Remaining Lines in a File, (from here to the end of the file delete) :.,$d Return to the Command-Line… Read more »

Red Hat CentOS Yum Repositories

This is my summary of Yum repositories for future reference. Yum (and apt on Debian systems) is an easy way to install software on Red Hat/CentOS systems and to keep those systems up-to-date. There are a variety of repositories with different software packages available which is why I like to use most of the following… Read more »

Enhancing ClamAV with Extra Signatures

We use ClamAV mainly for scanning incoming email for malware and phishing scams. ClamAV comes with a default database usually stored in /var/clamav or /var/lib/clamav . To get up-to-date malware definitions the following sources can be used: Freshclam The Freshclam binary should have been installed when you installed clamd and you should have a script… Read more »

Refreshing ARP table entries

Taking an IP address down on one host: /sbin/ifconfig eth0:1 down Taking the IP address up on another host: /sbin/ifconfig eth0:1 netmask up Use arping to update the ARP tables: /sbin/arping -S -B So the switch should cache the new arp entry invalidating the existing one.The arping utility appears to be part… Read more »