How to check if a cron job ran

Cron is a time based scheduled task daemon that runs on most common Unix/Linux distributions. Because cronjobs are time based sometimes it is necessary to validate that the job ran at the scheduled time. Sometimes people will configure a cron to send the output of the script to a user via system mail or redirect the output to a file; however not all crons are setup the same and many times they may be configured to send output to /dev/null hindering any ability to validate the job ran....

 · 4 min · Benjamin Cane

dscacheutil: Clearing DNS cache on OSX

This is something I ran into recently over the weekend. I made modifications to the DNS of a domain and I couldn't get my mac to recognize the change. The culprit was DNS caching, after flushing my DNS cache all was well. # dscacheutil -flushcache ...

 · 1 min · Benjamin Cane

mysql: Creating a db and user

While the specific commands below were used to create a test database for wordpress the same commands will apply for most situations where you want to create a mysql database and a user with appropriate privileges to that database. $ mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 39304 Server version: 5.1.54-1ubuntu4 (Ubuntu) First log into the mysql command line interface using the mysql command....

 · 3 min · Benjamin Cane

gzip: Restoring original filename

I can't say this has happened to me often but recently the question came up on whether or not gzip retains the original filename. Here are the commands necessary to not only find the original filename but uncompress the file with its original filename. Identifying: [email protected]:~/Downloads$ gzip datacenter-me.jpg [email protected]:~/Downloads$ gzip -l datacenter-me.jpg.gz compressed uncompressed ratio uncompressed_name 23386 23392 0.2% datacenter-me.jpg As you can see from the above the filename is stored in the gzip file....

 · 2 min · Benjamin Cane

bind: Checking a zone record for errors

Bind is the most widely used DNS service software out there, it is the default DNS service for all of the main distributions of Unix/Linux. While Bind is very popular it is also very tricky sometimes. One of the best ways to see if your edits are good and meet the DNS standards is to run a named-checkzone after editing a zone file and before reloading/restarting bind. slize:~# named-checkzone bencane.com /etc/bind/master/bencane....

 · 1 min · Benjamin Cane