Are you prepared for Wrath of the Lich King? WoW Insider has you covered!
Posts with tag shell

dsh: dancer's shell gives you power over multiple Macs

This month's MacTech magazine offers a feature article by Edward Marczak on using dsh, the "dancer's shell" or distributed shell utility, to batch-administer machines in a single blast without having to hit each one, or use a pricey management tool such as ARD or LANrev. Although dsh isn't included with Mac OS X or available as a binary or port build, it does compile cleanly on the Mac and should work well out of the box.

The idea behind dsh is to take a list of targets (machines you can reach via SSH), and run a command or extended script on all of them at once. This is functionality that's wrapped up in a nice GUI in Apple Remote Desktop; it's deeply powerful and very handy. Supposing you wanted to check the uptime for a bunch of your lab boxes -- manually, you'd have to run around, or SSH to each one and run the 'uptime' command. With dsh, you make your machine list (optionally, loading your SSH public key on the machines ahead of time to avoid password prompts) and run one command:

dsh -Ma uptime

Very handy. The full article isn't online yet, but it's worth seeking out a copy of the magazine if you're interested in automation of enterprise Mac admin tasks.

DTerm: give your Mac a little shell love

DTerm screenshotDTerm is a utility just released by Decimus Software Inc. It's a Leopard-only app that provides a hotkey-triggered HUD which allows shell commands to be run from anywhere in OS X. In case you're wondering why, just imagine what less window switching and screen clutter could mean for productivity on jobs that require both Finder and Terminal. Yes, you can do a lot with Quicksilver, but DTerm provides bash name completion with a dropdown, context sensitivity to your current path and full output with clipboard features. You can also type ⌘-↩ in the HUD to run the command in the Terminal, which will open up to your current path.

DTerm is all about reducing effort, really. The process of running a command in the current directory is reduced to just a few keystrokes and there's no need to grab the mouse or switch to another application. Better Path Finder integration would be nice, but the developers tell me that it's Path Finder's own use of the Accessibility system that prevents that right now.

DTerm requires Leopard and has a free demo (up to 50 commands) after which the program costs $20. Visit the DTerm page for the download and more info, including a speedy video that will satisfy your secret bash-voyeurism fetish and won't waste much of your time.

A (slightly) simpler command-line Spotlight search

Erica mentioned mdfind a little while ago. It's not a brand new tool, but there hasn't been a great deal of discussion surrounding it. For shell scripters and Terminal junkies, it's a goldmine of search goodness that can make you never want to key out find . -name "letsgogetcoffeewhilewewait.rb" or even locate didcronupdatethedb.yet again.

There are two mdfind options mentioned at Mac OS X Hints that are worth a mention, one found only in the man page, and one found only in the usage info. The former being "-interpret", which allows the advanced Spotlight query syntax to be used on the command line as if typed into the Spotlight window, turning mdfind "kMDItemContentType == 'public.jpeg'" into mdfind -interpret "kind:jpeg". Its opposing force would be "-literal", which forces a literal interpretation of the query string. Any qualified Spotlight query should be usable with "-interpret", so go ahead with mdfind -interpret "kind:image flash:1 modified:<=1/1/08 ex-girlfriend" to find those late-night pictures of last year's special someone. That would take a lot of metadata work to pull off without "-interpret".

The second option mentioned isn't in the man page, but you'll see it in the usage info if you run mdfind with no parameters. It's the "-s" option that loads saved searches. It will look in ~/Library/Saved Searches unless a path is specified. So you can save a search in Spotlight called "PDFs from yesterday" and run mdfind -s "PDFs from yesterday" to launch the same search at the command line. See, I had to throw a "normal" search in there to keep you on your toes.

Terminal jockeys can mix these up with a few pipes, stir in some perl and sprinkle in a little awk to get some really great Spotlight soufflé. Of course, if you don't like the command line and you're still reading this, you're a downright hardy trooper and I commend you. Go have a cup of coffee, you deserve it.

[via Mac OS X Hints]

ssh on iPhone

Over at the #iphone channel at irc.osx86.hu, the thoroughly awesome NerveGas has figured out how to enable ssh on the iPhone without using restore mode. The secret lies in overwriting an existing binary and plist to trick the iPhone into calling chmod on the Dropbear ssh server and making it executable.

At this time, NerveGas has used Nightwatch's compiler to create iPhone-compatible versions of curl and ps as well as a number of other useful Unix utilities. (He's working on grep, as I write).

