Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Unix user looking for OSX/Mac tips... System
[Editor's note: Lots of good info in the comments!]

I'm a new user to OSX, and for that matter Macs too. People keep talking bout how they need help understanding the unix command line, and I understand that (it wasn't that long ago I was in the same boat), But I'm the opposite... A Unix user looking for power tips on macs. I've only had small amounts of experience with macs and am wondering about the advanced features like configurations, cool quick keys, etc.

Could you also point me to resources on the developer side of Macs as well that would be much appreciated. (ie. what the heck is zapping the P RAM anyways- Aussies insert joke here-, or a developer button?!?)

  • Currently 1.55 / 5
  You rated: 1 / 5 (11 votes cast)

Unix user looking for OSX/Mac tips... | 14 comments | Create New Account
Click here to return to the 'Unix user looking for OSX/Mac tips...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
pram and navagation services
Authored by: Anonymous on Nov 16, '00 01:26:06PM

zapping the p-ram is holding command-option-p-r on immediate boot so you hear the startup chimes more than once. its nvram which holds the date et al and can become corrupt. zapping once a month is recommended though i do it rarely unless i'm having a problem.

you can navagate classic finder (it is carboninzed too but i dont have OSX running yet) by using the keyboard entirely. just start typing till letters till you get the file you want. this only works for files in the immediate window or on the desktop if the finder is on top. its kind of like typing 'vi h' then hitting escape to get 'vi helloworld.c'.

