Module 2
UsingCommand-LineFeatures and Online Help Resources
Objectives
This module describes how to use the command-line syntax and display
the online manual pages.
Upon completion of this module, you should be able to:
1.Construct and execute commands from the command line
2. Use online documentation
Task 1 Solutions
To construct commands, arrange the following terms to show the correct
syntax of a command:
options arguments command
command options arguments
Task 2 Solutions
To use command-line features, complete the following steps:
1. Open a terminal window from the Tools section of the Workspace Menu, if you do not already have one open.
Name the two components of command-line syntax that can enhance the capability of a command.
Options and arguments
2. Enter the command to display information about the operating system and the workstation name.
$ uname -a
3. Execute the man uname command. List the functions of the -s and -r options to the uname command. The -r option prints the operating system release level. The -s option prints the name of the operating system.
a. Enter the uname -s command. What information appears?
The operating system name, for example, SunOS.
b. Enter the uname -r command. What information appears?
The operating system release level, for example, 5.10.
4.Enter the command to display the current time and date on your system.
$date
5. Display this month’s calendar. What command did you enter?
$ cal
6. What special character separates commands on a single command line?
The semicolon (;).
7. Enter the command to clear your terminal window.
$ clear
Task 3 Solutions
To learn how to search for online documentation, list the keys or the functions of the following keys in the empty cells in Table 2-4 to control scrolling the online man pages: Table 2-4 Keys to Control Scrolling in the Man Pages
Key Function
Space bar Displays the next screen of a man page
Return Displays the next line of a man page
/pattern Searches forward for a pattern
q Quits the man command
Task 4 Solutions
To access online documentation, complete the following steps:
1. Using the -k option with the man command, find the man page that describes how to clear a terminal window (use the keyword clear).
How do you enter this command on the command line?
$ man -k clear
2. Clear the terminal window.
$ clear
3. What Web site enables you to browse Sun product documentation?
The Web site http://docs.sun.com.