1.6. Mac OS X's Unix Development Tools
Unix that you'll
encounter in Mac OS X's Terminal is similar to other
versions you have seen, but dissimilar in some fundamental and often
surprising ways. Although most tools are in their usual place, some
are not on the system, while others are not where you would typically
expect to find them on other Unix systems.
The lists shown in this section contain a sampling of the Unix
commands developers will find on Mac OS X. It is, by no means, a
complete list of the Unix utilities found on your system. Because
there are so many commands, they are organized into several
categories. If you are an experienced Unix user, many of these
commands will be familiar to you, but we've
referenced them here so you can quickly determine whether or not a
command you need is available. Unless otherwise specified, all of the
tools in the following lists can be found in
/usr/libexec. Some tools are available with the
standard distribution of Mac OS X, but others are available only
after installing the Developer Tools. (See Chapter 4 for more information about the Developer
Tools). Appendix B contains a listing of
commands that don't have manpages on Mac OS X.
1.6.1. Standard Unix Development Tools
The following commands are development tools that are commonly found
on Unix and Linux systems.
A yacc-compatible parser generator.
A high-level revision control system that sits on top of RCS.
A tool that generates lexical analyzers. See lex &
Apple's customized version of
gcc, the GNU C compiler.
A source-level debugger.
- gnumake, make
Tools that automate the steps necessary to compile a
source code package. See
Managing Projects with make
A command that manages file revisions.
A tool that extracts files from a zip archive.
A command that creates a zip archive.
1.6.2. Apple's Command-line Developer Tools
list of utilities can be found in
/Developer/Tools after you have installed the
Tools package. Project Builder depends on some of these tools. Many
of these tools have their roots in
Workshop (MPW), Apple's old development environment.
Acts as a versioning tool for Project Builder projects.
Creates resource string definitions.
Serves as an alternative to cp; preserves
resource forks when copying.
Extracts a tar file created by cvs-wrap.
Combines a directory into a single tar file.
Checks an entire directory into CVS as a binary file.
Displays the contents of a resource fork.
Displays extended information about a file, including creator code
and file type.
Returns the target of a symbolic link.
Merges code fragments from one file into another.
Serves as an alternative to mv; preserves
resource forks when copying.
Creates an index of Apple's API documentation for
Used by Project Builder's FileMerge feature to
produce more readable diffs between file versions.
Supports Project Builder's build system; an internal
Debugs header maps; also internal to Project Builder.
Merges resource manager resource files. Project
Builder's build system compiles
.r files into .rsrc files
using Rez, and if needed, Project Builder merges
multiple files using ResMerger.
Compiles resource files.
Embeds resource and data forks in a file.
Converts a scripting definition file into another format.
Sets HFS+ file attributes.
Splits the resource fork, moving it from a dual-forked file into a
file named ._pathname.
Removes resource and data forks from a file.
Generates web service stubs from a WSDL file.
Also available in the /Developer/Tools directory
is a Perl script (uninstall-devtools.pl), which
can be used to uninstall the Developer Tools.
1.6.3. Macintosh Tools
You can use the following tools to work with
Macintosh files and disks, Macintosh
applications, and the Macintosh clipboard.
Makes a system folder bootable.
Manipulates disks and volumes.
Copies directories, and optionally includes resource forks for copied
Manipulates disk images.
Installs packages; command-line tool.
Lists the contents of a Bill of Materials (bom) file, such as the
.bom files deposited under
Opens a file or directory. See
"open" under Section 1.5.4, earlier in this chapter.
Copies standard input to the clipboard.
Sends the contents of the clipboard to standard output.
Takes a screenshot of a window or the screen.
Configures network adapter properties. (Mac OS X Server
1.6.4. Java Development Tools
You can use the following tools to develop, debug, and run
A Java applet viewer.
A Java archive tool.
The Java Virtual Machine.
The Java compiler.
A Java documentation generator.
A tool that generates C and header files for JNI programming.
A tool that disassembles class files and inspects member signatures.
The Java Debugger.
A fast open source Java compiler (installed as part of the Developer
1.6.5. Text Editing and Processing
You can use the following tools to edit, convert, and otherwise
A pattern-matching language for textual database files.
A tool that selects columns for display.
A line editor underlying vi.
A tool that produces roughly uniform line length.
A document formatting system that can render
troff typesetting macros to PostScript, HTML,
and other formats.
A tool that merges different columns into a database.
A utility that merges columns or switches their order.
A simple text editor designed for use with the Pine mailer. Note that
the version of pine that ships with Mac OS X is
much older than the current release.
A stream editor.
A tool that converts Texinfo to HTML.
A command that substitutes or deletes characters.
A visual text editor.
1.6.6. Scripting and Shell Programming
The following commands include shells and programs useful in
A command that repeats command-line arguments on standard output.
A command that performs arithmetic and comparisons.
A command that reads a line of input.
A command that makes sure that a file is accessed by only one script
at a time.
The Practical Extraction and Report Language.
A command that formats and prints command-line arguments.
A standard Unix shell.
A command that causes a pause during processing.
The Tool Command Language (Tcl) shell.
A command that tests a condition.
A command that reads arguments from standard input and passes them to
An enhanced Unix shell.
1.6.7. Working with Files and Directories
You can use the following tools to
compare, copy, and examine files.
Concatenates and displays files.
Changes file flags.
Changes access modes on files.
Compares two files, byte by byte.
Compares two sorted files.
Compares two files, line by line.
Compares three files.
Determines a file's type.
Shows the first few lines of a file.
Serves as an enhanced alternative to more.
Creates symbolic or hard links.
Symbolic and hard links are not the same as Carbon aliases that you
create in the Finder (File Make Alias). Unix
programs cannot follow Carbon aliases, but all Mac OS X applications
(Carbon, Cocoa, Classic, and Unix) can follow symbolic or hard links.
Lists files or directories.
Makes a new directory.
Displays files one screen at a time.
Moves or renames files or directories.
Merges a set of changes into a file.
Prints the working directory.
Insecurely copies a file to or from a remote machine. Use
Secures alternative to rcp.
Compares two files, side-by-side and line-by-line.
Splits files evenly.
Shows the last few lines of a file.
Displays nonprinting characters in a readable form.
Restores the output of vis to its original form.
Counts lines, words, and characters.
Compares two compressed files, byte-by-byte.
Compare two compressed files, line-by-line.
1.6.8. File Compression and Storage
The following tools will compress, decompress, and archive
A tool that compresses files to free up space (use
A utility that copies archives in or out.
The GNU version of tar; available only if you
have installed the Developer Tools package.
A tool that uncompresses a file that was compressed with
A utility that displays contents of compressed files.
A tool that compresses a file with Lempel-Ziv encoding.
A tape archive tool. GNU tar has more features
and fewer limitations.
A utility that expands compressed (.Z) files.
A tool that displays contents of compressed files.
1.6.9. Searching and Sorting
You can use the following tools to search and sort files.
An extended version of grep.
A tool that searches files for literal words.
A utility that searches the system for filenames.
A tool that searches files for text patterns.
A faster version of find; however, it depends on
a database that is periodically updated by the weekly
cron job in /etc/weekly. If
the database is out of date, find will be more
A tool that sorts a file (use -n for numeric
sorting, -u to eliminate duplicates).
A tool that searches binary files for text patterns.
A utility that reports or filters duplicate lines in a file.
A tool that searches compressed files for text patterns.
1.6.10. Miscellaneous Tools
The following tools will help you perform such tasks as searching the
online documentation, switching user IDs, and controlling how
Locates commands by keyword.
Clears the screen.
Serves as a reverse-polish arbitrary precision calculator.
Gets information on a command.
Changes a job's priority.
Keeps a job running even if you log out.
Changes your password.
Produces a transcript of your login session.
Allows you to become the superuser. Since the
root account is disabled by default, you should
use sudo instead.
Executes a command as another user. This tool is usually used to
temporarily gain superuser
Copyright © 2003 O'Reilly & Associates. All rights reserved.