Not, this article is not about 1984. Nor do I believe there is anything but a revisionist history. Instead, this article is about the history command in OS X (and *nix). The history command is a funny beast. Viewing the manual page for history in OS X nets you a whole lotta’ nothin’ because it’s just going to show you the standard BSD General Commands Manual. But there’s a lot more there than most people use. Let’s take the simplest invocation of the history command. Simply run the command with no options and you’ll get a list of your previously run bash commands: history This would output something that looks…
-
-
Using sysdiagnose to Capture Performance Data In OS X
“My computer sometimes just runs slow,” “the fan on my laptop won’t turn off sometimes,” and “my network connection keeps dropping.” These are amongst the most annoying off problems to solve for our users because they are intermittent. And to exacerbate things, many of these users have these problems at home or at remote locations, making it difficult for systems administrators to see them. There is something I use in these cases, though, that has helped isolate these problems from time to time. Simply tell users to Control-Option-Command-Shift-Period when they have these problems. Doing so will run the sysdiagnose command and then open a Finder window with the output of the…
-
Using The serverinfo Command To Get, Well, Server Info In Mountain Lion Server
OS X Mountain Lion Server comes with the /usr/sbin/serverinfo command. The serverinfo command can be pretty useful when you’re looking to programmatically obtain information about the very basic state of an OS X Server. The first option indicates whether the Server app has been downloaded from the app store, which is the –software option: serverinfo --software When used, this option reports the following if the Server.app can be found: This system has server software installed. Or if the software cannot be found, the following is indicated: This system does NOT have server software installed. The –productname option can be used to determine the name of the software app: serverinfo --productname If…
-
Setting Up File Services in OS X 10.8 Mountain Lion Server
File Services are perhaps the most important aspect of any server because file servers are often the first server an organization purchases. There are a number of protocols built into OS X Mountain Lion Server dedicated to serving files, including AFP, SMB and WebDAV. These services, combined comprise the File Sharing service in OS X Mountain Lion Server. File servers have shares. In OS X Mountain Lion Server we refer to these as Share Points. By default: File Sharing has some built-in Share Points that not all environments will require. Each of these shares is also served by AFP and SMB, something else you might not want (many purely Mac…
-
Showing iTunes Track & Song Titles In The Dock
When I’m writing, I like to listen to music in the background. When writing, I also like to have everything minimized so I can quickly grab a screenshot of the desktop where needed. This means that when I run into a track that doesn’t work with whatever I’m writing that I would need to unminimize iTunes, click the next button and then re-minimize iTunes. Awhile back I found a better way but can’t remember where for attribution. So, part of my default user template and imaging framework now includes setting the iTunes Dock icon to show the track that I’m playing so I can easily go to the next song,…
-
Disable Rubber Band Scrolling In Lion & Up
10.7 and up have a little feature called elastic scrolling. When you get to the top of a page and you keep scrolling you see the linen background. There is a NAS devices whose web portals seems to be pretty shady overall, but specifically seems to lock up when this rubber band effect kicks in. So to disable: defaults write -g NSScrollViewRubberbanding -bool FALSE To disable the disable, or re-enable the effect: defaults write -g NSScrollViewRubberbanding -bool TRUE
-
Selecting Text in QuickLook
You’re searching for some content on your desktop and opening pages file after pages file and pdf after pdf in QuickLook. Finally you find that one juicy morsel. It’s a short script you just need to copy into your clipboard. But you can’t. The gods of technology are aligned against you, to make you hit command-O and then after waiting for the entire 3 seconds it takes Preview to open, you have to search within the document for that information. Holy crap, you just lost at least 5 to 8 seconds of your day. I guess now you have to cancel vacation or let your spouse know you’ll be home…
-
Automating Profile Manager Enrollment Through DeployStudio
When planning to migrate from managed preferences to profiles, one of the important aspects to consider is automated enrollment. One of the more important aspects of automating a traditional managed preferences environment is to automate the binding to directory services. You do not bind to Profile Manager; however, you do enroll devices. Much like binding computers to Lion Server’s Open Directory (by default), certificates and host names are important aspects of the enrollment process. Much as with local managed preferences, management via profiles can be done through the command line and without any involvement from a centralized source. I had written an article awhile back on using profiles from the…
-
Opening a Terminal Window From, Well, Terminal
Terminal is a great application. And we usually use Terminal for editing scripts and invoking things. But what about invoking Terminal from, well, Terminal. For starters, let’s look at opening a Terminal session to the root of the boot volume (aka /): open -a Terminal / The -a option, when used with the open command, allows you to define which application that the item defined in the following position will open in. For example, you could open an XML file in Xcode open -a Xcode /usr/share/postgresql/pg_hba.conf.sample You could then open Terminal by passing other commands into the command. For example, to open a new Terminal window to the current working…