/Tag:linux

Watching the progress of a dd action

dd is one of those indispensable Unix / Linux utilities whether its cloning or wiping a drive or simply creating a bootable flash drive from an image file. The problem is operations like wiping a drive with the output from /dev/zero can take an extremely long time especially on larger hard drives. In situations like this it can be handy or somewhat soothing for the impatient to know how far through the requested action the process is. Luckily its pretty simple to find out, simply open a new tab and execute: pgrep -l ‘^dd$’ […]

By |June 22nd, 2012|Linux|0 Comments

Near Realtime File Replication With Lsyncd

Ever wanted real time backups of  directories on your server? To replicate static media files for a website to a separate box to reduce load? An easy solution lays with lsyncd it allows you to watch a directory structure on your file system, and replicate any changes on a remote system. How It Works: inotify is a Linux subsystem available from the 2.6.13 release of the Linux kernel that monitors changes made to a file system and reports these changes to interested applications. lsyncd is an application written in lua that uses the inotify service to inform it of changes made to monitored directories and then when notified of a change uses rsync to replicate the changes on a remote service. Getting lsyncd The lsyncd sourcecode can be downloaded from Google Code and compiled but depending on the distribution your server is running, the install process be even easier as lsyncd is included in the repositories of many popular Linux distros. Installing On Debian / Ubuntu While lsyncd is included in both the repositories of Debian and Ubuntu but unfortunately its an outdated version so check what version you are going to get beforehand with the command: apt-cache show lsyncd If apt-cache tells you that only one of the 1.x versions are available, I would recommend grabbing one of the 2.x versions from the Debian testing repository instead, the amd64 package can be found here  and one for the i386 architecture here. Then install using the dpkg command i.e cd /root wget wget http://ftp.au.debian.org/debian/pool/main/l/lsyncd/lsyncd_2.0.4-1_amd64.deb apt-get install lua5.1 rsync dpkg -i lsyncd_2.0.4-1_amd64.deb […]

By |July 21st, 2011|Linux|2 Comments

Linux Iptables

A tutorial showing the creation of simple Iptables firewall rules.

By |July 12th, 2008|Linux|0 Comments