Contact us

Print

Using built-in help switches for commands



Exercise 3


Using built-in help switches for commands


One of the fastest ways to get help on the usage and options of a command is to directly query the utility by using one of the help switches: --help, -h, --h, or -?
In this exercise you will use this built-in help system to get help.


To use the help switch


1. Log in to the computer as root
2. To find out the options that can be used with the “passwd” command type


[[root@localhost /root]#  passwd  - -help

Usage: passwd [OPTION...] <accountName>
-d, --delete          delete the password for the named account (root only)
-f, --force           force operation
…………………………………..



3. To find out the arguments/options that can be used with the shutdown command type


[root@localhost /root]#  shutdown -h

Usage:    	shutdown [-akrhfnc] [-t secs] time [warning message]
 -a:      	use /etc/shutdown.allow



4. To see the switches that can be used with the reboot command type


[root@localhost /root]#  reboot   -?

Usage: reboot [-n] [-w] [-d] [-f] [-i] [-p]






Created by: system. Last Modification: Saturday 04 of April, 2009 21:41:18 EST by wale.

...