Easy to ignore the mail notifications on a linux computer/server. Why not add a forward to the email on the root user to an email address? Forward File Simply create the file /root/.forward and place your email address in this file. It will be forwarded to your external mail address. We can simply create .forward […]
Category: Linux
PHP Browser Redirection
Whilst the .htaccess file may be used to provide temporary and permanent redirects to manage pages which have been deleted or moved, PHP also provides redirect methods. Using PHP to redirect the browser may be a better option compared to htaccess if the server prevents the file from being overwritten, or indeed if its inaccessible. […]
wget Website File Download
Wget may be used to download all or a part of a website. I have used wget to recover a website where the control panel and FTP were no longer available. Wget follows referenced links to traverse a website, downloading the files which are referenced. wget works best with non-dynamic websites accessing static content. Using […]
Backing up with Rsync
rsync can be used to syncronise files and directories between two locations on the same device or across different devices. It’s a great way to backup the content of your computer with a Linux server. Synchronising Files Typical command format to retrieve files rsync -avz neil@192.168.0.55:/home/neil/home/backup somewhere Where the parameters are: Add a slash on […]
Select MYSQL Database
Selecting a database after connecting to MySQL from the command line. […]
Count the Number of Files in a Directory
From the Linux command line a short command to count the number of files in a directory […]
Increase Virtual Image Size
For a kvm based on qcow2 the requirement was to increase the size of the hard drive. Therefore the virtual machine size needed to be increased. The change could be divided into two parts: increase the file space allocated to the virtual machine increase the hard drive within the virtual machine to occupy the free […]
List all Hard Drives
Messages about a failing hard drive meant that I wanted to list all the installed drives so that I could determine which needed to be replaced. Browsing the Internet there are many recommendations to use the command lshw However, I found that by default its not included within the Debian installation. but can be installed […]
List all tables in MYSQL database
To list all of the tables within a mysql database. As an example we’ll select all the tables from the instruments database. Run the command once logged into the MySQL and after selecting the database. To login to mysql mysql -u username -p Leaving a missing password parameter value will prompt for the entry of […]
Adding Additional IP Address to a Network Interface
Linux network interfaces allow more than one IP address to be assigned. With just the one network connection multiple IP addresses can be used. Thus allowing a unique IP address per website, for example. Additional network IP addresses are configured in the file /etc/network/interfaces An example of an entry for a static assigned IP address […]
Read More… from Adding Additional IP Address to a Network Interface


