Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

scan

macrumors 6502
Original poster
Oct 24, 2005
344
0
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???
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.