[ Reply to This | # ]
Developer button
Authored by: Jay on Nov 16, '00 01:59:52PM

The Developer button is (on G3s & G4s)
next to the reset button on the front. Under
the MacOS it will bring up some kind of
CLI debugger. Under OS9 & earlier, if you
had a crash you couldn't force quit,
sometimes you could hit the developer
button, type "g finder" and all would be
well. The other trick was typing "SM 0
A9F4" then "G 0" (Those are both zeros.)

[ Reply to This | # ]
Developer button
Authored by: mingking on Dec 23, '02 01:33:23AM

The 'developer button' or 'programmer switch' on some Macs is actually an NMI (Non-Maskable Interrupt) switch that drops you into a kernel level debugger in pre-OS X. There is a very rudimentary debugger built into the ROMs of the machines that essentially only allows you to peek, poke and jump in memory. No sane developer ever uses that. If you need to do any real low-level debugging in the old OS you would normally install MacsBug which is a much more powerful low-level debugger that overrides the ROM one and gives you tremendous power - stack traces, formatted memory dumps, symbol dumps, macros and all sorts of stuff. Oh, the memories...

In later classic systems, Command-Power (there used to be a Power button on Mac keyboards, but no longer) would also bring you into the debugger. Command-Option-Delete would do a reset. Nice to be able to do those directly from the keyboard. But those didn't always work if the machine was so hosed that keyboard scanning wasn't happening. Hence the hardware switches.

Normal users might find themselves using the *other* small button that was on all Macs - the Reset button. That just hard rebooted your machine. Since the old OS was not memory-protected, it was actually not that uncommon that the machine would hang, hence people wound up using that switch far more often than they should have needed to. I'm not exactly sure why Apple brought that button out to the front panel on the older machines. It's pretty much the same as using the power switch or unplugging the thing. But it was a bit easier to access, being on the front or side panel on most machine whereas the power switch was usually on the back of the machine somewhere. Developers that wrote a log of buggy code probably used it a lot. (but not ME of course... ;-)

Doing a reset or NMI is not ususally (if ever) what you want to do in a Unix system like OS X, hence if your machine even has a programmer switch it does nothing in OS X (apparently the newer ones don't have them, at least not on the front panel). If you've got one, the reset button still does its thing, but again, it's not very common or useful in OS X.

In OS X you rarely have to hard reboot the machine. Almost always you can just kill the offending application or process. You can kill applications using the Force Quit item in the Apple menu, or hitting Command-Option-Escape as a shortcut, which will bring up a GUI way to kill applications that may be hung.

You can also use the command line to kill processes (some background processes don't show up in the Force Quit dialog). If the GUI is stuck you can ususally log in from another machine (using ssh) and kill the process. Sometimes this can save your butt, as killing processes is much less likely to make you lose data or corrupt your hard drive than hard restarting it. Killing processes from the command line is generally only for the fully initiated Unix geek. You have to know what PIDs and such are. (if interested, see the man page for 'kill')

If by chance you do get a hard hang in OS X (very, very rare), in the newer machines you can just hold down the power button for about five seconds and it will reboot.

[ Reply to This | # ]
Authored by: Anonymous on Nov 17, '00 01:59:27PM

It is unfortunate that you have turned to the Mac now. Due to the switch between Classic and current MacOS, Apple decided to revamp its gui and throw out all those cool things that made the Mac a mac.

Unfortunately there is no documentation out there that gives out those hints because I don't believe Apple included any.

As an old mac user this is both frustrating and frightening. The reliance on a command line for things is a step back and not a next step.

The only quickkeys I can offer are the ones ou see in the Menus. Other than that, option clicking to close a window closes all windows of similar types...

I could give you a million and one tips about the old GUI but this new one has fewer features than Windows. Good luck to ya.

[ Reply to This | # ]
New vs. old
Authored by: robg on Nov 17, '00 02:11:06PM

"ClassicMacUser" - the reason there are
no tips here about new vs. old is that the
purpose of this site is to discuss the new.

There are plenty of sites out there that are
covering the changes from old to new,
and the pros/cons of the switch.

MacOSXHints, however, is dedicated to
creating a public database of information
on how to use the new system; not a
database comparing the new to the old.


[ Reply to This | # ]
Oh, come on. Get with it...
Authored by: mingking on Dec 22, '02 09:03:48PM

I can understand some frustration in moving from old to new, but 'a step back'? Come on. There's plenty of the Classic stuff in OS X as well as plenty of advances. The fact that Apple has written an entirely new OS with a real future, plus it is 'mostly' the same as a Mac Classic is an admirable achievement and just the start of things to come. Try migrating from OS 9 to Windows XP. Now there's a paradigm shift.

You know, there are plenty of people that would *never* use a Mac just *because* it doesn't have a CLI. Apple needs to expand its customer base to be competitive and not get stuck in a bubble. They needed to make the changes they did, and they need to do it over time.

Now, you may not appreciate it, but a CLI can be immensely useful. It's just another tool at your disposal, like PhotoShop or whatever, and you can choose not to use it if you wish. But by denegrating it as 'backwards' just shows that you don't know how to use it, not that it isn't useful. I would highly recommend that you look into it - it may be able to help you too. Just think of it like learning any other application. Yes, it has a steep learning curve, but in the long run it is worth it. Or don't...

Over time more and more GUI things will happen in OS X. Apple's primary focus is in making their OS easier to use than 'the other dark meat'. But they also need to do things that make the platform viable for people other than the OS 9 installed base. OS X will just get better and better. That's great. The future looks very bright for OS X. But right now there are things I can do with it that could never be done on a Mac before because I have spent the time to learn how to use it. I suggest you stop whining and get cracking on learning some new stuff. Or don't...

[ Reply to This | # ]
MacOS keyboard shortcuts
Authored by: Anonymous on Nov 23, '00 08:35:59AM

Here you have the MacOS's 88 keyboard shortcuts:

Enjoy your stay in the wonderful world of mac!

[ Reply to This | # ]
starting os X apps from command line
Authored by: palott on Dec 22, '02 03:58:42PM

I just started using os X, after several years of using other versions of unix. Thus, I work from the command line most of the time and I'm trying to understand what the MacOS executables are doing so I can startup an app from the command line. I was able to run text edit from the line using


Everything works fine, I have the nice TextEdit bar at the top of my screen and life seems good. QuickTime, iTunes, and several other apps work the same way.

However, when I try to startup mozilla (and other programs I installed on my system), I get an error, or a non-gui version of the program:


I get an error

zsh: exec format error: /Applications/

I did the same proceedure for an editor program gvim, but instead of opening up the gui version, it sends me to the terminal version vi.

Any ideas what I'm doing wrong? Where am I supposed to install my programs? I've been downloading the tar.gz file into a download directory and then copying the folder to /Applications is this wrong? All the programs I install this way work fine from Finder, but something isn't working quite right from the command line.



[ Reply to This | # ]
starting os X apps from command line
Authored by: mingking on Dec 22, '02 09:12:40PM

You're going too deep by referencing the raw exectuable inside the bundle. Just use the 'open' command and it will do what you need. E.g.:

open -a Mozilla

The app may need to be in the Applications folder otherwise you may need to provide a full path. But I tried launching applications that were on the Desktop and it worked fine.

You can also just open a file and it will use the default application. E.g.

open foo.txt

and it will open in TextEdit.

See the man page for the options to the open command.

[ Reply to This | # ]
starting os X apps from command line
Authored by: palott on Dec 23, '02 01:07:25AM


open -a works like a charm


[ Reply to This | # ]
starting os X apps from command line
Authored by: mingking on Dec 22, '02 09:26:59PM
I downloaded vim from this site and it worked fine. Launched using 'open -a vim' while the app is still in a folder on the Desktop and never having been in my Applications folder. Is this the one your were having troubles with? If you want to use the X version of vim you will need to install XDarwin, but that doesn't seem necessary given the Carbonized version that is available from the above link. And of course you could make an alias to that command in your shell if you'd like to make launching it a bit easier.

[ Reply to This | # ]
CLI features and more
Authored by: mingking on Dec 22, '02 08:35:58PM

If you are a Unix guy then you will appreciate some of the nice things that help the command line integrate with the GUI. These may be posted as hints already, but these are some of the ones that I use the most being a Unix old-timer.

Doing 'open .' (or any path) in a shell will open a Finder window in the current working directory (or whatever path).

Just doing 'open <filename>' will open a file in the GUI with the default application. Sometimes it is easier to edit a .txt file or whatever using e.g. TextEdit instead of vi or emacs. See the man page for other 'open' options.

I don't exactly know where it can be found but there is an application that you can drag onto the Finder toolbar that when clicked will open a terminal shell at the cwd of the current Finder window. The one that is an app works best - there are also some that are AppleScripts but they are a bit clunkier.

You can save a terminal session that has e.g. emacs running. Not only can you launch that setup later from within the terminal, but a file called emacs.term will be created in your ~/Library/Application Support/Terminal folder. Drop that on your Finder toolbar and then click it and instantly get an emacs shell opened from the Finder.

In fact you can create any shell script and put it in your Finder toolbar and clicking it will launch it. You have to make the script exectutable.

You can drag and drop a file or folder from the Finder onto a terminal window and it will paste the path to the item into the shell. Great for inserting those super long paths with lots of spaces in them.

In vi you can paste text from the clipboard directly into vi. Great for copying text from a GUI app. You have to be in insert mode first. And you can also copy stuff from the terminal and then paste it into GUI apps.

There is a cool application called DesktopConsole that allows you to have logs displayed as part of your desktop. Very nice for monitoring syslog messages, httpd or ftpd access logs etc.

There's a cool app called ProcessWizard that gives you a fast GUI way to see all of your processes and renice them.

There's a cool app called OnMyCommand that adds a contextual menu that you can setup to run shell scripts.

What else... oh there's tons of Unix stuff available. Some needs to be compiled, some comes prebuilt. Check out fink.

And there's XDarwin - an X server that is just a double-click install away. Xeyes launches by default :-)

Have fun with ... uh ... MacNix... The best of both worlds for sure!

[ Reply to This | # ]
CLI features and more
Authored by: palott on Dec 23, '02 01:14:44AM

I was able to get fink to install ALOT of open source packages, f77, gnome, I also installed OroborOSX and XDarwin. Things seem to be working smoothly now. I think I'll like this OS, and its GUI it will just take a little time to get used to some of the mac way of doing things.



[ Reply to This | # ]
OSX for Unix Geeks - O'Reilly
Authored by: thwaite on Dec 23, '02 01:20:02PM

Not a slur - just the title of an O'Reilly book. I've not read it myself, but O'Reilly is pretty reliable. -- Online Catalog: Mac OS X for Unix Geeks

And for other mac stuff - columns as well as books:

(And as a Unix geek, we *know* you read manuals...)

[ Reply to This | # ]