No equivalent to strace on OS X and the mysterious left square bracket

Tonight a friend pointed out that there is a weird file in /bin on OS X. If you do 'ls -la /bin' you will most probably see a file called [. That is not a typo, the file has the left square bracket as a name.

Curious off the bat about what it does, I fired up strace and ran the [ file. Except strace doesn't exist on OS X. strace lets you trace system calls and signals on a running file or a file that you run. Basically strace lets you watch what a file is doing. This can be very useful to solve mysterious problems.

So if you are on OS X and you need strace, you can always use ktrace instead. It works mostly the same it seems.

As for the [ app, try:

man [

Read more…

Comments