Switching Back to Desktop Linux
Subject:   strace is ktrace
Date:   2006-06-02 07:30:13
From:   axle
In macosx (and perhaps all BSDs?), the command you were looking for is ktrace. In Linux it's called strace, on Solaris it's called truss.

A search on google for "unix rosetta stone" helps in these cases. :)

Also, I suspect the reason you had trouble with the linker is because the mac uses Mach-O binaries, not ELF binaries. There are some significant differences.

I don't think new features like "spotlight" should be dismissed so easily. It's increased my productivity and changed the way I use a computer for the better.

Full Threads Oldest First

Showing messages 1 through 9 of 9.

  • strace is ktrace
    2006-06-04 10:04:40  migueldeicaza [View]

    I do find ktrace obnoxious to use.

    Because you first have to enable kernel tracing (ktrace application) and when you are done you process the output file with kdump.

    It is just mildly annoying.
  • also, forgot
    2006-06-02 07:56:06  axle [View]

    lsof works fine for me with macosx 10.4.

    gdb works fine for me. personally, I've never noticed any differences between gdb on linux, solaris, and macosx.

    10.4 also now ships with a real korn shell. hallelujah.

    The best point in the article is the one about an uninstaller. Hopefully Apple will listen and work towards improving the installation (and particularly the uninstallation) procedure.
    • lsof b0rken on MacIntel
      2006-06-06 21:12:10  kms-werk [View]

      [kself@holehawg:kself]$ lsof
      lsof: can't get vnode information (No such file or directory)

      Bug filed, returned as a "known issue".

      Oh yeah: I miss . (
      • lsof b0rken on MacIntel
        2006-07-19 08:08:28  axle [View]

        hmm, on my system:

        Welcome to Darwin!
        sage:~ axle$ lsof | head
        ATSServer 210 axle cwd VDIR 14,2 1496 2 /
        ATSServer 210 axle 0r VCHR 3,2 0t0 40080260 /dev/null
        sage:~ axle$ uname -a
        Darwin sage.local 8.6.0 Darwin Kernel Version 8.6.0: Tue Mar 7 16:58:48 PST 2006; root:xnu-792.6.70.obj~1/RELEASE_PPC Power Macintosh powerpc
        sage:~ axle$ which lsof

    • also, forgot
      2006-06-02 10:19:24  msporleder [View]

      To uninstall an app, you just drag it to the trash. Why is that difficult? Is it really easier to "find" the files on the filesystem and rm them?

      If you're talking about a registered pkg, then (I admit this isn't easy, but I'm sure the author knows enough perl to automate it) just lsbom|rm. I've done it before without any problems. (look in /Library/Receipts/)

      • also, forgot
        2006-06-04 07:19:05  dnasthegreat [View]

        find files and rm them? I somehow doubt you've ever used a moderately recent Linux distribution. emerge -C package or apt-get remove package or whatever the command for rpm-based distros is. Plus there are graphical versions of those tools for the point-and-click croud.
      • also, forgot
        2006-06-02 12:00:20  axle [View]

        Well, there are certain times when dragging the app to the trash doesn't cleanup everything, right?
        An example:

        My cisco vpn install (a GUI installer for an Aqua based app) wrote stuff into /System/Library/Startup Items
        and into

        If I just drag my cisco vpn software application to the trash, does that stuff get cleaned up too?

        That said, I'm still a huge fan of the Mac.
        I will not return to Linux or Windows for my day to day desktop computing. I find myself more productive on a mac. To each his own...
    • also, forgot
      2006-06-02 08:16:00  saschabrossmann [View]

      ksh? no, even better: chsh -s zsh B-)
      • also, forgot
        2006-06-02 11:49:03  axle [View]

        yes, those shells are probably quite nice for every day use. I'm just glad they included ksh for my existing shell scripts and compatibility reasons.