Oct
10
TTT Part 22 of n – Tips & Tricks
Filed Under System Administration, Computers & Tech on October 10, 2014 | 2 Comments
This instalment is a little breather between the fairly heavy instalments on searching, and the upcoming set of instalments on networking. We’ll start with a look at some tips and tricks for getting the most out of BASH, and then transition to some tips and tricks for getting the most out of the OS X Terminal app.
Sep
26
TTT Part 21 of n – More Searching
Filed Under System Administration, Computers & Tech on September 26, 2014 | 1 Comment
This is the third and final instalment on searching. In the first instalment we learned how to search for text within files and streams using egrep
. In the second we learned to search for files based on all sorts of criteria with the find
command. In this final instalment we’ll start by looking at one last feature of find
, its a ability to execute commands on the files it finds. Then we’ll end by looking at an OS X-only alternative to find
that makes use of the Spotlight search index to really speed up searches.
Sep
7
TTT Part 20 of n – File Searches
Filed Under Computers & Tech, System Administration on September 7, 2014 | 2 Comments
In the previous previous instalment we looked at using egrep
to search for a particular piece of text in a stream or file. egrep
is often a great tool for finding a file you are looking for, but only if the file is a plain text file, and only if you are searching for that file based on its content. What if you want to search for files based on other criteria, like the last time the file was edited, or the name of the file, or the size of the file, or the type of the file etc.? For that you need a different command, for that you need find
.
Aug
30
Play a Sound in Automator
Filed Under Software Development, Computers & Tech, System Administration on August 30, 2014 | 3 Comments
In a recent Chit Chat Across the Pond segment on episode 484 of the Nosillacast Mac Podcast myself and Allison walked through the process of creating an automator action for generating secure memorable passwords with the XKPasswd 2 perl module (we basically walked through the steps in this blog post). During that discussion Allison mentioned it would nice if Automator could play a sound when it was finished so you could know when automator was done generating the password without installing a third-party notification app like Growl.
At the time I didn’t know of a way to do that, but now I do, and it’s really quite straightforward thanks to the OS X terminal command afplay
which will play an audio file without opening any sort of GUI.
Aug
16
Creating an XKPasswd 2 OS X Service with Automator
Filed Under System Administration, Computers & Tech on August 16, 2014 | 4 Comments
It’s going to take me a few months to re-write the www.xkpasswd.net site so it uses the new XKPasswd 2 perl module. In the mean-time, thanks to the magic of Automator an OSX Services, Mac users can integrate XKPasswd 2 right into their OS with out very much effort at all.
This blog post is intended as a follow-on post to my earlier XKPasswd 2 beginners guide. This post assumes you have followed the installation instructions in the beginner’s guide to install the XKPasswd 2 module, that you followed along with that post and created a script that generates passwords in a format of your choice, and that you have tested that script to be sure it works. In this post I’ll be using the final example script from the beginner’s guide as my pre-written script.
Jul
19
TTT Part 19 of n – Text Searches
Filed Under System Administration, Computers & Tech on July 19, 2014 | 1 Comment
In the previous two instalments (17 & 18) of this series we learned how to represent patters with regular expressions, or, to be more specific, with POSIX Extended Regular Expression (or EREs). We used the egrep
command to test our regular expressions, but we didn’t discus the command itself in detail. Now that we understand regular expressions, it’s time to take a closer look at both egrep
, and it’s older brother grep
, both commands for filtering and searching text.
May
10
TTT Part 18 of n – More REs
Filed Under System Administration, Computers & Tech on May 10, 2014 | 4 Comments
In the previous instalment we introduced the concept of Regular Expressions, and started to learn the POSIX ERE regular expression language, noting that POSIX ERE is a sub-set of the very commonly used Per Compatible Regular Expression (PCRE) language.
In this instalment we’ll learn more POSIX ERE syntax, and have a look at some examples of REs in GUI apps.
Apr
27
TTT Part 17 of n – Regular Expressions
Filed Under Computers & Tech, System Administration on April 27, 2014 | 5 Comments
This instalment is the start of a series of instalments relating to searching from the command line. Searching is all about patterns, and that means getting to grips with Regular Expressions (also called RegExps, RegExes or REs for short). Regular Expressions are languages for representing patterns, and are used throughout IT, not just on the command line. While this series focuses on the Terminal, an understanding of regular expressions will be helpful in many other places, from programming languages to GUI apps like programming editors, search utilities or file re-namers. It’s going to take us two instalments to properly describe regular expressions, but when we’re done we’ll have gained a very useful skill.
Feb
8
TTT Part 16 of n – Crossing the Streams
Filed Under System Administration, Computers & Tech on February 8, 2014 | 2 Comments
In the previous instalment we introduced the concepts of streams, and looked at how every process has references to three streams as part of their environment – STDIN
, STDOUT
& STDERR
. We went on to introduce the concept of operators that manipulate these streams, and we focused on the so-called ‘pipe’ operator which connects STDOUT
in one process to STDIN
in another, allowing commands to be chained together to perform more complex tasks. We mentioned the existence of operators for connecting streams to files, and the possibility of streams being merged together, but didn’t go into any detail. Well, that’s what we’ll be doing in this instalment.
Feb
2
TTT Part 15 of n – ‘Plumbing’
Filed Under System Administration, Computers & Tech on February 2, 2014 | 2 Comments
Right back in the very first instalment we described the Unix philosophy as being Lego-like, that is, having lots of simply commands that do one thing well, and then assembling them together to do something really powerful. So far, we’ve only been working with a single command at a time, but that changes with this instalment. We’ll be introducing the concept of streams, which can be used to connect commands and files together.