Jul
13
TTT Part 6 of n – More File Permissions
Filed Under Computers & Tech, System Administration on July 13, 2013 | 7 Comments
In the previous instalment of this series we had a look at how standard Unix File Permissions worked. We looked at how to understand the permissions on existing files and folders, but not at how to change them. We also mentioned that the standard unix file permissions are now only a sub-set of the file permissions on OS X and Linux (OS X also supports file ACLs, and Linux has SELinux as an optional extra layer of security).
In this instalment we’ll start by biting the bullet and dive into how to alter standard Unix File permissions. This could well turn out to be the most difficult segment in this entire series, regardless of how big n gets, but it is very important, so if you have trouble with it, please don’t give up. After we do all that hard work we’ll end with a simpler topic, reading OS X file ACLs, and OS X extended file attributes. We’ll only be looking at how to read these attributes though, not how to alter them.
Jun
30
TTT Part 5 of n – File Permissions
Filed Under Computers & Tech, System Administration on June 30, 2013 | 1 Comment
In this instalment it’s time to make a start on one of the most important Unix/Linux concepts, file permissions. This can get quite confusing, but it’s impossible to over-state the importance of understanding how to read and set permissions on files and folders. To keep things manageable, I’m splitting understanding and altering permissions into two separate instalments.
Linux and Unix (and hence OS X) all share a common file permissions system, but while they share the same common core, they do each add their own more advanced permissions systems on top of that common core. In this first instalment we’re only going to look at the common core, so everything in this instalment applies equally to Linux, Unix, and OS X. In future instalments we’ll take a brief look at the extra file information and permissions OS X associates with files, but we won’t be looking at the Linux side of things, where more granular permissions are provides through kernel extensions like SELinux.
May
26
TTT Part 4 of n – Navigation
Filed Under System Administration, Computers & Tech on May 26, 2013 | 4 Comments
In the previous segment we discussed the concept of a file system in detail. We described how filesystems contain folders which contain files or folders, and we described the different ways in which Windows and Linux/Unix/OS X combine all the filesystems on our computers into a single name-space, within which every file has a unique ‘path’ (F:\myFolder\myFile.txt
-v- /Volumes/myThumbDrive/myFolder/myFile.txt
). In this instalment we’ll look at how to navigate around the Unix/Linux/OS X filesystem in a Bash command shell.
May
24
Converting Unix Time Stamps to SQL Dates (ISO 8601) with Perl
Filed Under Software Development, Computers & Tech on May 24, 2013 | Leave a Comment
I spent quite some time this afternoon finding a reliable way of converting Unix Time Stamps (UTS) to the ISO 8601 format used in SQL databases like MySQL and PostgreSQL that does not get confused by timezones. In the end the final result is, as is so often the case with Perl, very short and simple, but since the Googles failed to find the answer for me today, I thought it would be worth sharing in case it’s of use to others in the future.
use DateTime; # Function to convert Unix Time Stamp to ISO 8601 Date # Arguments: # 1) The Unix Time Stamp to convert sub uts_to_iso8601{ my $uts = shift; my $date = DateTime->from_epoch(epoch => $uts, time_zone => 'UTC'); return $date->ymd().q{ }.$date->hms().'z'; }
The algorithm is very simple, use DateTime
‘s from_epoch
function to a DateTime
object in the UTC timezone (AKA Zulu). Then assemble the output as YYYY-MM-DD HH:MM:SS
, and append a z
for Zulu. MySQL and PostgreSQL can now use the string to populate Date
or Timestamp
columns.
As an example, the Unix Time Stamp 1369410796
converts to 2013-05-24 15:53:16z
.
May
18
Thanks Tim
Filed Under My Projects, Computers & Tech on May 18, 2013 | 5 Comments
This is not going to be an easy post to write, and I really hope I do it justice.
The Apple/Mac community lost one of it’s finest podcasters today. Tim Verpoorten wasn’t the first Apple/Mac podcaster, but he was one of the very earliest generation. I think it would be fair to call him a father figure to many of us who followed. I know he was one of the podcasters who inspired me to pick up the microphone myself, and I doubt I’m alone in that.
Tim had been unwell for some time, and hung up his microphone to concentrate on his health a while ago, but we all hoped it would just be a temporary hiatus. I don’t think any of us in the community wanted to believe we’d heard the last of Tim’s distinctive and friendly voice.
Every good Apple/Mac podcast brings something unique to the table, and Tim’s Mac Review Cast brought fantastic reviews week after week after week for years and years. Tim had a knack for finding great apps, particularly free ones, and he was able to find and review them at a truly impressive rate. Most people can mange either quantity or quality, but Tim could do both at the same time. Although he reviewed many many apps, you could always tell when an app really appealed to him. Those apps were almost never large apps with lots of features, but small apps that did just one thing, but did it really well. It’s fair to say Tim had a bit of a thing for menubar apps.
Because I learned about so many great apps on the Mac Review Cast, I regularly look up at my menu bar, or into my dock, and think of Tim. One app in particular that I’ll always associate with him is the light-weight Mac-like text editor Smultron. I’d almost given up on finding an editor like this for the Mac, when I heard Tim review Smultron, and gave it a go. It was love at first sight, and that cute red strawberry icon will always bring back fond memories of Tim.
Tim was one of the founders of the Mac Round Table Podcast (MRT), and it was through that podcast that I was fortunate enough to get to ‘work’ (play more like) with Tim. One of the great things about the MRT is how different all the contributors are, and how that opens up some great conversations. We often agreed on things, but when it comes to temperament, I think myself and Tim were polar opposites – I’m know for being the cranky Irishman (sorta) who’s prone to impassioned (and hopefully entertaining) rants, while Tim was always as cool as a cucumber – I can’t remember him ever getting flapped, and I can’t remember him ever having a bad word to say about anyone. I think it’s much easier to go on a rant than it is to remain calm and collected, and I greatly admired Tim’s coolness.
I never met Tim in the real world, yet I feel I’ve lost a friend. The Mac community has certainly lost one of it’s finest ambassadors, but my thoughts are with the Verpoorten family tonight – their loss is so much greater than ours.
The photo that accompanies this post is a crop from this image by Allison Sheridan.
May
11
TTT Part 3 of n – File Systems
Filed Under System Administration, Computers & Tech on May 11, 2013 | 3 Comments
This is the third instalment of an on-going series. These blog posts are only part of the series, they are actually the side-show, being effectively just my show notes for discussions with Allison Sheridan on my bi-weekly Chit Chat Across the Pond segment on her show, the NosillaCast Mac Podcast. This instalment will be featured in NosillaCast episode 418 (scheduled for release late on Sunday the 12th of May 2013).
In the first installment we started with the 40,000ft view, looking at what command shells are, and why they’re still relevant in today’s GUI-dominated world. In the second instalment we looked at OS X’s Terminal.app, the anatomy of the Bash command prompt, and the anatomy of a Unix/Linux command. This time we’ll be looking at the anatomy of file systems in general, and the Unix/Linux file system in particular, and how it differs from the Windows/DOS file system many of us grew up using.
Apr
26
TTT Part 2 of n – Commands
Filed Under System Administration, Computers & Tech on April 26, 2013 | 3 Comments
This is the second instalment of an on-going series. In the first instalment I tried to give you a sort of 40,000ft view of command shells – some context, some history, a very general description of what command shells do, and a little bit on why they are still very useful in the modern GUI age. The most important points to remember from last time are that command shells execute commands, that there are lots of different command shells on lots of different OSes, but that we will be focusing on Bash on Linux/Unix in general, and Bash on OS X in particular. The vast majority of topics I plan to discuss in these segments will be applicable on any system that runs Bash, but, the screen shots I use will be from OS X, and some of the cooler stuff will be OS X only. This segment, like all the others will be used as part of my bi-weekly Chit Chat Across The Pond (CCATP) segment with Allison Sheridan on the NosillaCast Mac Podcast.
Last time I focused on the shell, and avoided getting in any way specific about the actual commands that we will be executing within the Bash shell. I thought it was very important to make as clear a distinction between command shells and commands as possible, so I split the two concepts into two separate segments. Having focused on command shells last time, this instalment will focus on the anatomy of a command, but will start with a quick intro to the Terminal app in OS X first.
Apr
13
TTT Part 1 of n – Command Shells
Filed Under System Administration, Computers & Tech on April 13, 2013 | 6 Comments
I have no idea whether or not this idea is going to work out, but on this week’s Chit Chat Across the Pond segment on the NosillaCast Mac Podcast (to be released Sunday evening PST) I’m going to try start what will hopefully be an on-going series of short un-intimidating segments to gently introduce Mac users to the power contained within the OS X Terminal app. I’m on with Allison every second week, and I’ll have other topics to talk about, so the most frequent the instalments in this series could be would be bi-weekly, but I think they’ll turn out to be closer to monthly on average. While the focus will be on OS X, the majority of the content will be equally applicable to any other Unix or Linux operating system.
In the last CCATP we did a very detailed segment on email security, and despite the fact that with the benefit of hind-sight I realise it was too much to do at once and should have been split into two segments, it received the strongest listener response of anything of any of my many contributions to the NosillaCast in the last 5 or more years. I hope I’m right in interpreting that as evidence that there are a lot of NosillaCast listeners who want to get a little more technical, and get their hands dirty with some good old-fashioned nerdery!
Mar
16
Follow The Money (and beware of digital underpants gnomes)
Filed Under Computers & Tech on March 16, 2013 | 1 Comment
Something that’s exercised me over the last few years is what I sometimes call “the tyranny of free”, because the instance that everything must be free is actually very costly to us all. But, that’s only part of a bigger picture, and this week’s announcement from Google that they will be killing a number of services people have come to rely on, including Google Reader, got me thinking about this again.
I’ve blogged about the tyranny of free before, so I don’t want to focus on that today, instead I want to take a step back and talk about the importance of following the money.
Dec
29
OS X Service for Stripping Geotags from JPEG Images
Filed Under My Projects, Photography, Software Development, Computers & Tech on December 29, 2012 | 1 Comment
Back in 2011 I wrote a blog post explaining how to create an OS X Service for stripping keywords from image files. In this post we’ll use the same technique to create a Service for stripping geotags from JPEG images.
As with the keyword stripping service, there are two prerequisites for this action, one is required, one is optional. You absolutely MUST have install EXIFTool installed, and it would be good if you also had Growl installed, but it’s not essential.