Use the grep command to search the contents of the listed text file or files. In the example, grep domain /etc/resolv.conf the file resolv.conf is searched for the word "domain," and the lines containing that word are displayed. The process status command, ps, displays information about the processes running on your computer, or on the remote computer if you are logged in remotely. The optional arguments to ps used in the command ps -auxww tell ps to list information about all processes on your computer in wide format. The ps command displays the Process ID or PID of a process. Once you know the PID, you can use the kill command to terminate the process. Often, the output of one command can be used as input for another command. The UNIX pipe character (|) is used for this purpose. The command ps -auxww | grep Finder executes both the ps and grep commands. The output of the ps command is sent to the grep command as input that searches for the word "Finder" and displays any lines containing that word. Mac OS X 10.4 also includes three new commands related to Spotlight. The mdls command lists all of the metadata associated with any document. The mdfind command performs a fast Spotlight search and offers several flexible search options. The mdutil command provides a number of functions to manage Spotlight indexes. |