< Day Day Up > |
This chapter presents the Unix commands of interest to users and programmers. Most of these commands appear in the "Commands" section of the online manual. With rare exception, this book purposely avoids system administration commands, because system administration is beyond its scope. The focus instead is on everyday commands, those used both interactively and for programming. Summarizing three operating systems that are similar but not identical is a daunting task. In order to make a coherent presentation, the chapter is organized as follows:
Even commands that appear in the section "Alphabetical Summary of Common Commands" are not identical on all systems. Thus, here too we've made an effort to describe the common behavior first, with additional subsections on system specific behavior. This occurs most frequently for the different options that different versions of the commands accept. In the command summaries, each entry is labeled with the command name on the left-hand edge of the page. The syntax line is followed by a brief description and a list of all available options. Many commands come with examples at the end of the entry. If you need only a quick reminder or suggestion about a command, you can skip directly to the examples. Some options can be invoked only by a user with special system privileges. Such a person is often called a "superuser." This book uses the term privileged user instead. Typographic conventions for describing command syntax are listed in the Preface. For additional help in locating commands, see the Index. 2.1.1. Finding Commands on SolarisSolaris systems provide a number of "bin" directories underneath /usr for different kinds of commands. For example, /usr/bin holds most regular commands, /usr/java/bin has the Java commands, and so on. The bin directories are summarized in Table 2-1.
We strongly recommend placing /usr/xpg6/bin and /usr/xpg4/bin in your shell search path before the other directories. Solaris is unique among modern Unix systems in that the versions in /usr/bin continue to be the original System V Release 4 versions of the commands. Today, with just about every other system being POSIX compliant, you should set up your Solaris account to be POSIX compliant too! For Bash or the Korn shell, use something like this in your .profile file: # Use multiple lines to fit on the page: PATH="/usr/xpg6/bin:/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/usr/java/bin" PATH="$PATH:/usr/sfw/bin:/usr/perl5/bin" PATH="$PATH:/usr/dt/bin:/usr/X/bin:/usr/openwin/bin" The Solaris Software Companion CD contains unsupported copies of many popular Free Software and Open Source programs from the Internet. They install under /opt/sfw. If you install this software, you may wish to add /opt/sfw/bin to your path as well. 2.1.2. Finding Commands on GNU/Linux and Mac OS XThe situation on GNU/Linux and Mac OS X is considerably simpler. For both systems, a path like the following suffices: PATH=/bin:/usr/bin:/usr/X11R6/bin On Mac OS X the default path is /bin:/sbin:/usr/bin:/usr/sbin. You may wish to add the X11 directory to it: PATH=$PATH:/usr/X11R6/bin
|
< Day Day Up > |