Tag Archives: linux

Linux: Get Last File System Check

unix linux

Objective: Get the last time the ext2/ext3/ext4 filesystem was checked on Linux using e2fsck (a tool to check and repair a Linux ext2/ext3/ext4 file system).

Unix / Linux: Print IO Statistics of Running dd Process

unix linux

Let’s say you have a dd process that is running. By default, dd will only print IO statistics once the job has been completed or if it is interrupted by a Ctrl-C (SIGINT) command. While the job is running, you will probably have no idea how much data has been copied, the current progress or the copying speed. But fret not, there is actually a way to get the IO statistics of a running dd process.

Unix / Linux: Sync Local Directories

unix linux

To sync files between two local directories on Unix or Linux, you can either choose to perform a soft link to the source directory or use rsync or lsyncd daemon.

MySQL: Export Each Database to Individual SQL File

database

MySQL backups are normally done using mysqldump – a MySQL database backup program. The problem is all the backups will be written to a single output SQL file. I prefer to dump each MySQL database to a separate SQL file.

Shell Script: Check If Weekday

shell script

There are two ways to perform a “is it a weekday” logic in shell scripts. One way is to use cron. The other is to get the day of week from the date command.

Unix / Linux: Generate MD5 Checksum

unix linux

The md5sum command can be used to generate MD5 checksums for a string or a file. This is installed by default on most Unix and Linux distributions.