Home / How-To & Tutorials (page 4)

How-To & Tutorials

Linux How-To’s & Tutorials

Viewing Bash Exit Status Codes With Pipes

Recently I was executing bash scripts from within bash scripts, and executing commands based off of exit code, typically I just use or just the typical But now what if you are also piping the output of script.sh through tee? Then you ...

Read More »

The Best Way to Install Nagios – Using OMD The Open Monitoring Distribution

Without a doubt the best OpenSource monitoring software out there is Nagios. Now I’m sure this is a debatable topic and some favor other options out there such as Zabbix. But if your a true Linux head, and loath any ...

Read More »

How to quickly and efficiently delete all data in a LARGE MySQL table using TRUNCATE

If you have a very large table in MySQL and you need to delete all the data from it. Instead of using the DELETE syntax or DELETE FROM tablename; It is best to use the TRUNCATE syntax. This will delete all data ...

Read More »

VMware and Hot Adding Hard Disks to a Running CentOS or RHEL Linux System

Its possible to extend your disk space on your running virtual machine without even needing to reboot! There are a few caveats obviously, you need to be using LVM (if you are not, SHAME ON YOU!) and be comfortable with file systems ...

Read More »

Why the GOTO Statement Is Evil

What is the goto statement? Basically, it’s a way for you to easily “jump” around in your code. You can insert “goto labels” within your code, then simply jump to that segment of your code by just inserting “goto LABELNAME”. ...

Read More »

Automate server backups to Amazon S3

I’ve always tried to figure out what the best way would be to backup a server, without me having to do anything at all. I looked online and found a lot of great websites, software that does it but everything ...

Read More »

Bash script to create MySQL database and user

I don’t know about you, but often times I find myself needing to create a MySQL database and I simply forget all of the commands. This is really something that I should remember, but for some strange reason I just ...

Read More »

Use Perl modules on remote servers.

As a Systems Administrator, mainly for Unix/Linux, you realize how big of a deal automation is. At my work, we have nearly a thousand CentOS/RHEL servers. To execute scripts or commands on a list of servers, you can use a ...

Read More »

A better nslookup

If you’re a Systems Administrator, and you use a Mac or any flavor of Linux/Unix for your workstation, chances are you have used the nslookup command, typically located at /usr/bin/nslookup. It’s a fairly simple command, used to resolve a hostname to ...

Read More »