NOTE: This script has been updated to remove the premature deletion of the install directory. Over the last month or two, WHMCS has been updated many times. This is a GOOD THING, but it can be annoying to go through the...
This solution uses grep. Grep is a search tool that exists by default in just about every Linux installation. You can also search Google for Windows Grep. for a Demo, Here is FileA.txt 1. In Both 2. In Both 3. In Both 4....
PHP records all errors to a file named error_log I needed to look at the status of a project on two servers to see what errors were being thrown. This command line shows the top 20 errors and how often they...
Have you ever wanted to know the ip address assigned to a domain according to your local server? I had this problem. I needed to get an IP address of a domain before the domain propagated. I was writing a custom...
I needed to transfer about 40 databases from a new clients server over to my hosting platform. When doing a couple database exports, I might use PHPMyAdmin to do the export. Heck, it’s convenient because I usually want to look around...
AKA: Choosing and setting safe file permissions for a WordPress install. If you have ever watched a WordPress security presentation, you’ve heard the advice: Generally speaking, directories should be 755 and files should be 644. But the presenter never tells...
This is a simple issue that trips me up every now and then. Let’s say you have a directory of a couple dozen themes all in zip files. It would be a pain to type “unzip filename.zip” for every single one,...
It is easy to append a line to a file in BASH. I wrote a short script this morning that I can use to add a single line to my servers /etc/hosts pointing any domain I want at the loopback IP...
I just made a change to my .bashrc file and I thought I would share the tip. All of this is pretty basic stuff, but if you don’t customize your Linux logins, this would be a good place to start. For...
It should say that test.zip is a zip file, but the if statments, which check for TAR in the file name, all return true… If I do this outside of an if statement, say at the shell prompt, it works correctly....