• Mac OS X,  Mass Deployment

    What Is My Build Number?

    I have been known to occasionally ask what build number of Mac OS X that someone is using. The sw_vers command can be used to obtain this. Simply run: sw_vers And the BuildVersion will be listed. Or just to get the BuildVersion: sw_vers | grep BuildVersion Or to just get the number (useful in scripts that catalog such a thing: sw_vers | grep BuildVersion | cut -c 15-21 As one comment just indicated, you could also just use `sw_vers -buildVersion`. I guess I should review these commands every operating system or 4… Thanks Allen.

  • Mac OS X,  Mac OS X Server,  Mac Security,  Unix

    Using the cut Command

    A number of commands available for finding positions that you want in a line and extracting only a certain amount of text can be pretty cumbersome in terms of learning curve. This isn’t to say that once you get the hang of them that they’re terribly complicated but it can take a little while to get the hang of them. And when you need something fast, you might want an easy command for extracting text from lines. In these cases, consider cut. The cut command doesn’t do regular expressions (I guess you could argue that its ability to use a delimiter can be used as a regular expression) and so…

  • Mac OS X

    The Cut, Copy & Paste Daemon in OS X

    Ever seen com.apple.pboard in a launchctl list?  Wondered what it did?  This is the infamous clipboard (aka – pasteboard, or on the iPhone the NSPasteboard server).  If you unload the pboard entry in launchctl then you will no longer be able to cut, copy and paste.  pboard relies on the existence of and the accessibility to the user that initiated pboard (ie – root) to have access to the /tmp folder.  Therefore, pboard will be wonky without /tmp and without pboard you won’t be able to paste things.  So, when troubleshooting cut, copy and paste issues, first verify that /tmp exists and then verify that pboard is running using the…

  • Mac OS X

    April Fools – Trash Rather than Cut

    You can set the cut function of the Finder to move items into the trash rather than into the clipboard: defaults write com.apple.Finder AllowCutForItems true It’s not the nicest of jokes to play on people though… So to undo it: defaults write com.apple.Finder AllowCutForItems false Happy April Fools Day