Tag Archive: Command


Compare Contents of Two Directories from the Command Line

Compare directory contents from command line

To compare and list the different contents of two directories without the extra output you get through commands like diff, you can use the comm command instead. To get started, launch Terminal and type the following command, adjusting the directory paths as appropriate:

comm -3 <(ls -1 folder1) <(ls -1 folder2)

The output listed will be the files that are different in each folder, with files  [Read More…]

Finding Files from the Command Line

Search for files from the command line

Searching the file system for a specific document or file is easy and very fast. Though most users are best served using Spotlight from the menubar, there are times when either Spotlight isn’t working, you need more paramaters, you’re working in the Terminal, or

Searching For Files with find

The find command is very fast and easy to use, it’s straight from the unix world and  [Read More…]

Get Mac OS X Mountain Lion To Speak Text On Command [OS X Tips]

OS X has really good text to speech functionality for users with a visual or other learning disability, but it’s something that I think we all would benefit from at certain times. How about listening to a webpage when you’re folding clothes, or having your Mac your Twitter stream out loud while you do some sort of two-handed crafting project, like knitting?

Turns out, you can make this happen super easily with  [Read More…]

Legendary Name Drops onto The iPad in The Form of ‘MechWarrior: Tactical Command’ RTS Game

I remember playing MechWarrior 2 in the mid 90s. Man, what thrill — I spent days piloting horribly destructive giant robots around a 3D battlefield, firing rockets, blasting anything that moved with terawatt lasers.

Of course, that was on my old 386 PC clone, back when I still followed the dark side of the force and hadn’t jumped on a Mac yet. But the MechWarrior / BattleTech series of games has been  [Read More…]

Reboot Mac OS X from the Command Line

Reboot Mac OS X from the Command Line

Rebooting a Mac from the command line is fairly simple, though most users are best served just using the standard ? Apple menu method. Nonetheless, using the terminal command can be an invaluable trick for troubleshooting purposes, remote systems administration and management through SSH, and a number of other reasons.

From the OS X Terminal type the following:

sudo shutdown -r now

Enter the administrator  [Read More…]

Send an Alert to Notification Center from the Command Line in OS X

Send Alert to Notification Center in OS X

Using an excellent third party tool called terminal-notifier, you can post alerts and messages to Notification Center directly from the command line. This has a myriad of potentially valid uses, but one fantastic use-case is along the same veins of verbally announcing when a command has completed or sending a badge alert, but instead posting the notification to OS X Mountain Lion’s Notification Center.

  [Read More…]

Disable Sleep on a Mac from the Command Line with caffeinate

Caffeinate causes a Mac to avoid sleeping via command line

You’ve always been able to temporarily prevent a Mac from sleeping by using the pmset noidle command or a hot corner, but with OS X Mountain Lion, Apple has bundled a command line tool dedicated to sleep prevention much like the popular Caffeine app, and appropriately, named it caffeinate.

At it’s most simple usage, caffeinate just prevents sleep entirely, but you can modify  [Read More…]

What Are The Macs Command ? And Option ? Symbols Supposed To Represent?

Is this what the Option (?) symbol is supposed to represent?

The Apple Command key (or, as you might better know it, ?) has a beautiful and clear history. Originally, the ? key was an Apple symbol instead, but Steve Jobs thought that using the Apple logo as a keyboard shortcut in the original Macintosh’s menus was “taking the logo in vain” so he tasked the great icon designer Susan Kare to  [Read More…]

Sleep a Mac from the Command Line

Sleep a Mac from command line

Sleep can be invoked instantly on any Mac through the command line by running the pmset command or a very simple AppleScript. To try this yourself, launch Terminal and use one of the following commands, remember there is no warning, sleep is immediate:

pmset sleepnow

That is one of the most simple uses of pmset, which is a full featured power management utility.

You can also use  [Read More…]

Manage iOS Devices & Provisioning from the Command Line with Cupertino

Manage iOS Devices and Provisioning from the Command Line with Cupertino

iOS Developers typically have to login to Apple’s Developer Center website to manage provisioning and devices. That’s not terribly inconvenient, but it certainly could be easier, and that’s where Cupertino comes in. Cupertino is a third party command line interface to the Apple Dev Center and iOS Provisioning Portal, letting you add and list devices, profiles, certificates, and app id’s, all from  [Read More…]