Skip to Content

Summer Budget Travel Tips from Gadling
AOL Tech

unix posts

Filed under: iPod Family, iPhone

3.0 firmware release expected at 10am PT/1pm ET, quick Terminal tip to check

Hey, iPhone 3G owners: Please do not download the 2,1 firmware files listed below. They are for the 3G S and will not work on your phone. Read the whole post for details. The correct firmware for the 3G will start with "iPhone1,2" instead.

If you were up all night waiting for the new iPhone OS to arrive, you're in good company -- we were too, until we began getting Twitter reports from users in Hong Kong and Sweden that the local carriers sent out SMS alerts to their customers suggesting when they could download 3.0. Those times both align with a 10 am PT/1 pm ET go time, and that's when we're calling it for now; Engadget concurs. That's why you're still seeing 2.2.1 as the most current version in iTunes; the new version hasn't been released yet.

Those with a command-line bent and an inability to wait without doing something can launch Terminal and type in the following every few minutes to see whether 3.0 has launched, rather than repeatedly clicking the Check for Upgrade button in iTunes (note that the up-arrow in Terminal reloads the previous command):

curl -s -L http://phobos.apple.com/version |\
grep -i restore |\
grep '_3.' | open -f

The results will look something like URLs ending with this:

iPhone2,1_3.0_7A341_Restore.ipsw
iPhone2,1_3.0_7A341_Restore.ipsw

The model number indicates which unit has downloadable firmware. As of right now, only the iPhone 3G S firmware has been updated. That's the 2,1 iPhone model. Yes, the 1,2 iPhone 3G model was considered a revision of the first generation 1,1 iPhone as it only had moderate hardware changes. The two iPods are 1,1 and 2,1 for the first and second generation.

(No, for those wondering in the comments, you cannot download the 2,1 firmware and install it on your iPhone or iPhone 3G -- it will only work with the 3G S.)

To download, copy the URL and paste it into Safari's download window or use any other favorite method to retrieve the firmware. Then hold the Option key and click Update in iTunes. Navigate to the firmware (the ipsw file), select it, and 3.0's good to go. Of course, you can also download directly through iTunes as soon as the update is available.

Filed under: Software, Developer

ExpanDrive 2.0 expands to Amazon S3

I had to do some extensive testing before I got too excited, but after a conversation with the developers I'm pleased to announce that ExpanDrive 2.0 is out. We've mentioned it before, but to recap: ExpanDrive allows you to mount remote servers as drives directly accessible in Finder. With a completely rewritten (again) SFTP layer, the existing FTP support and new Amazon S3 (Simple Storage Solution) support, it's even more useful than the last time we mentioned it. One of the developers, Jeff Mancuso, mentioned to me back at the last WWDC that the S3 support was in the works; it's great to see it come to fruition.

In my testing, I found that a previously-existing S3 option, JungleDisk, can cause conflicts with ExpanDrive's S3 support. JungleDisk users should note that there are some issues, but they seem to clear up if you create vanilla buckets in your account and use those with ExpanDrive. I personally found that I was willing to give up JungleDisk entirely at this point, preferring this direct-mount with all of the perks, including a contextual menu in Finder for quickly setting public read/write permissions.

I can attest to the fact that it's faster, and that the S3 support is working (wonderfully, without JungleDisk). ExpanDrive 2.0 is a $39.95 purchase (well worth it if you deal with remote UNIX systems or S3), and a $19.95 upgrade for existing users. There's a free trial available.

Filed under: Analysis / Opinion, Software, Freeware, UNIX / BSD, Apple

Tweets (and whatever else you want) on the desktop with GeekTool


Mat posted a while back about the magic of GeekTool -- it's an app that allows you to run Unix scripts and show logs in a good-looking pane right there on your desktop. Mac OS X Tips recently did a post about how to put your iCal events up there using a script called iCalBuddy, but industrious reader Ben G. has taken this even a step further, and sent along a link to a similar script called twitterbuddy, which -- as you may have guessed -- will send your latest tweets to GeekTool.

