CLI

Latest

  • Use tmutil to take control of Time Machine in Mountain Lion

    by 
    Mike Schramm
    Mike Schramm
    11.07.2012

    Time Machine works best when you use it as it's designed: You simply let it run in the background and do its thing, only bothering it when you have to go back and get an old version of a document out. But if you ever want to do anything a little crazy with Time Machine ("adopting" a backup history on a migrated machine, for instance) it can be a little cranky. For those situations, says researcher Simon Heimlicher, there's a cool little Terminal command called "tmutil." The command, which was introduced in OS X 10.7 Lion, allows you to reconnect your computer to older backups if you swap hard drives or upgrade your Mac. While Lion and Mountain Lion will give you the option to inherit old backups when you migrate your machine, it's nice to be able to do it manually if you need to. It also allows for a few other functions, like combining and comparing backups, manually restoring items and adding or removing exclusions directly. Our buddy Cory Bohon points out a few more undocumented commands for checking your backup status. It should be noted that the improper use of "tmutil" could very easily munge your backups beyond salvaging, so be cautious. If you use Time Machine quite a bit, especially in those crazy ways it's not always meant to be used, it sounds like "tmutil" is well worth learning about.

  • Monday man page: curl

    by 
    Michael Rose
    Michael Rose
    03.05.2007

    Today's man page covers one of my favorite utilities: curl. No, it's not a haircare product -- it's one of the most flexible download tools in the kit bag, with the ability to handle almost any protocol that can be addressed via a URL (hence the name, short for "client for URLs"). If there's a server out there that's reachable via HTTP, HTTPS, FTP, SFTP, SCP, and lots of other alphabet soup, curl can talk to it. curl http://www.tuaw.com/2007/03/05/monday-man-page-curl/ -- display the source of this very article in Terminal curl ftp://ftp.panic.com -- list the contents of a remote FTP site, in this case one with a pretty good FTP client curl -o ~/Desktop/curl-man.html http://curl.haxx.se/docs/manpage.html -- copy the curl manpage to your desktop; if you use capital -O, the local file mirrors the remote filename curl has an excellent usage manual at its site, detailing examples of use and advanced techniques. While there are zillions of ways to use curl in site testing, analysis and uploading, my favorite way of using it is as a quick file downloader. Read on for the details.

  • Monday man page: open

    by 
    Michael Rose
    Michael Rose
    02.12.2007

    Just a quick hint for today's man page: the open command does just what you might think. It opens files, directories, applications or URLs; no muss, no fuss. For files, you can specify an application to open them with the -a flag (or just trust LaunchServices to pick the right app). If you want to, the -e flag will force them to open in TextEdit. open ~/Desktop/MyWordDoc.doc [will open in MS Word] open -e ~/Desktop/MyWordDoc.doc [will open in TextEdit] open ~/Desktop/*.doc [opens every Word document on the desktop, in Word] open http://tuaw.com [well, give it a go!] I use open in installation scripts or other situations where I want a GUI application to come up at the end of a process. For example, open /System/Library/CoreServices/Software\ Update.app/ launches Software Update and begins checking for available patches. Sure, you can force an update with 'softwareupdate -i -a' anytime, but maybe I want to give the person sitting at the console an opportunity to select the updates needed, or cancel out of the possibly-lengthy update cycle until it's more convenient. You could also use the URL functionality to take people to a 'readme' website... the possibilities are manifold.

  • Disk Order - an advanced Finder replacement

    by 
    David Chartier
    David Chartier
    06.01.2006

    Disk Order is another app that takes a stab at replacing the Finder, but doesn't seem to take things quite as overboard as PathFinder. With tabbed file browser windows, built-in FTP client, command line tools and more, Disk Order should have a few things to offer anyone who feels like the Finder is the ugly duckling of Mac OS X.A full-featured demo of Disk Order is available, while a license costs $22.57.[via MacMerc]