Penguin, small TECH.BARWICK.DE
Mac OS X
 

Recent posts

Categories

Archive

Syndication

 



Powered By

Info

Mac OS X Shortcuts

Essential Links

General
http://www.apple.com/ Apple main website
http://www.apple.com/macosx/ Apple: Mac OS X
Forums
http://discussions.info.apple.com/ Apple Discussions
http://forums.macnn.com/ MacNN Forums

Sunday, October 18, 2015  10:17 PM

Improving top output in OS X / macOS

The OS X "top" command default output is somewhat hard to decipher (and modify interactively) compared to Linux. A simple workaround is to launch it with:

top -o cpu

(or another field) which sorts on cpu activity rather than the PID (default).

htop is also available via MacPorts.


Posted in Mac OS X | add a comment

As mentioned previously, it's possible to install the usual set of command-line tools without the full XCode installation. However this seems to confuse Apache (at least with version 2.2), which is expecting to find a C compiler in the XCode folder:

checking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... x86_64-apple-darwin12.2.1
checking host system type... x86_64-apple-darwin12.2.1
checking target system type... x86_64-apple-darwin12.2.1

Configuring Apache Portable Runtime library ...

checking for APR... yes
  setting CC to "/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc"
  setting CPP to "/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc -E"
  setting CFLAGS to " "
  setting CPPFLAGS to " -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK"
  setting LDFLAGS to " "

Configuring Apache Portable Runtime Utility library...

checking for APR-util... yes
checking for gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc
checking whether the C compiler works... no
configure: error: in `/Users/ian/src/httpd-2.2.24':
configure: error: C compiler cannot create executables

Posted in Mac OS X | add a comment

Thursday, March 21, 2013  12:24 AM

Using MacPorts without a full XCode installation

As mentioned previously, it's now possible to install XCode's command line tools without installing the entire XCode environment. This is particularly handy when setting up an environment on a remote Mac. However it looks like MacPorts is still expecting to find the full XCode installation and will complain like this:

Some-Mac-mini:~ root# port install somepackage
Error: 
Error: No Xcode installation was found.
Error: Please install Xcode and/or run xcode-select to specify its location.
Error: 


Posted in Mac OS X | add a comment

Wednesday, March 20, 2013  11:30 PM

Install XCode command line tools via the command line

Occasionally I've needed to set up some kind of script or even a server application in a remote office, where the only computer with a UNIX-style environment is a Mac. Although OS X comes with a fair amount of tools built-in, these are usually not sufficient for the specialised configuration required, which means I need to compile some applications from scratch and probably install a command-line driven package management system such as MacPorts. To get this up and running of course, I need a compiler and associated tools, which are not built in. These are available from Apple as part of the XCode package; recently the non-IDE parts of XCode have been made available as a separate dmg file.


Posted in Mac OS X | add a comment

Sunday, March 2, 2008   2:08 PM

iTerm: using cursor keys in vi

One of the first tools I install on a fresh OS X installation is the excellent iTerm. However, "out of the box" the cursor keys (arrow keys) don't seem to work in many text-based applications such as vi/vim.

One solution (in 0.9.5) is as follows:

  • Click on Bookmarks, then Manage Profiles
  • Select Default from the Terminal Profiles section
  • Change the Type option below Terminal Settings to linux (sic)
In all newly-opened iTerm sessions the cursor keys should then work as desired.
Posted in Mac OS X | add a comment

Wednesday, June 1, 2005  11:55 PM

Black iBooks

An interesting (if not very easy) mod which should help prevent those dirty patches the off-white plastic is prone to:


Posted in Mac OS X | add a comment

Thursday, May 19, 2005   1:53 AM

Associating applications with filetypes

So, there I was wanting to double-click on a .rtf file and have it automatically open in NeoOffice/J (instead of the default, OS X's Preview, which isn't very good at text files). As that would be a system-wide setting, I spent some time looking in System Preferences - to no avail.


Posted in Mac OS X | add a comment

Friday, May 6, 2005  12:55 PM

Deleting files on digital camera media

A mystery: a SmartMedia card in a camera mounted via USB. Photos deleted (i.e. moved to trash), but no space on the card was released, even though no images were visible on the camera's index. Reformatting the card initially appeared to solve the problem, as it had previously been used in another camera (RIP), but as soon as the next lot of photos was downloaded, yet again no space was released.

Poking about with good old fashioned command line tools (ls -la) revealed a folder named .Trashes (sic) on the SmartMedia card, which was where all the deleted images were hiding. Obvious when you think about it - I hadn't emptied the trash for some time - but beeing a literal-minded person I assumed "deleted" files landed in some central trash folder (the trash icon is on the desktop after all).

Emptying the trash did then of course reclaim all the free space.


Posted in Mac OS X | add a comment