As a result, he's got the desktop you see above -- both tweets and iCal events sitting in a transparent pane on top of his desktop background. It will require a little Terminal tripping, but it's pretty easy to do. Just install and set up GeekTool the way you like it, and then make sure the buddy scripts are installed. From there, you can create a New Entry in GeekTool, and run whatever commands you want. It's incredibly flexible, too, because it'll put any Terminal commands you can throw at it right there on your desktop. If you're looking to fill in some of that unused Desktop space, give it a look.

Filed under: Terminal Tips, AppleScript

Revisiting the randomized signature AppleScript, now with API goodness

When I shared an AppleScript last week which created randomized signatures using TextExpander, I promised to revisit it when the iheartquotes.com API started working again. It's working right now, but it seems to go up and down; check this link before you try the script and make sure you get a quote, not an error message.

As before, when used with a TextExpander snippet set to the AppleScript type, this script will provide a random quote, this time pulling it from the Internet rather than our own list. The script is essentially the same, so I'm only going to explain the part which changed; visit the previous article for a rundown on the rest:

set _date to do shell script ¬
"date +'Sent on %A, %b %d at %l:%M %p'|tr -s ' '"

set _quote to ""

try

set _quote to do shell script "curl -s \\
'http://www.iheartquotes.com/api/v1/random?source=macintosh&max_lines=4'"

