Zero Filling a Disk in Linux

Zero Filling a Disk in Linux

The simple way to wipe or zerofill a disk is: dd if=/dev/zero of=/dev/sd? bs=1M However I found an article describing how to zero-fill with a progress indicator using pipebench, installed on Debian/Ubuntu ...

Increasing CentOS LVM under VMWare

Increasing CentOS LVM under VMWare

Background: I had an existing CentOS machine as a virtual machine running on VMWare ESX Server and it was running out of space so for future reference I did the ...

SquidGuard LDAP User Search and Special Characters

SquidGuard LDAP User Search and Special Characters

So I had a problem with the ldapusersearch string as some eejit has created an OU with spaces and an apostrophe in the name. So the characters are represented as: comma ...

Flushing local client DNS cache

Flushing local client DNS cache

From info I found here. This is how to flush the local client DNS cache. Windows: ipconfig /flushdns Linux: sudo /etc/init.d/networking restart Mac: lookupd -flushcache

Browsing all articles from February, 2011

FFmpeg Command-line Video Conversion

Video files can be converted using GUI tools such as Handbrake, Arista, WinFF but if you don’t mind the command line – or if you want to automate video file [...]

MySQL query output to text or CSV

I needed to output the results of a MySQL query today for further analysis and found the answer here. For future reference… SELECT * FROM errors WHERE mailfrom LIKE ‘a.n.other%’ [...]

Piwik Funnel Plugin

The goals analysis in Piwik is a little limited in comparison with Google Analytics but the following plugin which is in development looks promising and of use already.http://dev.piwik.org/trac/ticket/220

PHP Ternary Operator for If Else

These two snippets of PHP perform the same function but the ternary operator takes much less space. Read more great PHP tips at phpro.org /*** using if / else ***/ [...]

Finding, Searching, Replacing & Deleting Strings in Files

To find a text string within files in all sub-directories: find . -type f | xargs -r0 grep -F ‘dodgystring’ or find . -type f -exec grep -l “dodgystring” {} [...]

VirtualBox: Cloning a VM

My Virtual Machine was named http1 so I cloned the vdi as http2.vdi using the VBoxManage command: VBoxManage clonevdi http1.vdi ../pathtonewlocation/http2.vdi The output was: 0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%Clone hard disk created in format [...]

Uptime

Uptime of 1214 days on an internal email scanning server running Red Hat Linux 4.

SNMP with Nagios

I thought I would jot down a few notes about today’s adventures with SNMP. Specifically using SNMP with Nagios mostly on Red Hat/CentOS. I have an appliance from a third-party [...]

Uptime

1084 days on this internal monitoring machine. Unfortunately I had to take the machine down as I was replacing it.

Linux Find Not Owner

In Linux to find files not owned by user using the ‘find’ command we negate with the exclamation mark so rather than: find . -user jonny we use: find . [...]