WordPress Developer & Linux Administrator


Find and remove all core files on your server

Depending on your server configuration, you may find the some of your websites have “core” files that you don’t remember putting there. A core file is an image of a process that is created by the operating system when the process terminates unexpectedly. This file can be very useful in determining what went wrong with a process. The production of core files can be enabled by default, depending on the distribution and version of Linux® that you have. However, most of the time you don’t care and just want them gone. I’m going to show you how to easily remove them.

Continue Reading

How to determine if bash script is running from within the script

Often times when running a bash script, you don’t want it to be executed on a cron (again) if it’s already running. This little trick will show you how to code a contingency into your script so that it doesn’t doubly or triply execute while the first script instance is running.

Typically this involves using a temp or lock file, so that you can easily track the status of the script. I’m going to show you two examples.

Continue Reading