Top Ten Mac OS X Tips for Unix Geeks
Lisa writes "There are big differences between Mac OS X and
Unix machines. In this MacDevCenter article, Brian Jepson has assembled ten
tips to help achieve a smooth transition from Unix to OS X."
← Back to Stories (view on slashdot.org)
had a brief segment last night showing the top 10 Mac OS X killer tips.. the link is here with some nifty tricks for your Mac..
If you're looking here for something insightful or thought provoking, you're probably looking in the wrong place.
Actually its Option - Apple - Esc. That gets you to 'force quit'.
I think you'll find that the variations aren't so much variations from Unix, but from Linux. Many of the differences the article outlines are simply "hiding" the Unix from newbies (i.e. dangerous directories) and can easily be over ridden.
The article's comments about NetInfo are a little off as well. OSX has been moving to using NetInfo less and less. 10.2 tends to utilize many more traditional ways of doing things.
I should add that most of those elements are hold overs from NeXT and the Darwin team appears to be making it more like a traditional BSD.
BTW - if you want a good Finder replacement with more Unix tools try Path Finder. It has lots of nice things such as creating SymLinks rather than Aliases etc. (Although Aliases are more powerful, but most Unix tools don't recognize them)
http://www.cocoaserver.com/virtualdesktops.html
:)
try this one
open source too if'n you're paranoid
You've got an easy breezy wind at your back...most of the time.
There's an editting error on the 2nd and 3rd lines of the table of directories in the article.
.trash - This directory contains files that have been dragged to the Trash.
./vol - This directory maps HFS+ file IDs to files.
AFAIK, it should read:
Isn't it suposed to be ~/.trash - in your user directory?
I don't own a Mac but I see 'em on the Sreen Savers.
Ever dream you could fly? Get up from the Flight Sim. I Fly
I just plunked down a whopping $20 for Codetek's Virtual Desktop (www.codetek.com).
Its a damn fine piece of software and was the final addon that made Aqua perfect for me.
"That naive cube! How long must I suffer this!" --Sheldon J. Plankton
Another "feature", at least in 10.1 is the 255 char line limit the Terminal has. This pops up in shell scripts at the worst times without warning.
Shareware ($20.00), but you can use it with two windows as nagware.
Space.app, which is free as in beer, in one such solution that provides multiple virtual desktops on Mac OS X. VersionTracker is to Mac OS X what Freshmeat is to Linux.
--- Fox
Warning: Virtual Desktops.app is not yet compatible with 10.2.
Is it a big change? yes. Is the whole world upside down? ummm.... no. You still have a shell, all the standard unix utilities and most everything is done the Unix way, even when it's done through the GUI. Personal Web Sharing is Apache. Windows File Sharing is Samba. Printer Sharing is cups. The firewall is a default deny ipfw setup.
Sounds like Unix to me. Though admittedly I'm biased, since I really like the fact that I'm posting this message from a unix box (OS X 10.2.1) that's currently running Illustrator, Photoshop and Quicken, while charging up my iPod.
Friend, FreeBSD isn't UNIX. UNIX is a trademark, and FreeBSD can't be called UNIX.
Besides Mac OS X contains a complete FreeBSD 4.4 distribution-- it is, in fact, a superset of FreeBSD-- so OS X is just as much a UNIX operating system as FreeBSD is.
I write in my journal
it uses NetInfo instead of /etc/hosts, /etc/group and /etc/passwd.
/etc/hosts first by default. So unless you're using 10.0 or 10.1, /etc/hosts will work just the way you think it should.
I do feel compelled to point out that OS X actually uses lookupd for host name resolution, and lookupd can be configured to use any number of sources for name-to-address mappings. Under 10.2 and later, lookupd is configured to look in
More info can be found in the lookupd man page.
I write in my journal
Are you positive about that? When I bought my last machine, it came with 10.2 installed, but the developer tools hadn't been installed at the factory. It had /usr/bin/bash on it.
I write in my journal
* Forget sudo and enable root access (I forget how, I don't have an OS X box in front of me), then use su.
Uhhh... why? If your suggestion resulted in some kind of improvement I might be convinced to go along, but why mess with things that don't need to be messed with? There's no reason at all to enable the root account on your OS X machine. If you absolutely, positively have to have a root shell, you can always use this little trick:
% sudo su -
Password:
#
I write in my journal
Macs are definitely more expensive, but it's not quite as bad as your numbers indicate. You ordered extra RAM and hard drives from Apple; *never* do that, their markups are insane. A stock dual 867 with a GeForce 4Ti is $2050. From third parties, get 1 GB of ram for $250, 2 80 GB drives for $250, a Firewire CD-RW for $150, and you're at $2700 with a better system than you got from the Apple store. Still more than the Dell, but the difference is reduced by half.
How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
There's nothing magical going on here, it's just the difference between escapes that are processed by the shell before the program ever sees them and correct parameter syntax.
-Kevin
This program has exactly the same limitation of Space.app: Windows from one program can only be displayed in one workspace. So, for instance, you can't have Terminal windows open in more than one workspace.
It works by hiding the applications on a desktop, when you move from desktop to desktop.
If this is acceptable to you, Space.app does it for free. But it's a poor solution for those of us used to real virtual window managers.
lookup does not run in single user mode, but runs in multi-user mode (the normal mode of operation).
The files are actually kind of wrong as of 10.2, as the flat files do get consulted in multi user mode, and do so before the NetInfo database does.
ie,
See how 'FF' gets consulted before 'NI' ? This means that the flat file does get looked at. 'DNS' is self explanatory, and 'DS' stands for Directory Services like LDAP...
i don't read slashdot anymore.
Obviously the dollar-sign is a parser character right? Watch this:
Right? Okay...
Hmmm, obviously the - is not a character that the shell thinks is special, it just passed it straight through to echo
Ah, there's your reason, putting a backslash in front of a character that isn't otherwise parsed by the shell, just passes that char on through to the program.
If you pass a -- (two-dashes) to a GNU-ish (getopt and friends) program it'll stop parsing commandline options, and accept things like -p as an argument, and not a commandline option.
HTH!
When this story was posted over at MacSlash, somebody replied with a tip of their own, which I've found to be quite nifty.
What it involves is logging out, then logging back in as user ">console", with no password. You might have to select "Other User" or whatever that option is called, on the login screen. That'll allow you to skip Aqua, and just have a nice full-screen terminal to work with, instead.
of course for the sake of keeping up, here's my top ten:
I used to think what you say above, until I bought a Mac.
Have you ever owned a Mac or had a close look at one, inside and out? It's beautifully engineered. Every surface finished nicely, lots of thought given to things like cable management and noise reduction, easy access to parts that are meant to be user-accessible (not much on an iMac, just about everything in a G4 tower).
I once had a Compaq Presario that required me to _remove_the_motherboard_from_the_case_ to add memory! (Yes, that's what their tech support said to do.) Unbelievable.
Homebrew machines tend to be more accessible, but watch out for the sharp edges on that metal case! and have plenty of twist-ties handy for the cables on any Intel-type box.
I feel that OS X is the best desktop Unix around now (I used to say that about Linux), and it runs only on Mac hardware. My Mac is worth every penny of its price to me.
In other words, Apple is taking a big step here and embracing open-source about as much as you can expect a big corporation to do. Sure they don't give away the whole farm, but they are promoting an environment which is at least friendly to open-source even if it isn't 100% open.
Sapere aude!
So this isn't a problem anymore and hasn't been for quite some time.
...but from a design point of view, OSX is an anathema. This article just makes it clearer: OSX is, not a port of MacOS or an enhancement of Unix, but a bloody (and fatal?) collision between the two, where both lost what clarity and integrity they had by attrition to the other.
What? Have you actually *used* it? How about this explanation instead: they've managed to create one unified operating system that keeps some very diverse users happy. If you're an end-user technophobe, what you see is a very nice, clean, end-user system, far nicer than Windows, and without the 10 years of cruft that OS9 had accumulated. On the other hand, if you understand computing, you have a complete Unix-ish system, again, without a lot of the cruft that other Unix systems have accumulated. The Apple engineers deserve major kudos for keeping the "collision" under control as well as they did... they of course have backward compatibility to deal with, too.
Yes, the file copy stuff is a little ridiculous, but geez, the complaints on that level are pretty few, considering how much elegant functionality there is in there otherwise.
Aliases are sort of a hybrid between a symlink and a hard link. They keep track of the HFS file id of the target file.
Prior to 10.2 the default behavior was to first check the file id, and if that file isn't there any more then check the file location. In 10.2 this behavior changed to be more like a symlink. First it checks the file location, then it checks for a file of the given file id.
To sum up: aliases are more powerful than symlinks because they do everything that a symlink does (when accessed through the mac file apis, not the BSD ones), but can also still find the target file if it's been moved to a different directory.
"It is our blasphemy which has made us great, and will sustain us, and which the gods secretly admire in us." - Zelazny
It probably depends on what kind of development your developer is trying to do, but...
It sounds like he either tried to do all this with a pretty early version of OS X (before most major tools were ported), or he just didn't know where to look.
If I didn't have it all installed already, in just a few hours I could have Apache, PHP, Perl, MySQL CVS, CVSWeb, and a number of other tools installed and ready to go. Install the dev tools and you'll likely have most of this stuff installed to begin with.
Again, it depends on what he does. But for my own needs (admittedly relatively light), it was a piece of cake.
- Jeff
Did you introduce him to fink? By default, the Mac comes with the entire GNU toolchain, plus perl, python, and a ton of other utilities. If he needed newer versions of perl or python, or if he something else (Ruby, MySQL, PostreSQL, X window, Ant, OCaml, LaTeX, even KDevelop and KDE for Pete's sake!) he just types in
fink install python
for example, and, after five to twenty minutes (depending on the package), he's got whatever he needed. It's as easy as apt-get and it's fully OS X native. Check out the link; there are 1600 packages so far and going up literally daily. So my question is, how experienced was your developer?
As far as cp goes, most files will copy fine, but if you work with files that have resource forks (fewer and fewer as time goes by) then install the Dev Tools and use CpMac and MvMac, which handle resource forks properly. Or use 'ditto -rsrc' which handles forks as well.
As far as the alias thing goes, 1) it is not too hard to avoid aliases and 2) they are designed to be convenient to your average user. By default there are not many in the system, so provided you make symlinks rather than aliases all is well. Having used OS X since Public Beta, I have yet to have had a real problem with the alias/symlink thing. *NIX tools do not like aliases, so I always use symlinks instead, no big deal.
Aliases point to a file in an intuitive way to a non-technical person - if you move or rename the file it keeps pointing to the file - if you replace it, then it points to the replacement, simple for grandma to get.
As for breaking aliases, you are in error saying that renaming your HD will do this. When I managed Mac labs, users used to rename various HDs in labs fairly often, which I would name back. There were no ill effects on any aliases. I have done full and partial restores from backups using Retrospect with no unexpected effects on aliases, sounds like you were using a crappy backup tool.
Hyperbole is the worst thing ever.
Bash shell is included in 10.2
[Computer:~] acomjean% bash
bash-2.05a$ yes
y
y
y
y
y
My experience porting my application to various unices is that porting from Linux to Mac OS X is a no-briner; the toolchain to build programs on the both unices is the GNU toolchain, and is almost identical.
The only Unix I have had a hard time porting to is Solaris; then again, I have not tried porting my application to other prorpietary unices like HPUX, Ultrix/OSF-1/whatever they call it these days, AIX, etc.
- Sam
The secret to enjoying Slashdot is to realize that it should not be taken too seriously.