-
7/29/2019 Module 02- Using Command-Line Features and Online Help Resources
1/12
Module 2
Using Command-Line Features andOnline Help Resources
-
7/29/2019 Module 02- Using Command-Line Features and Online Help Resources
2/12
Objectives
Upon completion of this module, you should
be able to:
Construct and execute commands from thecommand line
Use online documentation
-
7/29/2019 Module 02- Using Command-Line Features and Online Help Resources
3/12
Constructing and Executing Commands
From a Command LineThe following are reviewed:
Introducing command-line syntax
Entering multiple commands on a singlecommand line
Control characters
-
7/29/2019 Module 02- Using Command-Line Features and Online Help Resources
4/12
Command-Line Syntax You can change the behavior of command functions by
using options and arguments, as shown in the followingtable.
Use commands: uname,date,cal,clear
Use commands with options:uname
i, uname
sr, uname -a Use commands with arguments: cal 7 2009
Use commands with options and arguments: ls, ls l, ls l /etc
-
7/29/2019 Module 02- Using Command-Line Features and Online Help Resources
5/12
Entering Multiple Commands on a Single
Command Line
You can enter multiple commands on a single command line by
using a semicolon (;) to separate each command.
Example: $ date;uname
$ cal 12 2009; date; uname -rs
The shell recognizes the semicolon as a command separator.
-
7/29/2019 Module 02- Using Command-Line Features and Online Help Resources
6/12
Using Online Documentation
The Solaris OS provides online manual
pages,which describe commands and their
usage. This section reviews:Displaying the online manual pages
Scrolling in man pages
Searching the man pages
-
7/29/2019 Module 02- Using Command-Line Features and Online Help Resources
7/12
Displaying the Online Manual Pages
The online UNIX Reference Manual (man) pages provide detailed
descriptions of UNIX commands and how to use them.
The syntax of the man command is:
man command
man option command
man option filename
Example: $ man uname
Use the man command to display the man page entry that explainsa given command.
-
7/29/2019 Module 02- Using Command-Line Features and Online Help Resources
8/12
Scrolling in Man Pages
This table shows the keys on the keyboard that you use
to control the scrolling capabilities when you are in the
man pages.
-
7/29/2019 Module 02- Using Command-Line Features and Online Help Resources
9/12
Searching the Man PagesThere are two ways to search for information in the man pages:
Search by section: The online man-page entries are organized into sections based on the type or
use of the command or file. For example, Section 1 contains user commands,while Section 4 contains information about various file formats.
Syntax:man -s number command
Example: $ man -l passwd
passwd (1) -M /usr/man
passwd (4) -M /usr/man
$ man -s 4 passwdReformatting page. Please Wait... done
-
7/29/2019 Module 02- Using Command-Line Features and Online Help Resources
10/12
Using Online Product Documentation
To start a web browser in the desktop environment, click
the clock icon located on the front panel.
To access comprehensive information on Sun products,
visit the Web site http://docs.sun.com using your webbrowser.
-
7/29/2019 Module 02- Using Command-Line Features and Online Help Resources
11/12
The docs.sun.comWeb Site
-
7/29/2019 Module 02- Using Command-Line Features and Online Help Resources
12/12
Exercise: Using Command-Line
Features Objectives
Tasks
Discussion
Solutions