Shell scripting using the date command

A useful command line tool is date, which is typically used for displaying the current system date, or setting it. The default format of the date and time displayed will be the system default, eg "Fri Dec 7 16:41:08 NZDT 2007", but it is possible to apply your own formatting, and also to specify a different date to use, without adjusting the system clock.

Using find to locate files modified in the last 24 hours etc

The Unix/Linux shell command "find" is really useful for finding files on your computer. There are also graphical utilities for finding files, but sometimes it is easier to use the command line, or it’s simply not possible, eg if logged in to a remote server using SSH. This post looks at how to use the find utility to locate files based on the modification time eg looking for files that have been modified in the last 24 hours.

How to mount an ISO image on Linux

An ISO image or .iso file contains the disk image of an ISO 9660 file system, which is used for storing data on CD-ROMs and DVD-ROMs. It is possible to take an ISO image and record it onto a CD or DVD using various applications for doing so, and it is also possible to mount the ISO image using Linux, so that you can access the files without having to actually burn it to disk first.

Getting Transaction Check Error with Yum

I needed to install the MSSQL libraries for PHP on a CentOS 5 server and ran into a few issues when installing some of the required dependencies, getting "Transaction Check Error" error messages which indicated conflicts between files in packages.

Format a partition with the ext3 filesystem

The ext3 filesystem is a Linux filesystem with journalling capabilities. I’m always forgetting the command I need to run to format a partitition with the ext3 file system so have posted this article so I always have a easy to find reference for it… The example used here is done on the command line, and not using a GUI tool.

Prevent hostname lookups with openssh sshd

When you connect to an OpenSSH sshd server, it is configured by default to do a hostname lookup on your IP address. If there are any issues with the DNS configuration on the host machine, or with the DNS server it is using, this can lead to a delay when logging in using ssh for around 30 seconds. It is very easy to switch this host name lookup function off in the sshd_config file.