So what does this mean? Well, once you've got ssh installed on your iPhone and active, you can access your iPhone from a shell on your Mac. You can send and retrieve files using scp or sftp. And you can use the compilation toolchain to build other Unix utils or even your own software. It's just a short matter of time until perl and other command-line utilities are iPhone-ready.

Continue reading ssh on iPhone

Terminal Tip: Finding by Time

Have you ever lost track of a file that you were just working on? Or were you ever curious about which files an installer has just added or modified? The command line find command offers a simple way to track down any files created or updated within the last few minutes. Its amin and cmin flags tells find to locate files that changed with a certain number of minutes, e.g. to search within 10 minutes: find / -cmin -10 or find /Users/ericasadun/ -amin -3. The - before the time says to find within the time period (with, say, the last three minutes) rather than to look for exact time matches (at 3 minutes ago exactly).

TUAW Features


Mac 101 ask-tuaw
Mac News
WWDC (250)
.Mac (57)
Accessories (635)
Airport (74)
Analysis / Opinion (1328)
Apple (1636)
Apple Corporate (555)
Apple Financial (187)
Apple History (45)
Apple Professional (53)
Apple TV (160)
Audio (446)
Bad Apple (118)
Beta Beat (149)
Blogging (84)
Bluetooth (16)
Bugs/Recalls (56)
Cult of Mac (869)
Deals (214)
Desktops (115)
Developer (251)
Education (98)
eMac (10)
Enterprise (137)
Features (396)
Freeware (381)
Gaming (360)
Graphic Design (31)
Hardware (1281)
Holidays (37)
Humor (576)
iBook (65)
iLife (234)
iMac (184)
Internet (325)
Internet Tools (1309)
iTS (967)
iTunes (796)
iWork (21)
Leopard (366)
Mac mini (112)
Mac Pro (53)
MacBook (202)
MacBook Air (79)
Macbook Pro (220)
MobileMe (16)
Multimedia (439)
Odds and ends (1437)
Open Source (277)
OS (910)
Peripherals (208)
Podcasting (182)
Podcasts (89)
Portables (197)
PowerBook (135)
PowerMac G5 (50)
Retail (577)
Retro Mac (48)
Rig of the Week (42)
Rumors (629)
Software (4304)
Software Update (406)
Steve Jobs (252)
Stocking Stuffers (50)
Surveys and Polls (97)
Switchers (112)
The Woz (34)
TUAW Business (235)
Universal Binary (281)
UNIX / BSD (61)
Video (902)
Weekend Review (81)
WIN Business (47)
Wireless (83)
Xserve (39)
iPhone/iPod News
iPhone (1485)
iPod Family (2024)
App Store (16)
SDK (14)
Mac Events
One More Thing (27)
Liveblog (1)
Other Events (226)
Macworld (489)
Mac Learning
AppleScript (2)
Ask TUAW (101)
Blogs (85)
Books (26)
Books and Blogs (62)
Cool tools (443)
Hacks (459)
How-tos (482)
Interviews (43)
Mods (185)
Productivity (586)
Reviews (107)
Security (153)
Terminal Tips (58)
Tips and tricks (563)
Troubleshooting (166)
TUAW Features
iPhone 101 (26)
TUAW Labs (3)
Blast From the Past (17)
TUAW Tips (141)
Flickr Find (34)
Found Footage (80)
Mac 101 (88)
TUAW Interview (31)
Widget Watch (198)
The Daily Best (1)
TUAW Faceoff (4)

RESOURCES

RSS NEWSFEEDS

Powered by Blogsmith

Sponsored Links

The Unofficial Apple Weblog (TUAW) bloggers (30 days)

#BloggerPostsCmts
1Cory Bohon862
2Robert Palmer6046
3Steven Sande5623
4Dave Caolo370
5Scott McNulty370
6Mat Lu348
7Erica Sadun282
8Brett Terpstra210
9Mike Schramm212
10Michael Rose1334
11Christina Warren1242
12Joshua Ellis54
13Lisa Hoover26
14Chris Ullrich12
15Jason Clarke11

Featured Galleries

Macworld 2008 Keynote
Macworld 2008 Build-up
Apple Vanity Plates
DiscPainter
Macworld Expo 2007 show floor
The Macworld Faithful in Line
iPhone First Look
AT&T 3G Coverage Map
MobileMe Guided Tour UI Changes

 

    Most Commented On (7 days)

    Recent Comments

    More Apple Analysis

    More from AOL Money and Finance

    Weblogs, Inc. Network

    Other Weblogs Inc. Network blogs you might be interested in: