Books have been written on the subject of awk and sed. Here’s a small sample of commands I put together over the years that are useful for everyday system administration tasks. Most of these tasks …
Read the full story »You can get the epoch time on Solaris 11 and Linux simply by running the date command:
Just some quick notes on installing and configuring Salt master server and minions to run remote commands for various sysamdin needs.
In the past, I’ve posted a couple of versions of this script in Bash and Korn shell. Here’s a much-expanded and improved Bash version. The script will take your input and look for files containing …
So, as the saying goes, shit happens and the other day I accidentally deleted /boot on a CentOS 6 box. I have NetBackup running on the system, so this would not have been a problem …
By default, Outlook will preserve source text formatting during copy/paste operations. At times this can be very annoying, especially when composing emails of technical nature. There’s a good chance your email will end up looking …
GoAccess is a simple but useful “top”-like CLI utility giving you a quick overview of the Apache access_log entries.
Here’s a common scenario: you insert or swap and SD card in your laptop and… nothing happens. Sometimes Windows decides to ignore the SD card for reasons unknown (well, the true reason is it’s Windows). …
If you’re not familiar with Fail2Ban: it’s a log analysis tool that detects failed login attempts for your SSH, FTP, etc services and uses IPTools firewall to temporarily drop connection requests from the offending IP addresses. …
Just some quick note on configuring NTP client on CentOS/RHEL/Fedora and forcing time update. Just got tired of having to remember these steps every time I run into NTP.
This is a quick example of finding the first and last occurrence of an event in the log file. This can be useful for determining the service outage window and for general troubleshooting. In the example below I am looking at the PostFix maillog file, trying to figure out the duration of the problem I’ve been having with one of the mail relay servers.
Locating most recently-modified files in the current directory is easy: ls -alt | head. However, searching a directory structure for recent changes may prove a little more challenging. The most common approach is to use …
If at all possible, don’t do it. Find a blank DVD-RW and burn the ISO file. Most current Linux distros can be easily put on a USB stick using freely-available utilities and installed without a hassle. CentOS is not one of them. It would appear, CentOS was designed specifically to make installation from a USB stick a professional challenge for a seasoned sysadmin.
The basic problem is this: you have server “A” with a bunch of packages -let’s say PHP-related stuff – installed you need for you application. You need to get the same application working on server “B”, which is not an exact copy of server “A” and is missing some of the packages.
Recently I ran into a little problem: I needed to make a simple Web UI allowing users to search a database table containing a copy of the Postfix maillog for quarantined mail addressed to them. …
Frequently, imported posts or posts created by auto-blogging plugins will create unnecessary tabs, newlines, and line breaks. This has a negative impact on readability and aesthetics of your site. If you cannot address the problem …
Here’s a simple script to automate mysqlhotcopy runs from cron to backup multiple MySQL databases. The script loops through the list of databases and kicks off an instance of mysqlhotcopy in the background for each one. Really, …
Every time I come across a link leading to HP’s angry garden salad of a Web site, I feel as if I stepped in chewing gum. Unfortunately for me, being a sysadmin means I have …
Assigning variables is easy if you know how many you have and what they are called. The value of a variable can be, well, variable. But the names and number of variables need to be …
The vCenter Standalone Converter is a handy app you can run on your Windows or Linux PC to to P2V a remote server. As convenient as the Converter is, there are a few gotchas that …
This is just a quick summary of the more popular rescue CDs out there. All of these are Unix-based bootable ISOs. Some are available as self-burning EXE files, which may be useful if you don’t …
The current version of manual pages for the most common Linux commands and options. Just for your online convenience.
This is a fairly common issue with running scripts from root cron: the script works perfectly when ran manually from command line, but fails in unexpected ways when running automatically from root cron.
Latest Comments