set {astid, AppleScript's text item delimiters} ¬
to {AppleScript's text item delimiters, return}
set _quote to paragraphs 1 through -3 of _quote as string
set AppleScript's text item delimiters to astid

end try

set _out to "
-Brett

" & _date & "
________________________________
Brett Terpstra | myemailaddress@mywebsite.com
The Unofficial Apple Weblog | http://www.tuaw.com

" & _quote

return _out

The curl call

Here's the part which makes this more interesting than it was before:

set _quote to do shell script "curl -s \\
'http://www.iheartquotes.com/api/v1/random?source=macintosh&max_lines=4'"

First off, that really should be all one line, but is split here for formatting purposes. You can remove the double backslash (\\) and merge the lines together if you like. What this does is use AppleScript's ability to run shell scripts (Unix commands) to make a curl call to retrieve a response from the iheartquotes API. Note the "try" statement surrounding that section; it will just return our regular signature without the quote if anything goes wrong. If it gets a response, it stores it in a variable (_quote) and then trims off the last line, like this:

set {astid, AppleScript's text item delimiters} ¬
to {AppleScript's text item delimiters, return}
set _quote to paragraphs 1 through -3 of _quote as string
set AppleScript's text item delimiters to astid

The first two lines (actually one line) are shorthand for setting "AppleScript's text item delimiters" -- the character that AppleScript uses to separate text items in a block of text -- to the return character and store the current text item delimiter in a variable so we can restore it with the last line. Using the paragraphs command, which automatically uses the return key to separate paragraphs, we turn the quote into a list of paragraphs, starting with the first and ending with the third from last. This is because the last two "paragraphs" are always an empty line and a permalink (even if you use the API's parameters to turn off the permalink). The last part of that line, "as string", is where the text item delimiters come into play, putting the list items back together with a return after each one, reconstructing the original formatting.

Note: You could do the same thing by adding |sed -n '$!p' to the end of the do shell script line, right before the last double quote. I suppose you might as well, as long as you're dipping out to the shell anyway ...

From there it's the same as before, just building a final output string from the pieces we've created. This method provides a much wider variety of randomized signatures than constructing your own list by making use of a small section of the wide array of data on the interwebs. The use of curl in an AppleScript can open a lot of possibilities, such as posting to Twitter in various ways. or shortening urls on the fly. Have fun.

Filed under: Analysis / Opinion, OS, Software, Security, Universal Binary, Developer

Cocktail 4.3 Leopard edition released

It's Cocktail time yet again -- the intrepid folks at Maintain are updating the Leopard version to 4.3, and bringing more utility than ever to the already extremely popular and versatile Unix function and OS X tweaking app. The new version adds the ability to clear harmful files off the system (including some nasty trojans), lets you clear out the CrashReporter and HungReporter logs, and fixes a few QuickTime compatbility issues as well.

The update is highly recommended for all users of the Leopard Edition, and available right now from Maintain's website. If you haven't yet taken the plunge on getting access to all of the weird and wonderful Unix widgets running inside your computer -- everything from cron jobs and maintenance tasks to network optimization -- the app itself is available for a single-user license fee of $14.95. Considering all of the things this app does (not to mention how often they update), that's a bargain.

For those elite geeks who feel like going free of charge and foregoing the pleasant interface to the UNIX underpinnings of Mac OS X, you can accomplish some of the same maintenance and cleanup tasks with CLIX.

Filed under: Analysis / Opinion, Software, Cool tools, UNIX / BSD

Maintenance utility Cocktail 4.1.4 released

All the way since back when I started using a Mac, the program that's been most recommended to new Mac users in my experience isn't Adium, Transmit, or Quicksilver (although those are certain all terrific apps/reasons to be a Mac owner) -- Cocktail is the one that I've seen on the Top 10 Mac apps most often. And there's no question that while Adium and those other apps might be flashier or more UI-driven, Cocktail is the nitro you toss in your car's fuel line to supercharge all of the stuff under the hood. From disk repairs and standard maintenance, to network optimization and cache and log file clearing, Cocktail is exactly the kind of program you buy a Mac for -- it gives you control over almost everything going on in your computer.

They've just updated to 4.1.4, with a whole slew of optimizations to show for it -- the application itself has shrunk in size by 50%, and there are lots of upgrades for faster and more reliable performance. Additionally, compatibility with FAT32 volumes have been addressed, and they've upgraded Automator actions, so they've given you even more ways to control everything you've got.

Great app, well worth the $14.95 for a single-user license. All the other signature Mac apps will let you do your daily tasks in style and with a little flair, but Cocktail is the one that will help you do them quickly and cleanly.

Filed under: Software, Cool tools, Odds and ends, Freeware, Troubleshooting, Terminal Tips

Freeware Find: IceClean 3.0b

IceClean 3.0.6Most of us know that we should perform regular maintenance on our Macs, usually simple things such as doing backups and shaking pizza crumbs out of the keyboard. But did you know that there are a number of UNIX System Tasks that are available for keeping your Mac running at peak performance?

A lot of Mac users don't want to pull up Terminal and type arcane text into the command line, so MacDentro has a GUI front end that you can use to run those commands and keep your Mac cruisin'. IceClean, now at version 3.0.6 has menus for OS X Maintenance, Cleanup, Security and Network, and Utilities, all of which are packed with menu choices or keyboard shortcut equivalents that make mundane maintenance chores simple to perform.

There are other apps available -- Maintenance and MacJanitor come to mind -- that perform similar tasks, but neither of those programs comes close to the depth of capability of IceClean.

The price is right, too - it's free, although you might want to send the MacDentro folks a donation if you find yourself using IceClean regularly. Download IceClean here.

Tip of the hat to our very own Victor Agreda for this find!

Filed under: Humor, UNIX / BSD

The 25-year-old BSD bug

Today in 1983, "Beat It" by Michael Jackson may have topped the charts, but a slight bug in the *dir() library was found only a few days ago by OpenBSD developer Marc Balmer (no rela -- oh, wait). OS News has the entire amusing tale of the bug in BSD (the UNIX foundation of Mac OS X) that's been alive and kicking for nearly 25 years. Balmer contacted Marshall Kirk McKusick, the original developer of the *dir() library, who confirmed the error.

Thankfully, the fix was simple, but Balmer kidded, "[s]orry that it took us almost 25 years to fix it."

Thanks, Cameron!

Filed under: Software, UNIX / BSD

Here comes your man (viewer)


Man pages have been around since before I was born (circa 1971, actually). The people who will take an interest in this post are most likely familiar with the 'man' documentation format for most UNIX commands. While little has changed in the form and function of the man page – besides spawning some offshoots like GNU's info – the options for reading them in a more pleasant GUI environment have grown more diverse. Mac OS X users have a few options beyond typing 'man xyz' into the Terminal or using man pages on the web...

There are Cocoa applications like Man Viewer, Man Handler and ManOpen which allow you to search for and browse man pages in a way more familiar to OS X users. They all perform text searches within an opened page, Man Handler having the most Leopard-friendly results. To the best of my knowledge, only ManOpen allows for Apropos searches which allow you to find man pages based on their subject matter. I also like the ability to open several man pages simultaneously, which ManOpen and Man Handler provide but Man Viewer does not. Rather, Man Viewer provides a single-window interface, which has its upsides as well.

Most of the Cocoa viewers do not handle hypertext links within the man pages (ManOpen provides related links). For a fluid solution in that area, there's Bwana or Sogudi (the Safari 3 version of Sogudi is currently a beta), tools that integrate with Safari to allow the opening of man pages right in the browser with code highlighting and links to related pages. While Bwana is an application, Sogudi is an InputManager which allows and both allow you to type man:mdfind in the url field to load a pretty (man2html) version of mdfind's man page (with Bwana, you can also use 'open man:mdfind' from the command line) . And with both you get a tabbed interface and great search features to boot. If you've already got Safari open for other purposes, it's a great way to make use of the browser. By the same token, it's a lot of app to load if you just want to remember an ls switch.

Another option – which may be great in some instances and fairly worthless in others – is Man2PDF. Basically, it produces a well-formatted PDF of the selected man page. Perfect for printing and viewing with Preview, but not the best choice for quick consultation.

Were I asked to pick a winner, and Safari was already running, I'd say Sogudi wins for good looks (inherited, in part, from Safari) and great usability. ManOpen wins in the standalone category with its Apropos search and hypertext links.

Of course, a vanilla man command wins for easy accessibility where you need it most.

Filed under: OS, UNIX / BSD, Leopard

New eBook explains Leopard's permissions

Despite John Gruber's longstanding assertion that "Repair Disk Permissions is voodoo," Brian Tanaka has published "Take Control of Permissions in Leopard" for the Take Control series of eBooks. It's part troubleshooting (how to delete stuck files, for example), part tips and tricks (the best ways to keep files private) and part theory. It's only $10US for 87 pages of very useful information.

For example, you might learn that repairing permissions with Disk Utility won't change the permissions to any of your user-centric files -- it's meant to restore [Apple's] application and system file preferences permissions to their as-delivered condition. Even if you do think that Repair Permissions is nonsense, it'll be nonsense you fully understand.

[Update: John Welch pointed out the typo in the 2nd paragraph; of course, Repair Permissions changes permissions, not preferences.]

[Via MacMinute]

Filed under: Features, Terminal Tips

Terminal Tips: creating a Spotlight-based gallery

As sexy as Leopard is to me, I'm just as enamored with the powerful UNIX underpinnings of the operating system. I've been toying with a few ways to combine a couple of my favorite command line utilities into something that might prove useful. I won't claim I've achieved a truly practical usage yet, but I thought I'd offer some possibilities. Even for the Terminal-timid, you just might find the potential intriguing enough to slap on some binary camouflage and go all "Code Warrior" for a bit.

I'm going to elaborate on some image processing techniques using results from Spotlight searches. In order to make use of the examples without modification, you'll need to have a collection of images containing IPTC keywords (or very descriptive filenames). With a little modification, the searches can be expanded to other criteria. But if you can't run a spotlight search and find at least 8 jpegs with one keyword, you'll have to accept this as a proof of concept. But, that being said, let's get started.

Continue readingTerminal Tips: creating a Spotlight-based gallery

Filed under: Software, Internet Tools, UNIX / BSD, Leopard

Cocktail Tiger edition goes to 4.0.1, Leopard edition 4.0.2

Just in case you haven't yet upgraded to Leopard, but still love using Cocktail (that crazy mix of Unix functions for OS X), Maintain has released version 4.0.1 of their Tiger edition. They've fixed some compatibility problems with QuickTime, and added support for clearing font caches in Microsoft Office 2008. The update is now available from their website, and is, they say, "strongly recommended" for all Cocktail (Tiger edition) users.

Cocktail's Leopard edition is at version 4.0.2-- that update fixed these same problems last week, as well as fixing a network optimization bug for DSL (PPPoE) users.

[Via MacMinute]

Filed under: OS, UNIX / BSD, Leopard

Apple releases Darwin 9.0, Unix foundation of Leopard

Back when the Intel Macs first appeared there was a delay from Apple in releasing Darwin 8, the open-source BSD/Unix foundation of Tiger. Crazy theories were adduced, and bad intentions attributed to Apple, but eventually Darwin 8 for Intel Macs was released. Apple seems to have moved even faster with OS X 10.5, and just a couple of weeks after the commercial release of Leopard, Darwin 9.0 is now available at Apple's Darwin page. So if you've ever wanted to root around in the source for the foundations of Leopard, here's your chance.

[via Digg]

Filed under: Software, UNIX / BSD, iPhone

iPhone BSD package updated

iPhone developer NerveGas has updated his BSD subsystem in preparation for the new iPhone jailbreak. This new release offers tighter code fixes ("less cruft"), a few additions and a few omissions of less useful items. He also removed libarmfp dependencies. In other words, this release brings iPhone users closer to the standard BSD world.

Among other changes, NerveGas has rebuilt the kext tools, added reboot, mknod, a working chown and vmstat. Other new items include chflags, lsvfs, mkfifo (and friends), tee, renice, and cap_mkdb. You might notice one big missing item: minicom. NerveGas will be releasing minicom as a separate package. NerveGas has also updated ssh.

Filed under: Hacks, iPhone

Play Audio URLs from the iPhone Command Line

You never know when instant karma is gonna getcha. Take my playaudio application. Yesterday, I was chatting with some developer buddies about maybe putting together an Internet radio application and discussing the fact that the Celestial iPhone framework is essentially QuickTime repackaged. While talking, I decided to try using my existing playaudio app with a URL rather than a local audio file. So I typed the following at the iPhone command line:

playaudio http://steiner.math.nthu.edu.tw/ne01/tjy/music/06.I%20Just%20Called%20To%20Say%20I%20Love%20You.mp3

And...it worked. Just like that, the instrumental-only cover began to play back through my iPhone speakers. Apparently, Apple has merged the concept of "local file" and "URL" a lot more closely than I'd thought. I haven't had any luck connecting to .pls or any other live radio feed but if you'd like to play back Internet-based files, playaudio works just fine.

Tip of the Day

Holding the Command key (aka the Apple key) and pressing Tab will cycle through your open applications. It's easier to Cmd-Tab if you are Copy (Cmd-C) and Pasting (Cmd-V) to and from various applications.


Follow us on Twitter!
TUAW [Cafepress]

Sponsored Links

Featured Galleries

DNC Macs
Macworld 2008 Keynote
Macworld 2008 Build-up
Google Earth for iPhone
Podcaster
AT&T Navigator Road Test
Bento for iPhone 1.0
Scrabble for iPhone
Tom Bihn Checkpoint Flyer Briefcase
Apple Vanity Plates
Apple booth Macworld 07
WorldVoice Radio
Quickoffice for iPhone 1.1.1
Daylite 3.9 Review
DiscPainter
Mariner Calc for iPhone
2009CupertinoBus
Crash Bandicoot Nitro Kart 3D
MLB.com At Bat 2009
Macworld Expo 2007 show floor
Apple Texas Hold 'Em

 

More Apple Analysis

AOL Radio TUAW on Stitcher