Useful Command-line Tools, Part 1: mktemp

This is the first part of the Useful Command-line Tools on useful command line tools. In this blog post I'm going to talk about the mktemp command.

This is a really cool command that generates unique file or directory names for temp files or directories based on a template you pass it.

Here's how you create a temp file in your /tmp directory:

$ tempfile=$(mktemp /tmp/footemp.XXXXXX) || exit 1
$ echo $tempfile

You can also create a temp directory:

$ tempdir=$(mktemp -d /tmp/footemp.XXXXXX) || exit 1
$ ls -alh $tempdir
total 0
drwx------   2 zach  wheel    68B Jan  2 09:44 .
drwxrwxrwt  18 root  wheel   612B Jan  2 09:44 ..

You can learn more about this command by reading the man page.

Morning run: 2.29 miles

I ran 2.29 miles the Climbing the hill route this morning. It was cold, windy, rainy in spots and really hilly at the beginning. It was a good "getting back into things" run.

Things I will do this year

  • Buy a house
  • Write a "Learn Drupal The Hard Way" book
  • Start a website and make it work
  • Spend more time with Frank
  • Run everyday
  • Run a marathon at some point
  • Stop eating out so much and cook more of my own food
  • Blog more
  • Learn a new language
  • Visit the west coast
  • Start a few more open source projects
  • Keep OpenBlog and OpenBrewery up and awesome
  • Talk at a major conference
  • Drink more delicious beer
  • Brew more beer

Some more changes to OpenBlog and starting on a new project, OpenBrewery

Yes! Just as the title suggests, I've got a couple of things going on. First, we've made a few changes to OpenBlog and Subtle Simplicity in preparation for a 7.x-1.0-beta1 release. I've also started a 7.x-2.x branch of Subtle Simplicity and ported Shrop's theme to be based on the Omega theme.

The other big thing is my new project OpenBrewery, it's a Drupal 7 distribution for your brewery's website. I've got a lot of ideas for this thing.

OpenBlog Changes

I'm back on working on the OpenBlog project! Here are some recent changes:

  • Adding in the metatag and google_analytics module
  • Removing the sharethis module

Soon we'll be changing up the theme and adding some more functionality. Keep an eye on the issue queue to keep up with the changes.