PDA

View Full Version : Mac/Unix Help




scan
Dec 8, 2006, 07:36 PM
Hi, can someone help me understand how Mac works? I am quite familiar with UNIX systems and I am trying ot figure out how the UNIX side of Mac workds.

For example, when I open up firefox (from GUI) and I do a ps -ef (from terminal as root) to check the processes running, I don't see firefox :confused:

If I open a firefox process from GUI and then run firefox from terminal (I find the bin), it spawns two parent process instead of a child. I see this from the dock. This is weird because I see two firefox icons in my dock.


How does this work???



mac-convert
Dec 8, 2006, 07:54 PM
Start with taking a look at the Activity Monitor. You'll find that in your Utilities folder in you Applications.

Westside guy
Dec 8, 2006, 09:39 PM
For example, when I open up firefox (from GUI) and I do a ps -ef (from terminal as root) to check the processes running, I don't see firefox :confused:

I imagine what you do see is "illegal option -f". :D Coming from Linux, it takes some time getting used to how the BSD variants of some commands differ from their GNU counterparts.

If you were to run "ps -aux" you'd see Firefox.app, which is how most OS X native apps display.

I think it's just a matter of trying things out and getting used to the cosmetic differences. You can use fink to install GNU versions of the core utilities, which personally I think are superior in many respects.

Hey another odd thing is the "locate" command in OS X. It doesn't understand case sensitivity, which is odd given that Mac often mixes upper and lower case AND locate won't match things in a case insensitive manner. What I did was download, build, and install slocate and run that instead.