When you need to create a log file or some dated archive The format can be modified slightly based on date formatting.
Category: CentOS
Posts in this category are specific to CentOS and may or may not work on Fedora and Red Hat or other UNIX based systems.
UNIX Bash – Website Monitor
Reference: http://unix.stackexchange.com/questions/84814/health-check-of-web-page-using-curl
UNIX Terminal – Compare Directory On Different Servers
When working with two or more servers it’s important to know that the files are the same on all servers involved. This script will assist in showing the differences between the servers without actually acting on the differences (will not copy any files). Key part of the command below is…
SELinux Configuration Change
A couple ways to do this, I like this method below most as it bundles some stuff above into a nice package. Reference: https://www.crypt.gen.nz/papers/how-to-disable-selinux/
UNIX Bash – Get Latest File Name Based On DateTime
Working on a backup and restore script I often need only to know what the latest backup/archive file is, this command helps you learn that.
UNIX Terminal – Secure Copy (SCP)
Secure Copy (SCP) is a useful UNIX command that allows you to securely copy files and directories between your local machine and a remote computer. In the examples below “-P 22” is not actually needed if the SSH port is 22. Many of the servers I connect to have a…