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

A 'Welcome kit' for new Mac UNIX users UNIX
I have found myself introducing one UNIX user after another to Mac OS X. They all have these growing pain rants until I teach them how to get along in the Mac world. To this end I created a "welcome list" of things a UNIX user needs to do. It's not intended to be a wish list of every cool Mac trick -- that's what this site is for. But this is a minimal set of tips that will sooth most problems out of the box. I'll pass it along.

[Editor's note: The following is a great "getting started" kit for transitioning UNIX users. You may not necessarily agree with 100% of the following advice (I know I differ on some items), but overall, this is a good summary of some key differences to keep in mind as you start working with the Mac. If there are errors in URLs they're my fault as I converted them into true hyperlinks; hopefully I didn't mess any up in the process...]

Dear UNIX user, welcome to Mac. If you trust me you will just do all of the following without asking why, before you start whining about features you miss. The following is a no-fat-added list of essential customizations.
  1. The Mouse.
    Go buy a three button USB mouse. Make sure you get an optical mouse with a wheel. Buy the most expensive one you can. Many hereditary Mac users prefer a one-button mouse, but you won't.

  2. The Terminal.
    Open /Applications -> Utilities. Drag the terminal.app icon to the dock.

  3. File system journaling
    Open the terminal.app and type sudo diskutil enableJournal /Users. Just do it. This is not undoable, and you can change how you want it later.

  4. The Compiler
    Regardless of what compiler you prefer, you need the native compiler and libs. Goto Apple's Developer Site and register for free. Enter the site and select the Downloads option and then the OS X section. Scroll through the list until you find "Developer Tools," download and install it.

  5. Installing GNU ports part 1.
    Goto SourceForge and find the latest stable release of "finkā€? for Mac OS X. Download and install it. There will be some questions to answer, just choose the defaults except if offered, ask it to get updates from CVS.

  6. Install X-windows part 1
    If you have five hours to kill, type in the Terminal fink install xfree86-rootless. This is preferred as it gets the latest release of a fast changing package. But if you are in a hurry you can install the binary. Type sudo dselect. Quick intro to dselect, after some preliminaries you are offered the chance to choose packages from a list. Use the downarrow key to move down and find xfree86-rootless. Press the "+" key to select it. You will be offered "conflict resolution." Accept the defaults by pressing return. Then return again to exit the selection. DO NOT GET GREEDY and select other packages yet.

  7. Installing X-windows part 2: the window manager
    You may prefer Fwvm2 or some other window manager, but take my advice and try out OroborOSX first. OroborOSX does things the Mac way, and later you will be glad you did it, even if it's not familiar at first. OroborOSX deliberately eschews many optional features, letting the OS provide those services. For example, if you want virtual screens you DO NOT want them as part of the windows manager! You want them as part of Aqua so that they apply to both Aqua and to x-windows. Get the latest version from the OroborOSX site. Note that the 'oroborus' that comes with Fink/dselect is not the same thing.

  8. Installing GNU ports part 2.
    Use dselect or fink to install a few packages. Fink has about 2000 packages available including your favorite parts of kde and gnome. To see what's avalaible type fink list | more. Just for practice try installing gv (ghost view) and xemacs. Remember, dselect will install binaries (fast), and fink will install source (slow), generally dselect is a good idea. Once a month type fink update-all to get package updates.

  9. Text editor
    Goto BareBones and get a free copy of BBEdit Lite. I recommend buying the full version. Note that you can save files in unix, Mac, and PC formats which have different end of line characters. Despite the name, on a Mac you should use UNIX format. Mac mode is mainly for historic reasons but gums up UNIX commands. Even if this (amazingly) does not turn out to be your preferred editor, you should install it anyhow so that it is there for guests.

  10. Mounting network disks
    You can mount NFS disks by creating a file that looks just like the usual /etc/fstab file. It does not matter where you put it since the Mac will ignore it. To mount the disks type sudo niload fstab followed by the file path name. However, don't do this right away until you have more experience. Instead do the following. In the finder window, select Go -> Servers. In the text field type nfs://some.ip.address/path, where 'some.ip.address' is the IP address or domain name of the host with the disk. The disk will be mounted in /Volumes and be "aliased" to the desktop. To mount Windows network disks, we use smb://some.ip.address/path. Be nice and unmount your disks (throw them in the trash) before disconnecting from the net

  11. Using X-Windows across the network.
    All the usual stuff (like xhosts and DISPLAY) work as expected. However, you do need to activate oroborus (which will fire up X-Windows) since it's not on by default. However, before you do this let me suggest an alternative you may find better. Goto Apple's Network & Security OS X downloads page and download VNCdimension (or VNCthing) and install this application. On the X windows client, run vncserver. And on the Mac attatch to it using VNC dimension. On anything but the fastest network connection, you will find this smoother and faster than using X-Windows. Plus it's more secure and even runs through firewalls. At present, much of X-windows on the Mac is not graphically accelerated, but VNC Dimension, which runs in Aqua, is.

  12. Shortcuts worth knowing about
    On your unix machine to run netscape you type /usr/bin/Netscape &. On a Mac, you type open /Applications/Netscape. To open the file browser at the current working directory type open . (note the period). To open a web page type open http://macosxhints.com.

  13. Pitfalls
    There are few pitfalls in the file system you need to know about early on.
    First be careful with cp, mv, rsync, and tar. For 99.9% of the time they work as expected. But a lot of Mac applications and Mac documents store info in something called the "resource fork" of a file. UNIX files only have a single data fork. Mac files have a data and a resource fork. The data fork is the same as what you would see on the UNIX system. The resource fork can contain almost anything, but usually contains unimportant meta-information about the file itself like what app created it, and so on. But sometimes it contains crucial information (e.g Quicken). When you do a UNIX cp or mv or tar, all you get are the data forks. The rule of thumb is this: if your file can be used by a UNIX program then don't worry about the resource fork. Most modern Mac apps do not use the resource fork but older ones do.

    Second, Mac filenames are case-insensitive but case preserving. Thus ReadME and readme are the same file.

    Third, unfortunately, for backwards compatibility there are two different kinds of soft links on a mac. One is the usual UNIX soft link and the other is the "alias" function of the OS. The OS is smart enough to recognize the UNIX links and treat them as file aliases in the GUI. But the reverse is not true. Generally you are better off using the UNIX soft links.

    Fourth, Macs have three layers of file permissions where UNIX has one. Macs have the usual UNIX permissions. Plus there is an ability to lock a file against changes or deletion, and finally there is the ability to lock a file against modification even by root. Generally you won't ever need either of the latter two, but you may someday find a file you can't seem to delete! Just in case, the normal file lock is accessed via "Get Info" in the Finder.

    Fifth, fstab, exports, shadowpassword, passwd, and most UNIX configs don't work the way you expect. Use the admin tools to alter NetInfo configuration data (see root below).

  14. Thinking Mac-like.
    First off, you never need to touch the other mouse buttons outside of X-Windows [editor: although you may find the right button very useful as its assigned to Control-Click by the OS]. Second, try to adopt Apple applications where they exist to replace you current favorites. For example, use the mail.app instead of pine or Eudora. Sure these have nice features, but long term, Apple apps will stay more tightly integrated: for example, mail.app links to Address Book which links to iCal. Third, chill-out dude. Macs force you to do things a certain ways with warning dialog boxes or focus-on-click windows. These are not worse than other ways, and long term you will come to see the benefits from the cross-application uniformity of operations. Unmount disks, especially network disks, by tossing them in the trash (you may want to add an eject button to the Finder menu).

  15. Viruses, Worms, holes, etc...
    Regularly use the software update feature. Bugs get patched quickly. The only security holes you really need to stay on top of are Microsoft Internet Explorer holes, Microsoft Enoturage and Outlook holes, and Microsoft word macro viruses. Don't bother worrying about anything else until you worry about these. Many people use Chimera for this reason alone.

  16. Root
    If you read just one book try "Mac OS X for UNIX geeks," most other books aren't for you because they are trying to explain UNIX to Mac heads. Avoid using root when you can use an admin tool or sudo instead. Apple has not fully documented root admin, so stick with tools. Except don't ever play with NetInfo Manager or niload until you have a lot of experience, as there is no faster way to make your Mac unbootable.

  17. Goodies
    • There are virtual window managers at Apple's OS X downloads page.
    • Try out Watson
    • Microsoft office is a great program.
    • Scientific plotting: You may like Igor from wavemetrics.com since it has both command line and menu driven interfaces. Fink comes with R, Octave and Gnu-plot. Mathematicians prefer mathematica.
    • If you have a lap top, put the dock on the right and make it small.
    • Turn off autostart on OS 9.0
    • Discover iTunes.
    • Consider a mac.com account
    • Read http://macosxhints.com [Editor: And you're doing that now, right?!]
[Editor's note: Please feel free to add additional things to keep in mind, comment on things you disagree with, etc. This hint could become a great starting point for transitioning users...]
    •    
  • Currently 2.17 / 5
  You rated: 2 / 5 (6 votes cast)
 
[87,451 views]  

A 'Welcome kit' for new Mac UNIX users | 45 comments | Create New Account
Click here to return to the 'A 'Welcome kit' for new Mac UNIX users' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Small typo in
Authored by: rpyle on Dec 30, '02 11:01:16AM

Right at the end, the URL for Igor should be www.wavemetrics.com, NOT www.wavemtrics.com.

Otherwise, GREAT HINT!



[ Reply to This | # ]
Nice catch...
Authored by: robg on Dec 30, '02 12:34:11PM

Figures I get 99% of the way through the edit job and miss one at the very end!

It's fixed now...

-rob.



[ Reply to This | # ]
Thank you RobG
Authored by: SOX on Jan 02, '03 01:28:08AM

Thank you for the nice edit and format job you did on my unpolished hint submission. it looks great and read better.
--sox



[ Reply to This | # ]
mathematica for X
Authored by: smkolins on Dec 30, '02 03:55:15PM

http://www.wolfram.com/products/mathematica/history.html

OSX as of version 4.1.5. Current 4.2!



[ Reply to This | # ]
few additions
Authored by: 47ronin on Dec 30, '02 04:27:54PM

Maybe you should mention that passwords, groups, users, shells, and the link are stored in NetInfo, and not handled by typical UNIX methods. Very important.

Also, mention a link to the macosxhints article which describes how to fix the default Jaguar tcsh setup errors (misspellings in the .login, etc) which should restore tab-filename completion functionality and a few other problems with remote shells. Please add that default user shells are set to tcsh whereas the default system shell is bash. This can be changed via NetInfo.

Mac OS X uses non-standard directories for Apache, which has its root doc dir in /Library/WebServer/Documents

Just my two cents... anyone else?



[ Reply to This | # ]
more additions
Authored by: thinkyhead on Dec 30, '02 08:13:28PM
Unix admins might expect to be able to start up sendmail on Mac OS X, but unfortunately the included sendmail is broken. This article explains what you need to do to get it working on Jaguar: http://www.macdevcenter.com/pub/a/mac/2002/09/10/sendmail.html Apple includes PHP and Apache with Mac OS X, but if you want to customize them you may need to build them yourself. Likewise web administrators will want to know about Apache customization and MySQL. There are several articles available online that cover these tools. The best resources are: Apple Internet Developer Marc Liyanage StepWise

[ Reply to This | # ]
more additions
Authored by: sjk on Apr 12, '03 03:37:13PM
I highly recommend Aaron Faby's excellent "Complete" packages from Server Logistics, like Complete MySQL.

[ Reply to This | # ]
change locked attribute from the shell
Authored by: leen on Dec 30, '02 05:13:02PM

If you ever encounter locked files you may prefer chflags(1)
to unlock them instead of using 'Get Info' from the finder.



[ Reply to This | # ]
change locked attribute from the shell
Authored by: cynikal on Dec 31, '02 06:59:38PM

yah i was going to say this too..

but i was also going to say that this is not a new mac thing..

this has been around in the *bsd world for a while ;-) (and in linux via the chattr command)

OS X just happens to provide a nice gui way to enable/disable this.

the other chflags are pretty useful too (like append-only mode).. i find it great to set on my .bash_history file so i have a record of all the commands i ever typed.



[ Reply to This | # ]
Addition to: 13. Pitfalls
Authored by: yendor on Dec 30, '02 09:57:19PM

>cp, mv, rsync, and tar

You might add unzip to the list. It bit me today. :)



[ Reply to This | # ]
solution for tar..
Authored by: cynikal on Dec 31, '02 07:05:09PM

i found this solution because i use tar a lot as a sys admin.

there is a resource-aware version of tar, called hfstar that works pretty well

i have my tar aliased to run hfstar instead.

available at:

http://www.metaobject.com/downloads/macos-x/



[ Reply to This | # ]
hosts file
Authored by: readparse on Dec 30, '02 11:00:26PM

This one will drive them friggin' bonkers, as it continues to drive ME bonkers. I'm still not sure I completely understand it, but the support for /etc/hosts seems to be there now, at least a little. But they definitely need to understand all the aspects of NetInfo (as others have mentioned) and how it affects a lot of things.



[ Reply to This | # ]
some additional stuff
Authored by: wgscott on Dec 30, '02 11:42:17PM
I put together some of this kind of stuff on a website. Feel free to use anything that might be of any help.
    http://www.chemistry.ucsc.edu/~wgscott/setting_up_OS_X.html


[ Reply to This | # ]
some additional stuff
Authored by: sloppy.lewinsky on Dec 31, '02 12:56:32AM
And the article over at macdevcenter is also good advice.

[ Reply to This | # ]
some additional stuff
Authored by: sloppy.lewinsky on Dec 31, '02 04:29:57AM
I also have some suggestions that differ from what the author recommends, but that's what makes horse races.
  • Chicken of the VNC is the most up to date VNC viewer for Aqua.
  • I'll take XonX over compiling xfree any day of the week. Fast binaries, ready to go.
  • The GNU-Darwin project has a nice one stop installer you can kick off as follows:
    curl http://www.gnu-darwin.org/one_stop | csh

    And where are these virtual window managers? I've only found two. There is space.app, which is a hack, and a $30(!) shareware package.

    [ Reply to This | # ]

  • some additional stuff
    Authored by: wgscott on Dec 31, '02 12:31:20PM

    OroborOSX: $0

    http://wrench.et.ic.ac.uk/adrian/software/oroborosx/X11onOSX.html




    [ Reply to This | # ]
    some additional stuff
    Authored by: sloppy.lewinsky on Dec 31, '02 01:26:54PM

    ah, yes. I sometimes get mixed up on semantics. The reference was to virtual window managers, not virtual desktops.



    [ Reply to This | # ]
    some additional stuff
    Authored by: wgscott on Jan 01, '03 11:02:54PM

    oroborosx is a window manager, not a desktop manager. I don't know about the virtual bit...



    [ Reply to This | # ]
    Gnu-darwin and caution
    Authored by: SOX on Jan 02, '03 01:19:45AM

    Hi, In my terse list of unix customizations, I delberately omitted any mention of Gnu darwin--either posistive or negative comments. My purpose was to steer a new unix user away from gnu-darwin, at least at first, but not to openly disparage it.

    They can of course install it later if they still feel they need it, but I feel its not a wise move to steer a newbie convert to it. installing gnu-darwin is a big step for several reasons. first gnu-darwin is very un-mac-like in its philosphy. it sprays files all over the place, tends to be an all-or-nothing install, and is hard to uninstall completely. worse, it overwrites critical mac intrinsic commands like make and, I believe, tar, which renders many things broken (e.g. fink and many mac configure scripts).

    Gnu-darwin is philosophically a replacement for OSX not an augmentation, though it is often spoken of as the latter, and does serve that purpose. Finally, Unix users should make the effort to stick with the mac way organizing the file system and config files till they get used to understanding the native BSD unix system and not get the distinctions between native and Gnu-add-ons blurred. After all when they go to use other macs, it will be rare to find the Gnu-darwin tools.

    Fortunately, not installing gnu darwin presents very few handicaps as Fink pretty much has all the tools you (really) need. I expect that it is only a temporary condition that a handful of major packages are ported only to gnu-darwin; they will soon be in Fink.

    lastly there is the small point that Gnu-darwin project is having a hissy fit and is no longer supporting the mac platform (yes this is true). Again I think highlights the philosophical differences: gnu-darwin is a great replacement for OSX, but not a (freindly) add-on.

    So rather than get into a fight over philosophy, I just decided it was better not to bring it up this confusing issue.



    [ Reply to This | # ]
    Journalling
    Authored by: webfox on Dec 31, '02 03:57:33AM

    error in #3. it is indeed undoable. just change enableJournal to disableJournal.

    not that you'd want to. :)



    [ Reply to This | # ]
    Journalling and english sentences
    Authored by: SOX on Jan 02, '03 12:59:02AM

    ha ha, I realized that was an ambigous statement after I sent it in. (think about it for a second). the phase "not undoable" in english means something is in fact reversible.

    But in "mac-speak" the term "undo"-able has a specific and opposite meaning. to say something is "not undoable" to a mac user has exactly the opposite connotation than the english meaning; namely that the action is in fact irreversable.

    In my terse test list above I intended the english for meaning.
    in other words, as you point out, journaling is indeed a reversable condition.



    [ Reply to This | # ]
    Journalling and english sentences
    Authored by: j-beda on Jan 03, '03 12:33:20PM

    Then why not say it clearly: "You can reverse this later
    if you want to" or something like that.

    "Not undoable" in general useage means "possiable" or
    "able-to-be-done", which does not fit well with the
    sentance structure you have created. The additional
    computer useage of "undo" makes it even less clear what
    is meant. I would get rid of the phrase completely and
    use "reversable" and avoid double negatives.



    [ Reply to This | # ]
    What an excellent article!
    Authored by: GEllenburg on Dec 31, '02 05:45:25AM

    As a Mac user off and on for the past 15 years, and a UNIX BoFH for over a decade, the information provided above is great.

    I "switched" to OS X in August (from a FreeBSD, Linux, and Solaris environment) and will never go back. (Ok, I still say FreeBSD has a better TCO and ROI for servers than OS X Server but that's another story.)

    One thing missing is more discussion of the UNIX root account. A seasoned UNIX veteran knows the dangers and pitfalls of root. Then again, a UNIX veteran knows and understands its necessity at times.

    What happens if the admin user's password is forgotten? Reboot the server? UNIX veterans don't reboot servers unless they have to. However, they could log in as root from the console. (A UNIX veteran will hunt down the sshd_config files and restrict root from logging in remotely.)

    To enable the root password on OS X, simply type: 'sudo su -' in the Terminal.app to get a root shell. Your UNIX friends will feel right at home then by typing 'passwd' to enable a password on the root account.

    Also, every UNIX person coming to an OS X environment should read the "Porting UNIX applications to Mac OS X" which is in the Developer Documentation (can't remember the path off the top of my head though.) It provides excellent information about the nuances OS X has with regards to startup scripts, gotchas with the operating system itself, and other subtle differences between UNIX, NeXT, MacOS, and OS X.

    Otherwise, a fantastic article. I've got to try that vnc trick with XFree86 to see if the response time is improved with X apps, myself.



    [ Reply to This | # ]
    What an excellent article!
    Authored by: SOX on Jan 02, '03 11:12:44AM

    your welcome.

    a few VNC hints. KDE is picky about its resolution bit depth, so if KDE mysteriously complains and wont start, adjust the bit depth.
    also In my experience not all VNC clients are the same. After various OS updates I have found that VNCdimension works noticably better/worse than VNCthing. I have no idea why but emprically it is so. VNC is not intrisically secure (just obscure) but can be made so by tunneling. (for paranoids, tell the server to turn off the http:5800 port.) At this time the reigning champian for VNC servers is tightVNC--however none of the mac-cleints support the tight protocol at this time (install it anyhow, since it just defaults to non-tight propocol, and someday soon the mac clients will support tightVNC)



    [ Reply to This | # ]
    UFS v HFS+
    Authored by: ewan on Dec 31, '02 07:04:28AM

    If you want the true unix experience I recommend using UFS instead of HFS+, okay so there is no journalling option and mozilla won't run (needs resource forks.....) but chimera does. You also have the benefit that UFS is case sensitive. To do this you will need to reinstall OS X and reformat the drives with disk utility.



    [ Reply to This | # ]
    UFS v HFS+ - breaks os9
    Authored by: cynikal on Dec 31, '02 07:02:25PM

    i thought about this too at first but found out that os 9 will NOT run on ufs.. it requires hfs (or hfs+)



    [ Reply to This | # ]
    UFS v HFS+
    Authored by: ewan on Jan 01, '03 11:35:12AM

    Then again, if like me, you are a unix user you probably have no need for OS9.
    I did consider the whole OS9/Classic thing but realised there were no reasons to have it - it's not as if unix switchers have OS9 software they wish to keep using and getting rid of OS9 frees up another gig or so of disk space.
    There is also experimental support for rw on ufs in the newer linux kernels which would be an advantage if you wanted to dual boot. The only issue I'm not clear on is if Mac on Linux would work with ufs.
    So far (3 months) UFS has served me nicely with none of the afformentioned issues about cp/tar etc.



    [ Reply to This | # ]
    UFS v HFS+ caution
    Authored by: SOX on Jan 02, '03 10:57:41AM

    While UFS has its uses I feel its probably not a good general recommendation for users switching to mac. In my view the primary needs UFS occur in two situations, one is if the mac is working as a disk server to Linux/sun/unix computers. There OS independent transparency to the external world may have priority. (indeed my xserves export their UFS partitions for this reason) The other is the rare case where the users are porting unix packages in such a wholsale fashion that they cannot anticiapte or correct name capitalization problems. In most circumstances, correcting filename capitalization is just one of many porting issues one needs to address, but not a good reason to abandon HFS+.

    That being said, I would highly reccomend against not installing HFS+. First of all, apple does not support booting from UFS. SO while you may be able to boot your computer now, a single auto-upgrade could disable your computer. At various times, Airport and OS 9.0 have been broken by UFS. Moreover, on a mac UFS is slower and lacks some disk tools. Finally, when the new user goes elsewhere and uses another mac UFS will (likely) not be present.

    Minimally, it is advisable to maintain a HFS+ partition for the OS and apps. But if you are going to do that, there is some logic to just learing to use HFS+. They are not all that different, that one cannot just get used to it, just as unix users have to get used to different dialects of unix.



    [ Reply to This | # ]
    UFS v HFS+ caution
    Authored by: SOX on Jan 02, '03 11:17:47AM

    While UFS has its uses I feel its probably not a good general recommendation for users switching to mac. In my view the primary needs UFS occur in two situations, one is if the mac is working as a disk server to Linux/sun/unix computers. There OS independent transparency to the external world may have priority. (indeed my xserves export their UFS partitions for this reason) The other is the rare case where the users are porting unix packages in such a wholsale fashion that they cannot anticiapte or correct name capitalization problems. In most circumstances, correcting filename capitalization is just one of many porting issues one needs to address, but not a good reason to abandon HFS+.

    That being said, I would highly reccomend against not installing HFS+. First of all, apple does not support booting from UFS. SO while you may be able to boot your computer now, a single auto-upgrade could disable your computer. At various times, Airport and OS 9.0 have been broken by UFS. Moreover, on a mac UFS is slower and lacks some disk tools. Finally, when the new user goes elsewhere and uses another mac UFS will (likely) not be present.

    Minimally, it is advisable to maintain a HFS+ partition for the OS and apps. But if you are going to do that, there is some logic to just learing to use HFS+. They are not all that different, that one cannot just get used to it, just as unix users have to get used to different dialects of unix.



    [ Reply to This | # ]
    UFS v HFS+
    Authored by: linkert on Jan 05, '03 01:49:29PM

    This is rubbish, sorry. Apple's implementation of UFS is very old and has nothing to do with the UFS FreeBSD uses nowadays (e.g. soft updates are not implemented). UFS on the Mac is extremely slow, it is not supported by Apple, and a number of apps refuse to run on it. I would therefore not recommend it to _anyone_ using Mac OS X as a desktop OS. The server side is certainly different altho anyone with brains should get an Intel box (using Linux or *BSD with it) for that matter.



    [ Reply to This | # ]
    Using open (again...)
    Authored by: pmccann on Dec 31, '02 09:52:02AM

    Nice set of tips (uggg...), but the open command is much more fun if you exploit all of its magic: instead of

    open /Applications/Netscape

    (where you need a path and the capitalization) use

    open -a netscape

    and let open do the searching for you. Similarly

    open -a console

    finds console.app in the /Applications/Utilities directory, and

    open -a "project builder"

    will find Project Builder.app in the /Developer/Applications if you've installed the Developer Tools. The quotes are necessitated by the space in the name of the latter application.



    [ Reply to This | # ]
    Using open (escaping spaces etc)
    Authored by: helary on Jan 08, '03 10:04:56PM

    the terminal does not need "" to take spaces or other special characters into account.

    just escape them with anti-slash (\\).

    thus:

    open -a "project builder"

    becomes:

    open -a project\\ builder



    [ Reply to This | # ]
    Using open (escaping spaces etc)
    Authored by: Moofisto on Jan 24, '03 09:20:34PM

    Oops, I figure you were trying to make the backslash show up on this page by escaping it with another backslash. In my browser, I'm seeing both backslashes.

    Of course, when typing these in the Terminal, there should be only one backslash.



    [ Reply to This | # ]
    Using open (again...)
    Authored by: krishna on Feb 20, '03 01:18:09AM

    Yup -- I only discovered one more gotcha: when I type

    open -a itunes

    it starts itunes in classic. I have to type

    open -a itunes.app

    to have it run the macosx version of itunes (which it does just
    fine). That, plus turning on the ssh server, and this tcsh
    alias (should all be on one line):

    a tell 'osascript -e ' "'" 'tell application ' '"''\!:1''"' "'" ' -e ' "'" '\!:2-$' "'" '
    -e "end tell" &';

    means I can type:

    ssh -C krishna@mymac.address.com
    <enter password>
    % open -a itunes.app
    % tell itunes play

    (this track is not that great, so I skip it:)
    % tell itunes next track

    (I want to play this one again)
    % tell itunes previous track

    (phone call!)
    % tell itunes pause

    and voila! Full remote control of itunes ... and probably other apps.
    osascript is definitely a must-mention for any unix conversions.



    [ Reply to This | # ]
    Versiontracker
    Authored by: JohnnyMnemonic on Dec 31, '02 01:02:00PM
    I would add a mention of Versiontracker--long known by MacHeads, it is becoming something of a sourceforge for ports, hacks, and tweaks of OS X. Unix users may overlook it unless directed there.

    And although you recommend against cp and mv, etc, you don't mention what the best alternatives are, which still appears to be under debate and/or poorly documented.

    [ Reply to This | # ]
    Versiontracker
    Authored by: rorya on Dec 31, '02 02:26:35PM

    Regarding CLI tools to deal with dual-fork files, there are a
    few on the system that are worth mentioning.

    If you've installed the developer tools you should have a /Developer/Tools
    directory. In there you will find two utilities named CpMac and MvMac. These
    allow you to copy or move dual-fork files. You can use them the same way you would use cp(1) and mv(1).

    Besides that, the system comes with a utility named ditto(8), which is similar
    to the cp(1) command. Read the manual page for its usage. Always remember to add
    the -rsrc flag to make it duplicate the resource fork(s).



    [ Reply to This | # ]
    Versiontracker
    Authored by: rorya on Jan 01, '03 07:15:24PM

    oops, I have a typo for the ditto flag to preserve the resource fork.
    The flag is actually "-rsrcFork"

    -rory



    [ Reply to This | # ]
    ditto
    Authored by: sjk on Apr 12, '03 03:28:52PM

    "ditto -rsrc" is equivalent to "ditto -rsrcFork".



    [ Reply to This | # ]
    Versiontracker
    Authored by: krishna on Jan 03, '03 02:35:23AM

    Don't forget to mention macosxhints.com as well!!!

    Also, put this hint on a web page of its own ... definitely
    deserves it.

    Finally, you don't need to use dselect to install packages;
    fink install xfree86-rootless will install from the sources,
    but using 'apt-get install xfree86-rootless' will
    automatically resolve conflicts and can be done without
    hunting for the package in 'dselect'. Also, apt-get install
    can be interrupted (via control-c) while downloading the
    packages; running apt-get install xfree86-rootless again
    will pick up where the last download was interrupted
    and keep going.



    [ Reply to This | # ]
    Correction to pitfall 13 second part
    Authored by: cynikal on Dec 31, '02 07:11:43PM

    it's not that mac file names are case insensitive, it's that the underlying file system, hfs+ does not honor case sensitivity.. (but does preserve it as noted).

    this is important for certain unix source tarballs and executables (such one i ran into, perl's lwp library. it has a HEAD executable, that gets installed into /usr/bin and overwrites the default /usr/bin/head).



    [ Reply to This | # ]
    Developer Tools
    Authored by: j-beda on Jan 03, '03 12:39:49PM

    The Developer Tools intstaller is problably in the /Applications/Installers
    folder or on a seperate CD that came with the computer (and many
    computers are still shipping from Apple with only 10.1.5 installed,
    with 10.2 and the Developer Tools being on included CD's).

    While downloading from Apple might be the most up-to-date, it is
    a lot quicker to use the included Developer Tools rather than
    waiting for a download to complete.



    [ Reply to This | # ]
    A 'Welcome kit' for new Mac UNIX users
    Authored by: krishna on Feb 20, '03 01:22:41AM

    >but if you are in a hurry you can install the binary. Type sudo
    dselect.

    I started using debian a while back ... I had the option to go with
    dselect, but I much prefer:

    sudo apt-get install xfree86-rootless

    one yes/no question, and it downloads everything you need
    to get started just fine. Plus, the syntax mirrors fink's, so it's a
    bit easier to remember. (Definitely worth mentioning).



    [ Reply to This | # ]
    A 'Welcome kit' for new Mac UNIX users
    Authored by: xSmurf on Apr 11, '03 11:11:00PM

    Does anyone know of a listing of all the available unix network tools... such as ping traceroute, and obviously more, like a util that could show what is going on the TCP on a certain port or anyport (like the now regreted OTSessionWatcher)

    ---
    PM G4 DP 800 / 256Mb / 80Gb+40Gb /SuperDrive / SCSI: AGFA SnapScan 1236s / Jaz 1Gb / Zip 100Mb
    - The only AAP Smurf ;P



    [ Reply to This | # ]
    A 'Welcome kit' for new Mac UNIX users
    Authored by: integrator on Apr 12, '03 09:44:19AM

    "netstat"



    [ Reply to This | # ]
    A 'Welcome kit' for new Mac UNIX users
    Authored by: integrator on Apr 13, '03 12:07:16PM

    netstat can show active ports and connections



    [ Reply to This | # ]