Language Selection

English French German Italian Portuguese Spanish

Perl script to monitor disk space and send an email

Filed under
HowTos

How to write a perl script that can monitor my disk space under UNIX or Linux and send me an email alert? There is a nice perl system routine called Perl df or Filesys::DiskSpace.

Task: Install Filesys::DiskSpace

First you need to install this perl module using apt-get or from cpan (Comprehensive Perl Archive Network).

$ sudo apt-get install libfilesys-diskspace-perl

Perl script code to monitor disk space

Now write a perl script called df.pl:

$ vi df.pl

Full Story.

More in Tux Machines

today's howtos

Leftovers: Gaming

Linux Mint Debian Might Not Adopt Systemd

The Linux Mint team has ended 2014 in force with a great Linux Mint 17.1 "Rebecca" release, for both the MATE and Cinnamon desktop, but it looks like the Debian edition is also going to be interesting. Read more

Latest SteamOS Update Brings New NVIDIA and AMD Drivers

SteamOS, a Linux distribution based on Debian and developed by Valve that aims to provide the best gaming experience, has been updated by its makers and a new Beta version has been released. Read more