0% found this document useful (0 votes)
309 views

OpenBSD Commands

This document summarizes commands specific to the OpenBSD operating system. It provides details on commands for configuring services and daemons like inetd.conf and rc.conf. It also describes commands for system administration tasks like managing users, printing, and process accounting.

Uploaded by

Mohan Ram S
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
309 views

OpenBSD Commands

This document summarizes commands specific to the OpenBSD operating system. It provides details on commands for configuring services and daemons like inetd.conf and rc.conf. It also describes commands for system administration tasks like managing users, printing, and process accounting.

Uploaded by

Mohan Ram S
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 195

 

Universal Command Guide for Operating Systems


by Guy Lotgering
John Wiley & Sons (US). (c) 2002. Copying Prohibited.

  

Reprinted for Mohan Ram Shanmugasundaram, Cognizant Technology Solutions


[email protected]
Reprinted with permission as a subscription benefit of Skillport,
http://skillport.books24x7.com/

All rights reserved. Reproduction and/or distribution in whole or in part in electronic,paper or


other forms without written permission is prohibited.
Universal Command Guide for Operating Systems

Chapter 12: OpenBSD Commands


The commands in this section are all of the commands from OpenBSD that are not listed in the Universal UNIX Commands
(Chapter 9). The commands are all listed in alphabetical order by the command name.

For cross-references to other operating systems, please see Chapter 1, the “Quick Command Index.”

/etc/inetd.conf—/etc/rc.conf

/etc/inetd.conf

UNIX Shell—N/A

Function—The Internet server database ASCII file that contains a list of available servers. Is invoked by inetd when it gets
an Internet request via a socket.

Syntax—inetd.conf

The database file must follow the following format separated by Space or Tab:
The fields are as follows: service endpoint protocol status uid program arguments
service Specifies the name of a service that is found in the services file.
endpoint Specifies the endpoint type, which can be only one of the following:
stream Specifies a stream socket.
dgram Specifies a datagram socket.
raw Specifies a raw socket.
seqpacket Specifies a sequenced packet socket.
tli Specifies all tli endpoints.
protocol Specifies a valid protocol that is found in the /etc/inet/protocols file.
status Activates nowait mode for all datagram servers except those that are single-threaded.
uid Specifies the user ID that the servers should run under.
program Specifies the server program to be started by inetd. Specify pathname.
arguments Invokes a server from the command line using a list of no more than five arguments.

File Name: inetd.conf

Directory: /etc/

Type: Text File

ftp stream TCP nowait root /usr/libexec/ftpd ftpd -US This is the line for the FTP service.

/etc/mygate

UNIX Shell—N/A

Function—Defines the systems default router or gateway.

Syntax—None

  The following is an example of a defaultrouter file:


#This is the default router
192.168.1.254

File Name: mygate

Directory: /etc/

Type: Text File

/etc/myname

Page 2 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

UNIX Shell—N/A

Function—Specifies the real hostname for the system.

Syntax—None

  Below is the contents of myname, which assigns the hostname mercury:


mercury

File Name: myname

Directory: /etc/

Type: Text File

/etc/printcap

UNIX Shell—N/A

Function—Describes printers and allows dynamic addition and deletion of printers by the spooling system.

Syntax—printcap

File Name: printcap

Directory: /etc/

Type: Text File

/etc/rc.conf

UNIX Shell—N/A

Function—A configuration file used to configure the system daemons. It has three sections, the first turns features on or
off, the second turns daemons on or off, and the third sets parameters for the daemons in use.

Syntax—daemon=flags

daemon Specifies the daemon to configure, enable, or disable.


flags Specifies configuration parameters for the daemon.

File Name: rc.conf

Directory: /etc/

Type: Text File

sendmail_flags="-bd" Example for the first section, if set to NO sendmail would not start.
sshd=YES Example for the second section, only ON or OFF are allowed.
ipfilter_rules=/etc/ipf.rules Example for the third section, only parameters to daemons started in the first two sections are allowed.

ab

UNIX Shell—All primary shells (csh, ksh,sh)

Function—Benchmarks your Apache server by sending requests to it.

Syntax—ab [options...] [http://]hostname[:port]/path

Page 3 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-k Enables multiple requests in one HTTP session. This is called HTTP KeepAlive.
-n requests Specifies the number of requests to run in the benchmark.
-t timelimit Specifies the time in seconds to use benchmarking. This sets -n to 50000.
-c concurrency Specifies the amount of requests to perform simultaneously. (Default is 1.)
-p postfile Specifies a file to send in any HTTP POST requests to the Apache server.
-A user:password Provides the server with username and password entered with a: between. (This will be sent whether the server needs
-P user:password Runs the same procedure as the -A switch, but is used with proxy servers.
-C name=value Adds a cookie to the request. The option is repeatable.
-T content-type Specifies the content-type header for usage with POST data.
Specifies verbosity level. (2+ warnings and info, 3+ response codes, 4+ shows header info.)
-v verbosity
Shows results in HTML tables (default is two columns wide, white background).
-w output HTML
Appends more headers to the request. The argument is usually in value:value form.
-H string Specifies the attributes for table.
-X string Specifies the attributes for tr.
-y string Specifies the attributes for td or th.
-z string Shows version information.
-V Shows help information.
-h Defines the URL to use when benchmarking. Http and port aren’t required.
[http://]hostname:{port}/path

File Name: ab

Directory: /usr/sbin/

Type: External

ac

UNIX Shell—All primary shells (csh, ksh,sh)

Function —Counts how long a user or users have been using their accounts.

Syntax—ac [options...] users...

-d Shows a list of the time for each day the user has been logged in.
-p Shows the total login time for each individual user.
-t tty Specifies the ttys only to show time on. Can be used multiple times. (To exclude a tty, put a ! before typing it. Wildcards can also be used.)
-w file Reads the time account from specified file, instead of default /var/log/wtmp.
users... Specifies the users to show login time on. If none are specified, all users will be used.

File Name: ac

Directory: /usr/sbin/

Type: External

ac -p -t ttyp* Shows login time about users from ttyp*.


ac -p -t !ttyp* Shows login time about users not from ttyp*.

accton

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Outputs process accounting to the specified file. Without file, process accounting will be turned off.

Syntax—accton {file}

file Specifies an existing file where the kernel stores process accounting records.

File Name: accton

Directory: /usr/sbin/

Page 4 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Type: External

accton /var/account/acct Exports system accounting information to the acct file.

addftinfo

UNIX Shell—All primary shells (csh, ksh,sh)

Function—Reads troff font file and adds font metric information that is used by the groff system.

Syntax—addftinfo [options...] res unitwidth font

-x-height height Specifies the height of lowercase letters without ascenders, such as x.
-fig-height height Specifies the height of figures.
-asc-height height Specifies the height of characters with ascenders for b, d, or l.
-body-height height Specifies the height of characters such as parentheses.
-cap-height height Specifies the height of uppercase letters such as A.
-comma-depth height Specifies the depth of a comma.
-desc-depth height Specifies the depth of characters with descenders for p, q, or y.
Specifies the depth of characters such as parentheses.
-body-depth height
Same as the corresponding parameters in the DESC file.
res
Same as the corresponding parameters in the DESC file.
uniwidth
Specifies the name of a file describing the font.
font

File Name: addftinfo

Directory: /usr/bin/

Type: External

adduser

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Adds a user to the system. Asks for required additional data that has not been specified on the command line.

Syntax—adduser [options...]

-batch user {groups...} {name} {passwd} Specifies multiple users on the command line in a compact format. (Separate multiple groups with comma
-check_only Checks the consistency in password, group, and shell databases.
-config_create Creates or edits default configuration information and message file.
-dotdir directory Copies the contents in the specified directory to the new user’s home directory.
-e method Specifies the encryption method to use on the password.
-group login_group Specifies the default login group.
-h Shows help information.
-home device Specifies the partition where all user’s home directories are located.
-message file Sends a welcome message, specified in file, to new users.
-noconfig Doesn’t read the default configuration file.
-shell shell Specifies the default shell for the new users.
-s Silent mode. Shows less information.
-uid value Specifies the lowest UID to generate when creating UIDs for the new users.
-uid_start value Specifies the lowest UID to generate when creating UIDs for the new users.
Specifies the highest UID to generate when creating UIDs for the new users.
-uid_end value
Verbose mode. Shows more information.
-v
Doesn’t encrypt the password for the new user.
-unencrypted

File Name: adduser

Directory: /usr/sbin/

Type: External

Page 5 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

afslog

UNIX Shell—All primary shells (csh, ksh,sh)

Function—Is used to gather AFS tokens for specified cells.

Syntax—afslog [options...] {arguments...}

-d Shows debug information.


-c cell Specifies the cell to use.
-k realm Specifies the Kerberos realm to use.
-p directory Specifies the directory to find the cell.
-unlog Removes all tokens and ignores all following arguments.
-createuser Tries to create a remote user principal in another cell.
arguments... Is either a name of a cell or a pathname of a file in the cell to get tokens for.

File Name: afslog

Directory: /usr/bin/

Type: External

amd

UNIX Shell—All primary shells (csh, ksh,sh)

Function—Tries to automount a file system whenever a directory or file within it is accessed.

Syntax—amd [options...] {directories...} {files...}

-n Translates alias names into official hostnames.


-p Shows the process ID for the command.
-r Restarts existing mounts as automounts.
-v Shows version and configuration information.
-a directory Specifies an alternative directory for the mount points (default is /a).
-c value Specifies the duration in seconds to cache a looked-up name (default is 5 minutes).
-d domain Specifies the local domain name.
-k architecture Specifies the kernel architecture.
-l file Specifies the file to put log records to.
-t interval.interval Specifies the interval, in tenths of a second, between NFS/RCP/UDP retries. (The interval after the dot is the retransmit counter.)
-w value Specifies the interval to wait to dismount the system, after exceeding the cache time.
-x options... Specifies what to log in run-time, multiple options must be separated by commas. (The options are: fatal, error, user, warn, info, m
-y YP-domain Specifies an alternative NIS domain from which to fetch the NIS maps.
-C cluster Specifies the cluster service name.
Specifies what to debug.
-D options...
Specifies the directory to attach itself.
directories...
Specifies the map name file which determines how to resolve the lookup.
files...

File Name: amd

Directory: /usr/sbin/

Type: External

amq

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to determine the current state of the amd program.

Syntax—amq [options...] {directories...}

Page 6 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-f Makes the program to flush the internal caches.


-h host Specifies the hostname to query (default is localhost).
-m Gets a list of mounted file systems and any errors that occurred while mounting.
-s Gets system-wide mount statistics from the automounter.
-u Tries to unmount the specified mount directories.
-v Shows version information on the automounter.
directories... Uses the specific mounted directories. If none is specified, all mount points are used.

File Name: amq

Directory: /usr/sbin/

Type: External

apm

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows the current power status or puts the system in standby or suspend mode.

Syntax—apm [options...]

-z Puts the system in suspend mode.


-S Puts the system in standby mode.
-l Shows information about estimated battery lifetime in percent.
-m Shows information about estimated battery lifetime in minutes.
-b Shows the status of the battery.
0 = high, 1 = low, 2 = critical, 3 = charging, 4 = absent, 255 = unknown.
-a Shows the status of the external charger.
0 = disconnected, 1 = connected, 2 = backup source, 255 = unknown.
-f socket Specifies a socket to connect to apmd through.
-v Verbose mode. Shows more information.

File Name: apm

Directory: /usr/sbin/

Type: External

apmd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Monitors the APM pseudo-device and executes the actions requested by the apm command.

Syntax—apmd [options...]

-d Starts debug mode.


-s Shows the current battery statistics via syslog.
-a Ignores all BIOS-initiated suspend or standby requests when not running on battery.
-q Suppresses the sound signaling on suspend and standby requests.
-e Enables power status messages.
-p Shows only battery power messages when the expected lifetime changes.
-m Disables all messages coming from the APM driver.
-t seconds Specifies the time between information polls (default is 600 seconds).
-S socket Specifies an alternative socket for communication with the apm command.
-f device Specifies an alternative device to control the APM kernel driver.

File Name: apmd

Directory: /usr/sbin/

Page 7 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Type: External

apply

UNIX Shell—All primary shells (csh, ksh,sh)

Function—Runs the specified command once for every argument specified. A magic character followed by a number will
be replaced by the remaining argument matching the number index.

Syntax—apply [options...] command arguments...

-acharacter Specifies the character to use as the magic character (default is %).
-value Specifies the number of arguments to be passed to the command each time.
command Specifies the command.
arguments... Specifies the arguments for the command.

File Name: apply

Directory: /usr/bin/

Type: External

apply -2 ls -l -F -m -F Runs first ls -l -F, then ls -m -F.


apply -2 “echo %2 %1” world! Hello “are you?” Shows “Hello world!” and then “How are you?”
How

appres

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to show how many resources will be used by a specific application.

Syntax—appres {class} {instance} [-1] {toolkitoptions}

class Is used to specify the class name of an application.


instance Is used to specify an instance name in addition to class.
-1 Matches a specific resource level.
toolkitoptions Allows the use of X toolkit options.

File Name: appres

Directory: /usr/X11R6/bin/

Type: External

arch

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to show the computer’s architecture.

Syntax—arch [option]

You can only use one of the following options and they can’t be combined:
-k Shows the kernel architecture—for example, sun4m and sun4c.
-s Shows the architecture without the system prefix.

File Name: arch

Page 8 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Directory: /usr/bin/

Type: External

arithmetic

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A simple math game that keeps track of progress and shows results after every 20 questions.

Syntax—arithmetic [options...]

-o type Specifies the type of math problem to be tested on.


+ Uses addition problems.
− Uses subtraction problems.
×  Uses multiplication problems.
/ Uses division problems.
-r range Specifies the range of numbers to be used in the game (default is 10).

File Name: arithmetic

Directory: /usr/games/

Type: External

asa, fpr

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Converts Fortran carriage control output to a printable format and sends it to STDOUT.

Syntax—asa {files...}, fpr {files...}

files...Specifies the pathname and a text file to be used for input.


The following characters are interpreted as below:
<SPACE> Outputs the rest of the line without changes.
0 Outputs a new line before printing the rest of the line.
1 Outputs a form feed before printing the rest of the line.
+ The previous new line is replaced by a carriage return before printing the rest of the line.

File Name: asa, fpr

Directory: /usr/bin/

Type: External

atactl

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to control standard IDE and ATA controller devices.

Syntax—atactl device ACTION

ACTION The following actions may be used on IDE and ATA devices:
identify Shows information about the device.
idle Sets the device to idle mode.
standby Sets the device to standby mode.
sleep Sets the device to sleep mode. Must then be reset to resume operation.
setidle value Sets the device to idle mode and sets the standby timer, specified in seconds.
setstandby value Sets the device to standby mode and sets the standby timer, specified in seconds.
checkpower Shows which mode the device is in—active, idle, or standby.

Page 9 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

device Specifies the device to manipulate.

File Name: atactl

Directory: /usr/bin/

Type: External

atactl /dev/wd0a identify Gets information about the device.

atrun

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Runs jobs that are queued by the at command to run later.

Syntax—atrun [options...]

-l load_avg Specifies a limiting load factor (default is 0.8 for single processor).
-d Shows debug information.

File Name: atrun

Directory: /usr/libexec/

Type: External

audioctl

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows and sets driver variables for various audio systems.

Syntax—audioctl [options...] {names....}

-f file Uses an alternative audio control device instead of /dev/audioctl.


-n Suppress printing the variable name.
-a Prints all variables for the device.
-w variable=value Sets the specified variables to the given values. Multiple variables may be used.
names.... Specifies the device name.

File Name: audioctl

Directory: /usr/bin/

Type: External

audioctl -w play.sample_rate=11025 Sets the playing sampling rate to 11025.

bad144

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows or writes hard disk bad sector information in standard DEC 144 format.

Syntax—bad144 [options...] disk {serial} {sectors...}

-a Adds new bad sectors to an existing list. The sectors have to be in order.

Page 10 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-c Tries to copy the old sector to the replacement.


-f Formats the new sectors as bad. Required if the sectors are not marked already.
-v Verbose mode. Shows more information.
disk Specifies hard disk device name.
serial Specifies the serial number of disk pack, a device to handle many hard disks.
sectors... Specifies one or more sectors to add or show information for.

File Name: bad144

Directory: /usr/sbin/

Type: External

badsect

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates files over the bad sectors so that no other files can use the bad sectors.

Syntax—badsect directory sectors...

directory Specifies an existing directory for bad sector files.


sectors... Specifies bad sectors to add to files. These are found in error messages.

File Name: badsect

Directory: /sbin/

Type: External

bdes

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Encrypts or decrypts from STDIN to STDOUT. It uses the Data Encryption Standard (DES).

Syntax—bdes [options...]

-a Interprets initialization vector strings and key as ASCII.


-b Sets mode to electronic code book.
-d Decrypts encrypted input.
-p Doesn’t convert the parity bit to odd. Use with ASCII key only.
-F n Sets n as alternative cipher feedback mode (is between 7 and 56 as a multiple of 7).
-f n Specifies n as cipher feedback mode (is between 8 and 64 as a multiple of 8).
-k key Specifies the cryptographic key.
-m n Specifies n as the bits to use for input to calculate the MAC (is between 1 and 64).
-o n Specifies n as output feedback mode (is between 8 and 64 as a multiple of 8).
-v string Specifies vector string to use when initializing.

File Name: bdes

Directory: /usr/bin/

Type: External

cat file1| bdes > file2 Encrypts file1 and results in file2. It will prompt for a key.
cat file2 | bdes -d > file3 Decrypts input file file2 and encrypts into the file3.

biff

Page 11 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Enables or disables mail notification. If no arguments are used, it will show the current status.

Syntax—biff [option]

n Disables mail notification.


y Enables mail notification.

File Name: biff

Directory: /usr/bin/

Type: External

boot

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Loads the system kernel, sets console baud rate, and runs various machine-dependent commands.

Syntax—boot

The following commands may be run from the boot prompt:


boot {image [options...] } Boots the specified kernel image with any options, where image=device: file.
echo {arguments...} Shows the specified arguments.
help Shows a list of available machine-dependent or other types of commands.
machine {command} Starts one of the following i386 architecture, machine-dependent commands:
diskinfo Shows hard disk information, which includes BIOS device numbers and geometry.
memory {arguments...} Shows the memory configuration allowed by BIOS routines. Arguments may be used.
arguments... Uses any argument(s) that add or remove memory. (The valid argument format is [+ or −]size@address.)
regs Shows the contents of the DEBUG compiled processor registers.
-Is directory Shows the contents of the specified directory using the long format.
reboot Reboots the system using the warm-boot procedure.
set {variable [value}] Shows a list of variables and any values if variable and value are not specified.
variable Shows the contents of the specified variable.
value Alters the value of the specified variable when used together with variable.
addr Specifies the address that the kernel will be loaded at.
howto Shows which options may be sent to the loaded kernel.
debug Sets the debug flag if boot was compiled with DEBUG defined.
device Specifies the boot device name—for example, fd0a, sd0a.
tty Specifies the device name for the console device.
image Specifies the file that contains the kernel image.
Shows the baud rate for the console device if no device or rate is given.
stty {device [rate}]
Specifies the console device to alter the baud rate of.
device
Specifies the baud rate for the device, (default is 9600).
rate
Shows the time and date of the system.
time

File Name: boot

Directory: /usr/mdec/, /

Type: External

bootpd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—The Internet Bootstrap Protocol server.

Syntax—bootpd [options...] {cfgfile} {dumpfile}

Page 12 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-i Forces inetd mode.


-s Forces the standalone mode. For backward compatibility only.
-t timeout Specifies the timeout for a BOOTP packet.
-d level Sets the debug level.
-c path Sets the current directory for checking client boot files.
cfgfile Specifies the configuration file to load the database holding client options.
dumpfile Specifies the file that the internal database will be dumped into during a SIGUSR1.

File Name: bootpd

Directory: /usr/sbin/

Type: External

bootpef

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Builds BOOTP extension files.

Syntax—bootpef [options...] {clients...}

-c directory Specifies the directory to use as current while creating files.


-d n Specifies n as debug level.
-f name Specifies the name of the configuration file for client data option.
clients... Sets the names of the clients to compile extensions for.

File Name: bootpef

Directory: /usr/sbin/

Type: External

bootpef pluto Compiles an extension file for the client pluto.


bootpef -c/tftpboot pluto Compiles an extension file for the client pluto and uses directory /tftpboot.

bootpgw

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Acts as a gateway between subnets and forwards BOOTP requests and replies.

Syntax—bootpgw [options...] server

-i Starts service in inetd mode, listens for boot requests.


-s Starts service in standalone mode, which means starts it from a shell.
-t timeout Specifies the timeout value in minutes to wait between BOOTP packet (default is 15).
-d n Specifies n as the debug level to use.
server Specifies the server name to forward boot requests to.
The next line must be put into the /etc/ inetd.conf file:
bootps dgram udp wait root /usr/sbin/bootpgw bootpgw server

File Name: bootpgw

Directory: /usr/sbin/

Type: External

bootpgw sun Starts the bootpgw service and listens for BOOTP requests to forward to the server sun.

Page 13 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

bootptest

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Tests a BOOTP server. It listens for responses on the requests sent.

Syntax—bootptest [options...] server {template}

-f bootfile Specifies the name of the boot file.


-h Identifies the client on its Ethernet address.
-m magicNR Specifies the magic number to initialize the first word in the vendor options field.
server Specifies the server to contact
template Specifies a binary file to initialize the options in the request packet.

File Name: bootptest

Directory: /usr/sbin/

Type: External

bootptest sun Sends BOOT requests and tests the server sun.

brconfig

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows and controls bridge interfaces.

Syntax—brconfig bridge commands..., brconfig -a

-a Shows status information for all bridges.


bridge Specifies the name of the bridge to manage.
These are the available commands:
up Starts the bridge and forward packets.
down Halts the bridge and stops forward packets.
addr Shows the addresses that the bridge knows about.
add interface Specifies a new interface name to be a bridge member.
delete interface Specifies an interface name to remove as a bridge member.
maxaddr size Specifies the address cache size (default is 100).
timeout time Specifies the address cache timeout in seconds (default is 240).
static interface address Sets an address as a static pointer to an interface in the address cache.
deladdr address Removes an address from the cache.
flush Removes all non-static addresses from the cache.
flushall Remove all addresses from the cache.
For the next commands, a minus (−) placed before the command means “do not”:
blocknonip interface Marks an interface so that packets that aren’t IPv4, IPv6, ARP or rARP are accepted.
Does the opposite of blocknoip.
-blocknonip interface
Sets an interface name in discover mode. It forwards packets for unknown destinations.
discover interface
Sets an interface name in learn mode. It adds source addresses into cache.
learn interface Stops forward of all non-IP multicast packets by the bridge.
link0 Stops forward of all IP multicast packets by the bridge.
link1 Adds a filtering rule to an interface.
rule {rulespec} Loads a set of rules from a file.
rulefile filename

File Name: brconfig

Directory: /sbin/

Type: External

brconfig bridge0 flushall Removes all addresses in cache for the bridge bridge0.

Page 14 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

brconfig bridge0 up -learn le0 Starts the bridge bridge0 and sets the interface le0 to not add addresses to cache.

c++

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A complete compiler for C, C++, and Assembler.

Syntax—c++ [options...] files...

-dumpspecs Shows all built-in spec strings.


-dumpversion Shows version information.
-dumpmachine Shows the target processor for the compiler.
-print-search-dirs Shows all search directories the compiler uses.
-print-libgcc-file-name Shows the name of the compiler’s companion library.
-print-file-name=library Shows the full path to the specified compiler component.
-print-multi-directory Shows the libgcc root directories.
-print-multi-lib Shows mapping between command-line options and multiple library search directories.
-Wa, options... Specifies assembler options to use. Must be separated by commas.
-Wp, options... Specifies preprocessor options to use. Must be separated by commas.
-Wl, options... Specifies linker options to use. Must be separated by commas.
-Xlinker arguments Specifies the arguments to pass to the linker.
-save-temps Doesn’t delete intermediate files.
-pipe Uses pipes instead of intermediate files.
-specs=file The content of the specified file will override the built-in specs.
-std=standard Assumes that the given standard is the input source.
-B directory Adds the specified directory to the compiler’s search paths.
Runs gcc for target <host>.
-b host
Specifies the gcc version to use (it must be installed).
-V version
Shows the programs executed by the compiler.
-v
Preprocesses.
-E
Compiles.
-S
Compiles and assembles.
-c
Specifies the output file.
-o file Specifies the language for the input files. Can either be C, C++, Assembler, or none, (“none” means as if the option had nev
-x language Specifies the input files to use.
files...

File Name: c++

Directory: /usr/bin/

Type: External

c++filt

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Organizes the C++ symbols.

Syntax—c++filt [options...] {symbols...}

-_ Removes the underscores in front of every name.


-n Doesn’t remove the underscores in front of every name.
-s method Specifies what method of mangling to use.
gnu Decodes with the gnu method.
lucid Decodes with the lucid method.
arm Decodes with the arm method.
hp Decodes with the HP method.
edg Decodes with the edg method.
--help Shows help information.
--version Shows version information.

Page 15 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

symbols... Specifies the arguments to organize. Other vice arguments are read from STDIN.

File Name: c++f ilt

Directory: /user/bin/

Type: External

c2ph, pstruct

UNIX Shell—Perl script

Function—Translates C code to Perl code.

Syntax—c2ph [options...] [variable=value] {files...}

-W Specifies wide format: type_width=45, member_width=35, offset=8.


-X Specifies hexadecimal format: offset_fmt=x, offset_width=08, size_fmt=x, size_width=04.
-n Doesn’t generate perl code.
-p Generates perl code.
-v Same as -p except that it uses C declarations for comments.
-i Does not recalculate sizes for inherent data types.
-a Shows information about inherent data types.
-t Traces execution.
variable=value Specifies values to transfer to perl.
files... Specifies C code to translate.

File Name: c2ph, pstruct

Directory: /usr/bin/

Type: Script

caesar

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to decipher caesar crypto by reading from STDIN and showing the results to STDOUT.

Syntax—caesar {rotation}

{rotation Specifies a letter rotation value to use.

File Name: caesar

Directory: /usr/games/

Type: External

calendar

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Reads from the default calendar file or from a specified one and shows any scheduled events.

Syntax—calendar [options...]

-a Processes every user’s calendar file and mails the results to them.
-A days Shows information from today and the specified number of days in the future.
-B days Shows information from today and the specified number of days in the past.
-t date Uses the specified date as today’s date. Date format is: [cc][yy][mm][dd].
-f file Uses the specified file as the default calendar file.

Page 16 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: calendar

Directory: /usr/bin/

Type: External

Tip Specifies the local national code table of your country in the calendar file by inserting LANG=locale_name.

calendar -a Processes and mails all calendar files to all users.


calendar -A 10 Shows all calendar entries from today and 10 days into the future.
calendar -B 10 Shows all calendar entries from today and 10 days in the past.

cap_mkdb

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates a hashed capability database out of the termcap or terminfo logical databases.

Syntax—cap_mkdb [options...] files...

-i Parses the capability records into terminfo format.


-f file Uses an alternate database base name.
-v Prints out the number of capability records in the database.
files... Specifies the termcap or terminfo databases to use.

File Name: cap_mkdb

Directory: /usr/bin

Type: External

cc

UNIX Shell—All primary shells (csh, ksh, sh)

Function—The C and C++ compiler for BSD. See gcc or g++ for complete information.

Syntax—cc

File Name: cc

Directory: /usr/bin/

Type: External

cccp

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A macro processor used to transform a program before compilation. Mainly used by the C compiler.

Syntax—cccp [options...] infile outfile

-$ Doesn’t allow the use of $ characters in identifiers.


-A name(value) Asserts the specified name with the token list value.
-C Passes the comments to the output file.
-D name{=definition} Defines the name as a macro with the specified definition (or 1 if none is specified).
-dD Shows a list of #define directives for macros defined during the execution.
-dM Shows a list of #define directives for all macros.

Page 17 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-l directory Adds the specified directory to search for header files.


-l Makes all the directories specified by -l only to be searched by local includes.
-H Shows the name of all used header files.
-i macros file Reads the specified file and uses all the macros on the main process.
-include file Reads the specified file and uses all the includes in the main process.
-idirafter directory Searches the directory if no include file is found in main search directories.
-iprefix prefix Specifies the prefix to use with the -iwithprefix directories.
Searches the directory if no include file is found in main search directories.
-iwithprefix directory
Specifies the source language as pure C code.
-lang-c
Specifies the source language as C++ code.
-lang-c++
-lang-objc Specifies the source language as objective C code.
Specifies the source language as objective C++ code.
-langobjc++
Looks for lint commands in comments and sets them in #pragma lint sentences.
-lint
Shows a make suitable description containing the object and include files.
-M [-MG]
Is like -M, but only shows local include files (include " ").
-MM [-MG]
-MG Assumes missing include files to be in the same directory as the source code. (Can only be combined with -M or -MM.)
Is like -M, but writes the information on the specified file.
-MD file
Is like -MD, but writes the information on the specified file.
-MMD file
Doesn’t use the standard system directories to look for include files.
-nostdinc
Doesn’t use the C++ standard system directories to look for include files.
-nostdinc++
Doesn’t let # lines to pass through the preprocessor.
-P
Shows warnings if required by ANSI C standard.
-pedantic
Shows warnings by ANSI C standard as errors.
-pedantic-errors
Tries to imitate the behavior of old-fashioned C.
-traditional
Converts to ANSI standard trigraph sequences.
-trigraphs
Doesn’t predefine the specified name.
-Uname
Doesn’t predefine nonstandard macros.
-undef
Warns if any trigraphs are encountered.
-Wtrigraphs
Warns if a comment s start sequence /* appears in a comment.
-Wcomment The same as -Wtrigraphs and -Wcomments.
-Wall
Warns if a construct differs from traditional and ANSI C.
-Wtraditional
Specifies the file to use.
infile Specifies the file to be created.
outfile

File Name: cccp

Directory: /usr/bin/

Type: External

ccdconfig

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Configures concatenated disk devices.

Syntax—ccdconfig [options...] {ccd}, ccdconfig [-v] ccd Heave flags device

-v Verbose mode. Shows more information. Cannot be used with -g option.


-f file Specifies the config file to use (default is /etc/ccd.conf).
-M core Gets name list values from a core file. Used with -g option.
-N system Gets the name list from system. Used with -g option (default is /bsd).
The following options can’t be combined:
-C Configures all the ccd devices listed in the ccd configuration file.
-g Dumps the current configuration for the specified ccds in configuration file format.
-u Unconfigures the specified ccds.
-U Unconfigures all ccds listed in the configuration file.
ccd Specifies the ccd to use. Is only required with -u option and optional with -g option.
ileave Specifies the ileave number for the ccd.
flags Specifies the flags for the ccd.
device Specifies the device for the ccd.

Page 18 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: ccdconfig

Directory: /sbin

Type: External

cdio

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A CD audio player.

Syntax—cdio [options...] {ACTION}

-s Verbose mode. Shows more information.


-V Specifies the CD device to use.
-f device Select one of the following three actions:
ACTION Silent mode. Shows less information.
play starttrack {endtrack} Plays from the start track to the end track.
play startm:starts:startf [endm:ends.endf Plays from minute:second.frame to minute:second.frame.
]
play {startblock} {length} Plays from specified block to the given length of blocks.
pause Pauses the playing.
next Plays the next track.
previous Plays the previous track.
replay Plays the current track once more.
resume Resumes playing from the place where you issued the pause command.
stop Stops playing.
eject Opens the CD tray.
close Closes the CD tray.
volume leftchannel rightchannel Sets the volume on the left and the right channels (is between 0 and 255).
volume mute Turns the sound off.
volume mono Sets to mono mode.
volume stereo Sets to stereo mode.
volume left Plays the left subtrack on both left and right channels.
volume right Plays the right subtrack on both left and right channels.
info Shows the table of contents.
status Shows current status on the disc; current playing status and position, and so forth.
help Shows help information about the commands.
debug on Turns the debugging on the CD-ROM driver on.
debug off Turns the debugging on the CD-ROM driver off.
device device Changes the default CD-ROM device to the device specified.
reset Resets the CD device’s hardware.
set msf Sets mode to minute-second-frame ioctl (is default).
set lba Sets mode to LBA ioctl.
quit Quits the program.

File Name: cdio

Directory: /usr/bin

Type: External

cdio -s play 1 5 Starts cdio in silent mode any play from track 1 to 5.
cdio pause Pauses the CD.

certpatch

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Adds subjectAltname to a PEM certificate. Signs the certificate with the signing key after the addition.

Syntax—certpatch [-t] options... infile outfile

Page 19 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-t type Specifies the type of the given identity. Can be ip, fqdn, or ufqdn.
-i identity Specifies the identity for the subjectAltname to insert into the certificate.
-k key Specifies the CA signing key to use when signing the certificate.
infile Specifies the certificate to use.
outfile Specifies where to write the new certificate.

File Name: certpatch

Directory: /usr/sbin/

Type: External

chat

UNIX Shell—All primary shells (csh, ksh, sh)

Function—An automated chat program doing conversational exchange between the computer and the modem.

Syntax—chat [options...] {script}

-f file Reads the chat script from the specified file.


-t timeout Sets the timeout for the expected string to be received.
-r file Writes the report strings to the specified file.
-e Sets the echo option to on.
-v Runs the chat script in verbose mode.
-V Runs the chat script in verbose mode and sends all verbose text to STDERR.
-s Sends all log and error messages to STDERR.
-S Doesn’t send error messages to syslog.
-T phonenumber Uses the phone number as a replacement for \T substitution metacharacter.
-U phone number 2 Uses the phone number as a replacement for \U substitution metacharacter.
script Specifies the script in the form of parameters, if a script file was not specified.

File Name: chat

Directory: /usr/sbin/

Type: External

checknr

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Checks nroff or troff files for errors such as missing delimiters and unknown commands.

Syntax—checknr [options...] file

-a .x.y Adds macro pairs to the list of pairs to check.


-c x.y Defines commands that otherwise would create error messages.
-f Ignores the changes to \f fonts.
-s Ignores the changes to \f fonts.
file The name of the file to verify (default is STDIN).

File Name: checknr

Directory: /usr/bin/

Type: External

checknr -f /var/adm/messages Checks and ignores font changes.

Page 20 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

checknr -s /var/adm/messages Checks and ignores size changes.


checknr -a.BS.ES Defines the macro pair BS and ES.

chflags

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Changes the flags/attributes for the specified files.

Syntax—chflags [options...] flags... file...

-R Changes the flags for all files in subdirectories.


The following options can only be used with the -R option:
-H Allows symbolic links on the command line.
-L Follows all symbolic links.
-P Follows no symbolic links.
flags... Specifies the flags, separated by commas, to set on the files.
The following are the flags to set. To disable the flag, put no before it.
arch Sets the archived flag.
opaque Sets the opaque flag.
nodump Sets the nodump flag.
sappnd Sets the system append-only flag.
schg Sets the system immutable flag.
uappnd Sets the user append-only flag.
uchg Sets the user immutable flag.
files... Specifies the files to set the flags on.

File Name: chflags

Directory: /usr/bin/

Type: External

chio

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A tool for controlling medium changers.

Syntax—chio [-f] ACTION

-f device Specifies the device changer, rather than the default /dev/ch0.
ACTION Select one of the following actions:
move fromET fromEU toET toEU [inv] Moves the media unit from and to the specified ET/EU.
inv Inverts the media before moving it.
exchange sETsEU d1ETd1EU {d2ET d2EU} Exchanges a media unit.

Page 21 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

{i1 i2}
sET, sEU Specifies the source ET/EU.
d1ET,d1EU Specifies the destination ET/EU.
d2ET, d2EU Specifies the second destination ET/EU to store the old destination ET/EU.
i1 Inverts the exchange from source to destination.
Inverts the exchange from destination to destination2.
i2
Sets the picker in front of the element specified.
position toET toEU[inv]
Inverts before insertion.
inv
Shows information on the changer, like slots, drivers, pickers, and portals.
params
Shows which picker is set to be used by the changer.
getpicker
Specifies the picker to be used by the changer.
setpicker unit
Shows the status of all elements in the changer.
status {type} Specifies the element type to show information on. Can be one of the following:
type Specifies all elements containing a media unit.
FULL Specifies all elements deposited by an outside human operator.
IMPEXP Specifies all elements that are in an abnormal state.
EXCEPT Specifies all elements accessible by a picker.
ACCESS Specifies all elements that support exporting to an outside human operator.
EXENAB Specifies all elements that support importing from an outside human operator.
INENAB

File Name: chio

Directory: /bin/

Type: External

chpass, chfn, chsh

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Manages user databases, allowing editing of the information within.

Syntax—chpass [options...] {username}

-a list Adds a new user entry in the database as a colon-separated list of all user fields. (Available only to the superuser and isn’t supported in
-l Alters local information instead of the information in the YP.
-s newshell Changes, if possible, the user’s shell to the new shell specified.
-y Alters information in the YP instead of the local information.
username Specifies which user’s information to edit (default is the current user).

File Name: chpass

Directory: /usr/bin/

Type: External

ci

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates and stores revisions in the specified revision control system files.

Syntax—ci [options...] files...

This is the same command as the one found in Linux. Please see ci in the Linux chapter for all the options.

File Name: ci

Directory: /usr/bin/

Type: External

Page 22 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

clri

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to clear inodes by writing zeros as the inode number.

Syntax—clri device inodes...

device Specifies the file system to clear on.


inodes... Specifies the inodes to clear.

File Name: clri

Directory: /sbin/

Type: External

Note Has been made obsolete by the fsck command.

co

UNIX Shell—|All primary shells (csh, ksh, sh)

Function—Checks out a revision from a RCS file and stores it in the corresponding working file.

Syntax—co [options...] files...

This is the same command as the one found in Linux. Please see co in the Linux chapter for all the options.

File Name: co

Directory: /usr/bin/

Type: External

colcrt

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Removes underlines or shows them on new lines filtering the nroff file for a CRT preview.

Syntax—colcrt [options...] {files...}

- Removes underline from input.


-2 Shows all underline lines on own rows.
files... Specifies a file to act upon.

File Name: colcrt

Directory: /usr/bin/

Type: External

colcrt - nroff.file > nounderline.txt Removes underlines from the nroff file
colcrt -2 nroff.file > ownunderlines.txt Shows output with separate underline lines.

colrm

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Deletes selected columns from a file reading from STDIN to STDOUT.

Page 23 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Syntax—colrm {startcolumn} {endcolumn}

startcolumn Specifies where to start in the file.


endcolumn Specifies where to end in the file.

File Name: colrm

Directory: /usr/bin/

Type: External

colrm 3 Deletes all columns starting with column 3 from all lines in the file.
colrm 3 7 Deletes all columns starting with column 3 up to and including column 7 from all lines in the file.

column

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Formats input into multiple columns.

Syntax—column [options...] files...

-c count Formats the output for a screen with the specified number of columns.
-s characters... Uses the specified set of characters as a column delimiter for the -t option.
-t Creates a table from a determined number of columns or by use of the -s option.
-x Fills the columns before the rows are filled.
files... Specifies file to act on.

File Name: column

Directory: /usr/bin/

Type: External

compile_et

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Compiles error tables, converting them to a C source file usable with the com_err library.

Syntax—compile_et file

file Specifies the file containing the error table to compile. Must have the suffix .et.

File Name: compile_et

Directory: /usr/bin/

Type: External

compile_et file.et Converts file.et to a C source file.

comsat

UNIX Shell—All primary shells (csh, ksh, sh)

Function—The daemon that listens to the datagram port for any reports of incoming mail and notifies users.

Syntax—comsat

Page 24 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: comsat

Directory: /usr/libexec/

Type: External

config

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates kernel compilation directories and allows kernel configuration.

Syntax—config [options...] configfile, config [options...] kernel

The following options can be used only if you specify a config file:
-b builddir Creates the specified build directory rather than the default /compile/configfile.
-p Configures the kernel for usage with a system including profiling code.
-s srcdir Specifies the top-level kernel source directory to use instead of the default. (Default is four directories above the build director
The following options can be used only if you specify a kernel:
-e Enables editing the configuration of the kernel s devices.
-u Checks for boot-time kernel configuration changes, compares with kernel specified. (If boot kernel is the same as specified k
Choose between the two following options:
-f Causes config to overwrite the kernel specified with the altered kernel.
-o outfile Specifies the kernel outfile.
configfile Specifies the kernel configuration file to create the kernel build directory from.
kernel Specifies the kernel to configure.
The following are internal commands:
add device Adds a device by copying the device specified.
base count Changes the base of numbers entered and shown to 8, 10, or 16.
change Configures one or several devices. The following arguments are valid:
number Specifies the device number of the device to configure.
Specifies the device to configure.
device
Disables one or several devices. The following arguments are valid:
disable
Specifies a common attribute and disables all port devices.
attribute value
Specifies the device number of the device to disable.
number
Specifies the device to disable.
device Enables one or several devices. The following arguments are valid:
enable Specifies a common attribute and enables all port devices.
attribute value Specifies the device number of the device to enable.
number Specifies the device to enable.
device Exits without saving changes.
exit Finds one or several devices. The following arguments are valid:
find Specifies the device number of the device to find.
number Specifies the device to find.
device Shows help information.
help Shows all the devices that are known, one screen at a time.
list Specifies the number of rows per page.
lines count Exits and saves changes.
quit Shows all devices with the attribute and attribute value specified.
show attribute value

File Name: config

Directory: /usr/sbin/

Type: External

csh

UNIX Shell—C shells (csh)

Function—The C-shell command interpreter that uses a syntax similar to the C language.

Syntax—csh [-l] [options...] {arguments...}

Page 25 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

- When used as the first argument, a complete login to the shell is done.
-b Lets the rest of the options pass directly to the scripts.
-c Runs the first argument from the list and passes the other arguments to csh.
-e Exits on nonzero exit status or other abnormal terminations.
-f Does a fast start. Doesn t run .cshrc and .login.
-i Forces the command prompt on any type of terminal for interactive use.
-n Interprets but doesn’t run the commands, used for debugging scripts.
-m Reads .cshrc, regardless of its own and group’s. Dangerous, should only be used as root.
-s Takes command input from the STDIN.
-t Runs a single command line.
-v Verbose mode. Shows more information. Sets verbose after reading .cshrc.
-V Verbose mode. Shows more information. Sets verbose before reading .cshrc.
-x Echoes each command before it is run. Sets echo after reading .cshrc.
-X Echoes each command before it is run. Sets echo before reading .cshrc.
The -l option can only be used alone:
-l Runs the complete login to the shell.
arguments... Specifies one or more argument to the command.

File Name: csh

Directory: /bin/

Type: External

csh Start C shell.


csh-t Reads and executes a single command line.
csh -c "Is -l" Execute Is -l in csh.

ctm

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates backup files by creating a delta between two directories.

Syntax—ctm [options...] files...

-c Checks the current directory delta without altering anything.


-F Force mode. Does the changes no matter what.
-k Keeps backup files even if the original is deleted.
-l Shows the files processed by the command, and the actions being taken on them.
-q Quiet mode. Shows less information.
-u Stores file modification time to the CTM delta creation time.
-v Verbose mode. Shows more information.
-b directory Sets the specified directory before every file.
-t command Replaces tar with the specified command. Can only be used with the -B option. (Use a %s to specify the name of the backup file.)
-T directory Specifies the directory to put the temporary files in.
-B file Backs up all files specified by the command to the specified file.
-e expression Processes the files matching the specified regular expression.
-V level Verbose mode. Shows more information, based on the level specified.
-x expression Processes the files not matching the specified regular expression.
files... Specifies backup file.

File Name: ctm

Directory: /usr/sbin/

Type: External

ctm_dequeue

UNIX Shell—All primary shells (csh, ksh, sh)

Page 26 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Function—Sends all messages in the specified queue directory.

Syntax—ctm_dequeue [options...] directory

-l file Writes all information to the specified file.


-n value Limits the number of mail messages to be sent each time.
directory Specified the queue directory to use.

File Name: ctm_dequeue

Directory: /usr/sbin/

Type: External

Tip Also see ctm

ctm_dequeue -n 1 Limits the number of messages to send to 1.

ctm_rmail

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Decodes and reassembles delta files from mail files. Is used to send and receive ctm deltas via mail.

Syntax—ctm_rmail [options...] {files...}

-l file Writes all information verbose to the specified log file.


-p directory Specifies the directory to collect delta mail pieces from.
-d directory Specifies the directory to collect complete deltas from.
-b directory Specifies the directory to apply the completed deltas in.
-D Erases deltas after successful application by ctm.
-f Sets the command to run in the background.
-u Sets the -u flag when executing ctm.
-v Makes ctm run in verbose mode.
files... Specifies file to act on.

File Name: ctm_rmail

Directory: /usr/sbin/

Type: External

ctm_rmail -p ~/pieces Collects pieces of deltas in this directory.

ctm_smail

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Splits the specified delta file into multiple mail files. Is used to send and receive ctm deltas via mail.

Syntax—ctm_smail [options...] deltafile mailfile

-l file Writes all information verbose to specified log file.


-m size Limits the maximum size for the mail message to be sent (default is 64,000 bytes).
-c size Limits the maximum size for the delta to be sent (default is no limit).
-q directory Stores the split mail files in the specified directory, instead of sending them.
deltafile Specifies the delta file to split.
mailfile Specifies the name for the split files.

Page 27 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: ctm_smail

Directory: /usr/sbin/

Type: External

ctm_smail -m 1000 delta deltamail Sets the split files to be smaller than 1,000 bytes.

cu

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Connects you to a remote computer or acts as a dial-in terminal.

Syntax—cu [options...] command ACTION

-e Uses the even parity when sending data.


-o Uses the odd parity when sending data.
--parity=none Doesn’t use any parity.
-h Uses half-duplex communication mode.
--nostop Stops the XON/XOFF handling (default is ON).
-E character Sets the escape character to the one specified (default is ~).
-z system Specifies the system to call up.
-c number Specifies a telephone number to dial.
-p port Specifies the name of the port to use.
-a port The same as -p.
-l line Specifies a device to use for communication, overrides the default search.
-s speed Sets the transmission baud rate to use.
-n Asks for a telephone number to dial.
-d Shows debugging information.
-x type Specifies what debugging types to use. Multiple types are separated with commas.
Specifies a configuration file to use.
-l file
Shows version information and exits.
-v
Shows help information.
--help
The following are internal commands to control the program. (This is documented with the default escape character ~
Terminates the connection.
~.
Sends a file to a remote UNIX system.
~p from to
Receives a file from a remote UNIX system
~t from to
Runs the specified command in a shell.
~! command Runs the specified command and sends the STDOUT to the remote site.
~$ command Runs the specified command and takes the STDIN from the remote site.
~| command Sends the STDOUT and receives the STDIN from the remote site.
~+ command Sends a break signal to the port.
~# Changes to the specified local directory.
~c directory Sends the specified file to the remote site.
~>file Asks for a local filename and a remote command and receives a file.
~< Specifies a value to set to the specified variable (default is true).
~s variable value Specifies a variable to set to false.
~! variable Suspends the current session.
~% nostop Stops the XON/XOFF handling.
~%stop Starts the XON/XOFF handling.
~v Shows a list of values of all variables available.
~? Shows help information.
ACTION You may use one of the following actions to connect. Cannot be combined.
dir Connects directly to the port specified.
system Specifies system name or hostname to contact.
number Specifies the telephone number to call.

File Name: cu

Directory: /usr/bin/

Type: External

Page 28 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

cu 7147359611 Connects to the telephone number specified.

cursor

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Sets the cursor shape in a console virtual screen system.

Syntax—cursor [options....]

-d device Sets the shape on the cursor for the specified device.
-n screen Specifies what screen number to set the parameters on.
-s line Sets the starting scan line to use for the cursor.
-e line Sets the last scan line to use for the cursor.

File Name: cursor

Directory: /usr/sbin/

Type: External

cvs

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A version control and logging system for files or directory tree structures including any versionable files.

Syntax—cvs [options...] {command} [options...]

This is the same command as the one found in Linux. Please see cvs in the Linux chapter for all of the options.

File Name: cvs

Directory: /usr/bin/

Type: External

cvsbug

UNIX Shell—Bourne primary shells (sh)

Function—Sends a CVS problem report to a central support site that runs GNATS.

Syntax—cvsbug {site} [options...]

-f file Specifies a file that contains a problem report to send.


-t address Specifies the mail address to the support site that s going to receive the reports.
-P Shows the problem report form to send. Reads the form from the variable PR_FORM.
-L Shows the available categories.
--request-id Sends a request for a submitter ID to the site or address specified.
-v Shows version information.
site Specifies a problem report site to send the reports to.

File Name: cvsbug

Directory: /usr/bin/

Type: Script

cvsbug -f report -t [email protected] Reports the problem found in file report to the specified e-mail address.

Page 29 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

dbmmanage

UNIX Shell—Perl script

Function—Manages DBM files with usernames and passwords to authenticate HTTP users.

Syntax—dbmmanage file {command} {user} {password}

The following commands can t be combined:


add Adds a username and uses the encrypted password.
adduser Asks for a password then adds a username.
check Finds a password and checks if the specified username has the specified password.
delete Removes username from the filename.
import Reads username and password from STDIN and adds them to the filename.
update The same as adduser, but it verifies that the username already exists.
view Shows the DBM file.
file Specifies the DBM file. You don t need to specify the file extension.
user Specifies the username to manage.
password Specifies an optional encrypted password to use with the username.

File Name: dbmmanage

Directory: /usr/bin/

Type: Script

dbmmanage datafile add userl F4Az\4z Adds the user userl F4Az\4z to datafile.

deroff

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Removes macro calls, requests, table descriptions, and backslashes from nroff, troff, tbl, eqn, or text files.

Syntax—deroff [-w] files...

-w Shows a word-by-word list.


files... Specifies the files to work on.

File Name: deroff

Directory: /usr/bin/

Type: External

deroff -w /etc/passwd Shows one word per line of the /etc/passwd file.

dev_mkdb

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates the /dev directory from the database /var/run/dev.db.

Syntax—dev_mkdb

File Name: dev_mkdb

Directory: /usr/sbin/

Type: External

Page 30 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

dev_mkdb Rebuilds the /dev directory.

dga

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Tests video modes for X-window by filling the screen with different colors each time a key is pressed.

Syntax—dga

b Runs a benchmark by measuring the read and write speed of framebuffers.


q Stops the program.

File Name: dga

Directory: /usr/X11R6/bin/

Type: External

dga Starts the program. After that, press the b key to start the benchmark if wanted.

dhclient

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Configures network interfaces to use DHCP.

Syntax—dhclient [options...] {interfaces...}

-1 Exits if the interface configuration fails.


-d Runs in foreground even after configuration is ready.
-p port Specifies the network port to listen for BOOT replies (default is UDP 68).
interface Specifies a network interface to configure (default is all).

File Name: dhclient

Directory: /sbin/

Type: External

dhdient-1 Starts dhdient and forces it to exit if it fails.


dhclient ep1 Starts dhdient and tries to configure the network interface ep1.
dhdient -p 69 Starts dhdient and listens to UDP port 69.

dhcpd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—It is a DHCP server that serves hosts with IP addresses on the network.

Syntax—dhcpd [options...] {interfaces...}

-p Specifies the network port to listen for request (default is 67).


-d Runs in foreground (default is a daemon in the background).
-q Specifies to send all log activity to STDERR.
-cf configuration Minimizes information shown at startup.
-If lease Specifies a configuration filename (default is /etc/dhcpd.conf).
interface Specifies a lease filename (default is /var/db/dhcpd.leases).
Specifies network interface to listen for broadcasts (default is all interfaces).

Page 31 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: dhcpd

Directory: /usr/sbin/

Type: External

dhcpd -q Starts up without so much information on the screen.


dhcpd -If /tmp/dhcpd.conf Starts up with the alternative configuration file /tmp/dhcpd.conf.

dhcrelay

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Forwards BOOTP/DHCP requests from a subnet without a DHCP server to a subnet that has a DHCP server.

Syntax—dhcrelay [options...] servers...

-p port Specifies the network port to listen for requests (default is 67).
-d Runs in foreground only (default is a daemon in the background).
-q Minimizes information shown at startup.
-i interface Specifies a network interface to forward BOOTP and DHCP requests (default is all).
servers... Specifies one or more DHCP servers to forward requests to.

File Name: dhcrelay

Directory: /usr/sbin/

Type: External

dhcrelay -q sun Forwards requests to sun and minimizes the information at startup.
dhcrelay -i ep0 sun Forwards requests to sun from interface ep0.

dig

Function—Gathers information from the DNS servers in interactive or batch mode.

Syntax—dig [@server] domain [options...]

-f file Specifies a file that contains multiple dig queries.


-T seconds Waits the specified time before performing the next dig command when using -f.
-p port Specifies what port to use when connecting to a name server (default is 53).
-P ping Runs ping to compare response times after a DNS query returns.
-t query-type DNS query type. The following types can be used:
a Specifies the network address.
any Specifies all or any information about the specified domain.
mx Specifies the mail exchanger for the domain.
ns Specifies name servers.
soa Specifies the zone of authority record.
hinto Specifies the host information.
axtr Specifies the zone transfer.
txt Specifies arbitrary number of strings.
-c query-class Specifies the network class requested in the query.
The following classes can be specified:

Page 32 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

in Specifies the Internet class domain.


any Specifies all or any class information.
-envsav Saves the current environment to the default.
-envset Same as envsav, but for batch files.
-stick Restores dig environment before each query line in a dig batch file.
-nostick Do not restore dig environment before each query line in a dig batch file.
+keyword=value Specifies an option to change in the query packet or to change dig output specifics.
% comment Includes an argument not to be parsed.
-x dot-notation-address Inverses address mapping.
Specifies the server to query.
@server
Specifies the domain to request information from.
domain

File Name: dig

Directory: /usr/sbin/

Type: External

disklabel

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows, installs, or modifies a hard disk label. Information in the disk label is used by the operating system.

Syntax—disklabel [foption] [options...] ACTION

The following function options (foption) control the function:


-w Sets a label of standard format.
-e Edits a disk label with the editor vi if the environment variable EDITOR isn’t set.
-E Edits a disk label with the built-in simple editor.
-R Restores an earlier overwritten label that is stored in a file.
-B Installs bootstrap code. To use with -w or -R.
The following options are regular options:
-N Denies writes to the pack label area.
-W Allows writes to the pack label area.
-n Changes nothing on the system, only shows what it’s doing.
-v Verbose mode. Shows more information.
-r Reads or writes directly to disk without use of the system’s copy of the label.
-b boot Sets the boot program of the system. The single level or the primary boot.
-s boot Uses the secondary boot program if the system has a two-level bootstrap.
-d Ignores all disk partitions that exist and uses the default disk label. Not with -r.
-c Updates the system copy of the disk label with the one in the disk. Not with -r.
-t Specifies the label in a format the disktab recognizes.
-f tempfile Writes to tempfile, mount point info for partitions in fstab format.
The following are commands used in the editor that starts with the -e option:

Page 33 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

? {command} Shows help information for all commands or for one specified.
M Shows a manual page.
u Reverses changes. First time, change is removed; next time, it is restored.
p Shows the existing label.
{unit} Specifies output format as unit, b, c, k, m, or g for bytes, cylinders, KB, MB, and GB.
e Sets parameters for the disk.
b Specifies where to permit changes on the disk.
r Recalculates the hard disk free space.
a {partition} Specifies a partition to add. System will ask if no partition is specified.
c {partition} Resizes a partition. System will ask if no partition is specified.
d {partition} Deletes a partition. System will ask if no partition is specified.
Specifies which configuration for disk geometry to use.
g
Choices for configuration are d for disk, b for BIOS, and u for user.
{configuration}
Alters the parameters for a partition. System will ask if no partition is specified.
m {partition}
Specifies partition mount point. System will ask if no partition is specified.
n {partition} Stores the label to a file. System will ask if no file with directory is specified.
s {file} Sets the changes to the on-disk label permanent.
w Exits the editor and the system asks to save changes.
q Exits the editor and the system will not save changes.
x Toggles export mode, allows the use of some settings available only in this mode.
X Select one of the following actions:
ACTION Specifies the hard disk to use.
disk Specifies the disk type. Is required with -w and optional with -B and -R foptions.
disktype Specifies the protofile. Is required with -R foption.
protofile Specifies the pack ID. Is optionally used with -w foption.
packid

File Name: disklabel

Directory: /sbin/

Type: External

Warning Data may be lost if this isn’t used with care.

disklabel /dev/wd0a Shows the disk label on the disk /dev/wd0a.

dmesg

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A tool for viewing the contents of the system message buffer.

Syntax—dmesg [options...]

-M core Extracts values from the name list from the specified core (default is /dev/kmem).
-N system Extracts the name list from the specified system (default is /bsd).

File Name: dmesg

Directory: /sbin/

Type: External

dmesg | grep cpu Extracts CPU information from the buffer.

dnsquery

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows information about nameservers through BIND resolver library calls.

Page 34 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Syntax—dnsquery [options...] host

This is the same command as the one found in Linux. Please see dnsquery in the Linux chapter for all the
options.

File Name: dnsquery

Directory: /usr/sbin/

Type: External

dump, rdump

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A backup program that examines your ext2 file system and determines which files to be backed up.

Syntax—dump [options...] files...

-value Specifies the backup mode (dump level 9 is default).


-0 Enables full backup mode. Backs up everything. Use this when creating a new backup.
-1 Dump level 1, incremental backup. This is the start level for incremental backups.
-2 Dump level 2, backs up files that have been changed or created since level 1 was done.
-3 Dump level 3, backs up files that have been changed or created since level 2 was done.
-4 Dump level 4, backs up files that have been changed or created since level 3 was done.
-5 Dump level 5, backs up files that have been changed or created since level 4 was done.
-6 Dump level 6, backs up files that have been changed or created since level 5 was done.
-7 Dump level 7, backs up files that have been changed or created since level 6 was done.
-8 Dump level 8, backs up files that have been changed or created since level 7 was done.
-9 Dump level 9, backs up files that have been changed or created since level 8 was done.
-a Causes dump to write backup until the device returns an EOM (end of media) string.
-c Sets dump to act like it’s writing to a cartridge tape drive. (8000bpi and 1700).
-n Notifies users in the group operator when dump requires user input.
-u Updates the file /etc/dumpdates after a successful dump.
-B blocks Specifies the number of 1 KB blocks to use per volume.
-b size Defines the number of kilobytes to use for every dump record (10 is the default).
-d density Specifies the tape density.
-f file Writes a backup to a specified device or a file. Use—for STDOUT.
-h level Doesn’t backup files that are above or at the given level.
-s feet Sets the tape length to feet. If the tape is smaller, it will prompt for a new tape.
-T date Specifies when you want to start a dump session.
When showing file systems, select only one of these two options:
-w Shows only the filenames that need to be dumped.
-W Causes dump to show file systems and highlight those that need to be dumped. (Don’t combine -w or -W with other options.)
Specifies the file or files to dump.
files...

File Name: dump

Directory: /sbin/

Type: External

dump -0 -u -f homedump /home/* Conducts a full backup, sends it to homedump and then updates the file /etc/dumpdates.
dump -S -0 / Outputs how many bytes a full dump on / will be.

dumpfs

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows information about a device or a file system specified.

Syntax—dumpfs {filesystem} {device}

Page 35 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

The following can’t be combined:


filesystem Shows the information about the specified file system.
device Shows the information about the specified device.

File Name: dumpfs

Directory: /sbin/

Type: External

dumpfs /usr/home Shows information about the home file system.

eject

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Ejects a magnetic tape.

Syntax—eject [-f]

-f tapename Specifies the tape to eject. Can either be a device or address to a remote computer.

File Name: eject

Directory: /bin/

Type: External

Note This command is actually an alias for mt -f device offline.

eject -f /dev/rst0 Ejects rst0.

elf2olf

UNIX Shell—All prirnary shells (csh, ksh, sh)

Funcion—Converts the specified ELF version module into the default OLF object module format.

Syntax—elf2olf [options...] module

-v Verbose mode. Shows more information.


-o system Uses the OLF tag for the operating system specified below.
openbsd OpenBSD.
netbsd NetBSD.
freebsd FreeBSD.
44bsd 4.4BSD.
linux Linux.
svr4 AT&T System V Release 4.
esix esix UNIX.
solaris Solaris.
irix SGI IRIX.
sco SCO UNIX.
dell DELL SVR4.
ncr NCR SVR4.
module Specifies a ELF module to convert.

File Name: elf2olf

Directory: /usr/bin/

Page 36 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Type: External

encrypt

UNIX Shell—All prirnary shells (csh, ksh, sh)

Function—Shows the encrypted form of the string to the STDOUT.

Syntax—encrypt [options...] {string}

-k Specifies to be in makekey-compatible mode.


-b rounds Specifies to use Blowfish hashing for encrypting, with the specified rounds.
-m Specifies to use MD5 when encrypting the string.
-s salt Specifies to use DES when encrypting, with the specified salt.
-p Prompts for a single string with no echo.
string Specifies the string to encrypt.

File Name: encrypt

Directory: /usr/bin/

Type: External

error

UNIX Shell—All prirnary shells (csh, ksh, sh)

Function—Is used to insert compiler error messages into a source file.

Syntax—error [options...] {file}

-n Does not modify any files, but shows all error messages.
-q Asks if the error should be inserted into the file—respond with a y or n.
-s Shows statistics regarding the error categorization.
-v Runs the vi program on all touched files to edit the errors.
-t suffixlist Specifies a suffix list for the files to modify.
-l ignorefile Specifies names of functions to ignore, instead of .errors from the home directory.
file Specifies a file to use error messages from instead of STDIN.

File Name: error

Directory: /usr/sbin/

Type: External

ext_srvtab

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Reads service key files from Kerberos key distribution center database.

Syntax—ext_srvtab [options...] {host...}

-n Specifies to read the master key from the master key cache file.
-r realm Specifies the realm fields in the extracted file match the specified realm.
host... Creates service kev file for the specified host.

File Name: ext_srvtab

Directory: /usr/sbin/

Page 37 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Type: External

fdisk

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A utility for handling DOS partitions.

Syntax—fdisk [options...] device

-i Initializes the MBR sector.


-e Edits existing MBR sectors.
-f fileSpecifies an alternate MBR template file.
-c Specifies the number of cylinders to use.
-h Specifies the number of headers to use.
-s Specifies the number of sectors to use.
device Specifies the device to work on.
Following is a list of commands to use within the program:
help Shows help information.
manual Shows the manual for f disk.
reinit Re-initializes the current selected partition with the boot block.
disk Shows the current disk’s geometry.
edit Edits parts of the current boot block.
flag Sets the current partition as bootable.
update Updates the actual boot block with the newly edited block.
select Selects and loads the boot block into memory.
print Shows the selected in-memory boot block and its tables.
write Writes the in-memory boot block to disk.
exit Exits the current level, or the program, if in the topmost level.
quit Like exit, but will write the modified block out.
abort Exits the program without saving changes.

File Name: fdisk

Directory: /sbin/

Type: External

file2c

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Decompiles binary or other files into C-source.

Syntax—file2c {string1} {string2}

string1 Shows the specified string before the output data.


string2 Shows the specified string after the output data.

File Name: file2c

Directory: /usr/bin/

Type: External

flex, flex++

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to create a scanner program that recognizes lexical patterns in a text.

Page 38 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Syntax—flex [options...] {files...}

This is the same command as the one found in Linux. Please see flex in the Linux chapter for all the options.

File Name: flex

Directory: /usr/bin/

Type: External

fortune

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows an interesting or funny phrase from various files randomly each time you execute it.

Syntax—fortune [options...] [{percents%] files...}

-a Grabs phrases from all lists available.


-e Uses fortune files as if they were of equal size.
-f Shows a list of the files that would be used when grabbing phrases.
-l Shows only long phrases.
-m pattern Shows all fortunes containing the specified pattern.
-o Shows only rude fortunes.
-s Shows only short phrases.
-i Disables case-sensitivity when using -m.
-w Waits before exiting the program. Time is based on the number of characters.
percents% Specifies the probability that a phrase is taken from the following file—for example, 75%.
files... Specifies one or more files or directories containing phrases.

File Name: fortune

Directory: /usr/games/

Type: External

fortune 50% humorists 50% linuxcookie Grabs a fortune from either the humorists or linuxcookie files.
fortune -l drugs Grabs a long fortune from the drugs file.

fpr, asa

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Interprets Fortran carriage-control characters into line printer control characters.

Syntax—fpr {files...}

files... Specifies one or more input files.

File Name: fpr

Directory: /usr/bin/

Type: External

ucgprog | fpr | lpr Converts the output from the Fortran program and sends it to the printer.

from

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows headers for mail sent by the specified sender.

Page 39 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Syntax—from [options...] {username}

-s sender Shows headers for mail sent by sender.


-f file Reads from the specified file instead of the default mailbox.
username Specifies the username to check on. If not specified, current user is used.

File Name: from

Directory: /usr/bin/

Type: External

from Shows all users that have sent mail to the user.
from -s ucg Shows a header for all mail sent by ucg.

fsck_ext2fs

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Makes an interactive file system consistency check and repairs the specified file systems.

Syntax—fsck_ext2fs [options...] filesystems...

-b number Specifies the number of the superblock for the file system.
-d Shows debug information.
-f Forces checking of file systems.
-m octal Specifies the permissions bits, in octal, when creating the lost+found directory.
-p Specifies to be in preen mode. Limited inconsistent correction.
-y Specifies to do a yes response to all questions asked.
-n Specifies to do a no response to all questions asked, except for CONTINUE.
filesystems... Specifies the file system to repair.

File Name: fsck_ext2fs

Directory: /sbin/

Type: External

fsck_ext2fs /dev/wd0e Performs file system check on Linux file system /dev/wd0e.
fsck_ext2fs -f /dev/wd0e Forces check, ignores the “clean” flag.
fsck_ext2fs -y /dev/wd0e Performs file system check, and assumes that you would answer yes on all questions.

fsck_ffs

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Makes a fast file system consistency check and interactive repair for the specified file system.

Syntax—fsck_ffs [options...] {filesystems...}

-p Specifies to be in preen mode. Limited inconsistent correction.


-f Forces checking of file systems.
-m octal Specifies the permissions bits, in octal, when creating the lost+found directory.
-b number Specifies the number of the superblock for the file system.
-c level Changes the file system to level (0–3). The level can only be raised.
-y Specifies to do a yes response to all questions asked.
-n Specifies to do a no response to all questions asked, except for CONTINUE.
filesystems... Specifies the file system to repair.

Page 40 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: fsck_ffs

Directory: /sbin/

Type: External

fsck_ffs /dev/wd0a Performs file system check on BSD file system /dev/wd0a.
fsck_ffs -f/dev/wd0a Forces check, ignores the “clean” flag.
fsck_ffs -y /dev/wd0a Performs file system check, and assumes that you would answer yes on all questions.

fsck_msdos

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Makes a DOS/Windows (FAT) file system consistency check and repairs the specified file systems.

Syntax—fsck_msdos [options...] filesystems...

-p Specifies to be in preen mode. Limited inconsistent correction.


-f Present only for compatibility reasons.
-n Specifies to do a no response to all questions asked, except for CONTINUE.
-y Specifies to do a yes response to all questions asked.
filesystems... Specifies the file system to check and repair.

File Name: fsck_msdos

Directory: /sbin/

Type: External

fsck_msdos /dev/fd0 Performs a file system check on MS-DOS file system /dev/f d0.
fsck_msdos -y /dev/fd0 Performs file system check, and assumes that you would answer yes on all questions.

fsdb

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A tool for debugging and editing file system inode data.

Syntax—fsdb [-d] -f partition

-d Shows more debug information.


-f partition Specifies the partition to edit or debug.

File Name: fsdb

Directory: /sbin/

Type: External

fsinfo

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows information, including the capabilities about X font servers on the network.

Syntax—fsinfo [-server hostname]

-server hostname Is used to specify the server and optionally the port, to show information about.

Page 41 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: fsinfo

Directory: /usr/sbin/

Type: External

fsinfo -server localhost:7100 Shows font server info from localhost:7100.

fsirand

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates random inode generation numbers on all inodes on the specified device. It also creates a file system ID
in the superblock.

Syntax—fsirand [options...] device

-b Defaults to the 512KB block size instead of what’s gathered from the disklabel.
-f Forces command to run even on unclean file systems.
-p Shows the generation numbers for all inodes.
device Specifies the special device that holds the inodes.

File Name: fsirand

Directory: /sbin/

Type: External

fslsfonts

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows the fonts on the font server that match the pattern specified. Wildcards * can be used.

Syntax—fsltonts [options...]

-server host:port Specifies the X font server and port to use.


-l Shows attributes of the font next to the font name.
-ll Shows font parameters together with the -l option.
-lll The same as -ll.
-m Shows the minimum and maximum bounds for each font.
-C Shows information in multiple columns.
-1 Shows information in a single column.
-w width Is used to specify the width of the column in characters (default is 79).
-n columns Is used to specify the number of columns to show.
-u Doesn’t sort the information.
-fn pattern Specifies the pattern that fslfonts must match with.

File Name: fslsfonts

Directory: /usr/X11 R6/bin/

Type: External

fslsfonts -u Runs fslsfonts and leaves all output unsorted.

fsplit

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Reads Fortran source code from a file or STDIN and splits the input into separated routine files.

Page 42 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Syntax—fsplit -e subprograms... {file}

-e subprograms... Specifies the subprogram units that only will be split into separated files.
file Specifies the Fortran file to split.

File Name: fsplit

Directory: /usr/bin/

Type: External

fsplit -e readit -e doit prog.f Splits readit and doit into separated files.

fstat

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Identifies and shows all open files in the system.

Syntax—fstat [options...] {files...}

-f Restricts the examination of files to the specified file.


-n Specifies to be in numerical format.
-v Verbose mode. Shows more information.
-M core Reads values associated with the specified core list instead of the default /dev/kmem.
-N system Reads the name list from the specified system (default is /bsd).
-p PID Shows all files open with the specified PID.
-u user Shows all files open by the specified user.
files... Specifies the file to restrict your reports to.

File Name: fstat

Directory: /usr/bin/

Type: External

fstat -p 9386 Shows all files opened by process 9386.


fstat -u ucg Shows all files opened by user ucg.

fstobdf

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates BDF fonts from an X font server. It is used to debug fonts and re-create BDF files.

Syntax—fstobdf [-server hostname] -fn name

-server hostname Specifies the server to read the font from.


-fn name Specifies the font to create a BDF file for.

File Name: fstobdf

Directory: /usr/X11R6/bin/

Type: External

fstobdf -fn terminal Creates a BDF font from the terminal font from the default font server.
fstobdf -fn terminal -server localhost:7100 Creates a BDF font from the terminal font from localhost:7100 font server.

Page 43 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

fvwm

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A window manager for X11. Is used to minimize memory consumption, provide a 3-D look to window frames.

Syntax—fvwm [options...]

-f configfile Reads the specified config file as its initialization file (default is .fvwm2rc).
-cmd initcmd Specifies the initialization command to use instead of read .fvwm2rc.
-debug Shows debug information. Slows things down, but guarantees the error messages are right.
-d ddisplay Specifies to use display instead of the name from the environment variable $DISPLAY.
-s Runs only on the screen named in $DISPLAY or the display specified in the -d option.
--version Prints the version to STDERR.

File Name: fvwm

Directory: usr/X11R6/bin/

Type: External

Tip The -f and -cmd options can be used 10 times and they will be executed in the order specified.

g++

UNIX Shell—All primary shells (csh, ksh, sh)

Function—The C++ compiler version of gcc.

Syntax—g++ [option...]

This is the same command as the one found in Linux. Please see g++ in the Linux chapter for all the options.

File Name: g++

Directory: /usr/bin/

Type: External

g++ hello.cpp -o hello Compiles and links hello.cpp; produces binary file hello as output.

g77, f77

UNIX Shell—All primary shells (csh, ksh, sh)

Function—The GNU Fortran compiler. This can also be started using f77.

Syntax—g77 [options...] files...

-c Compiles or assembles the file. Outputs an object file.


-Dmacro Defines a macro with the value 1.
-Dmacro=value Defines a macro with the specified value.
-E Runs the preprocessing stage. Sends the preprocess source to STDOUT.
-g Adds debugging information.

Page 44 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-Idirectory Specifies directory to search for include files.


-Ldirectory Specifies directory to search for library.
-llibrary Specifies a library to use when linking.
-nostdinc Doesn’t search standard system directories for include files.
-O Uses optimize compilation.
-o file Sends the output to file.
-S Runs the compilation, but doesn’t assemble. Sends the assembler code to STDOUT.
-Umacro Undefines the macro.
-v Verbose mode. Shows more information.
-Wall Turns on all warning messages.
Specifies the source files.
files...

File Name: g77, f77

Directory: /usr/bin/

Type: External

g77-S Stops after the stage of compilation proper, doesn’t assemble.

gcc, cc

UNIX Shell—All primary shells (csh, ksh, sh)

Function—The GNU project C and C++ compiler.

Syntax—gcc [options...] files...

This is the same command as the one found in Linux. Please see gcc in the Linux chapter for all the options.

File Name: gcc, cc

Directory: /usr/bin/

Type: External

gdb

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A debugger that can manage debugging of C, C++, and Modula-2 code. A.K.A. GNU Debugger.

Syntax—gdb [options...] {ACTION}

This is the same command as the one found in Linux. Please see gdb in the Linux chapter for all the options.

File Name: gdb

Directory: /usr/bin/

Type: External

gdb -nw -command=gdb.command Runs the gdb script gdb.command and prints to STDOUT.

gencat

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Formats text from a message file and merges the information into the formatted message database called a cat
file.

Syntax—gencat outputfile inputfiles...

Page 45 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

outputfile Specifies the database file to create.


inputfiles... Specifies the message files to read from.

File Name: gencat

Directory: /usr/bin/

Type: External

getNAME

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Captures NAME sections from manual sources, and can be used to create manual introduction sections or a
TOC.

Syntax—getNAME [options...] files...

-i Reports information from the manual that is useful for manual section introduction.
-t Reports information from the manual that is useful for table of contents creation.
-w Determines if traditional, new, or unknown formats exist.
files... Specifies the manual source that the NAME section will be extracted from.

File Name: getNAME

Directory: /usr/libexec/

Type: External

getNAME /usr/man/man1/* Shows the name section of the man files in /usr/man/manl/*.

getty

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to manage ports and terminal lines. Is not usually used on the command line.

Syntax—getty option

type Is used to specify a line configuration found in /etc/gettytab.


tty Specifies the tty device name found in /dev.

File Name: getty

Directory: /usr/libexec/

Type: External

gnubc

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to calculate arbitrary precision numbers. Statements will be read from a file specified or from STDIN.

Syntax—gnubc [options] {file}

-l Uses the standard math library.


-w Shows POSIX warning extensions.
-s Uses the POSIX bc language.
-q Doesn’t show the welcome message.
-v Shows version information.

Page 46 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

file Specifies a file that contains statements to calculate.

File Name: gnubc

Directory: /usr/bin/

Type: External

grodvi

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A groff driver that creates TeX dvi files that can then be printed out.

Syntax—grodvi [options...] {files...}

-d Allows horizontal and vertical line implementation, but ignores all other draw commands.
-v Shows version information.
-w value Sets the line thickness to the specified value in thousandths of an em.
-F directory Searches the specified directory for device and font description files.
files... Specifies the dvi file or files to create.

File Name: grodvi

Directory: /usr/bin/

Type: External

groff

UNIX Shell—All primary Shells (csh, ksh, sh)

Function—The front end to the document formatting system used by groff.

Syntax—groff [options...] {files...}

This is the same command as the one found in Linux. Please see groff in the Linux chapter for all the options.

File Name: groff

Directory: /usr/bin/

Type: External

grog

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Guesses which groff option is required for printing a specific file and sends this answer to STDOUT.

Syntax—grog [options...] {files...}

This is the same command as the one found in Linux. Please see grog in the Linux chapter for all the options.

File Name: grog

Directory: /usr/bin/

Type: External

grolj4

UNIX Shell—All primary shells (csh, ksh, sh)

Page 47 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Function—A groff driver that is used for creating output that can be printed onto an HP LaserJet 4-type printer.

Syntax—grolj4 [options...] {files...}

-c pages Specifies the number of copies to print.


-l Prints documents in landscape format.
-p size Sets paper size. Select letter, legal, executive, a4, com 10, monarch, c5, b5, or d1.
-v Shows version information.
-n {number} Uses duplex mode: 1- long side binding (is default), 2- short side binding.
-w thickness Sets the default line thickness to thousandths of an em.
-F directory Searches the specified directory for the device and font description file devlj4.
files... Specifies the file or files to create.

File Name: grolj4

Directory: /usr/bin/

Type: External

grolj4 -c4 -pa4 diploma.ps Prints four copies of diploma.ps and uses the a4 format.

grops

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Translates GNU troff output into PostScript. Usually started by groff -Tps.

Syntax—grops [options...] {files...}

-b level Works around spoolers and previewers that can’t manage DSC 3.0 conventions.
The following manage levels determine what will be done to the output:
0 Does not activate any workarounds (is default).
1 Blocks %%BeginDocumentSetup and %%EndDocumentSetup comments.
2 Blocks lines in files that have %!. This is used for Sun’s Pageview previewer.
4 Blocks %%Page, %%Trailer, and End-Prolog comments.
8 Forces output’s first line to be %!PS-Adobe-2.0, not %!PS-Adobe-3.0.
-c amount Specifies the number of copies to create of each page.
-g Generates documents that can be printed on letter and a4 by guessing the page length.
-l Prints out the document in the landscape format.
-m Turns on the manual feed.
-w thickness Specifies line thickness in thousandths of an em.
-F directory/devname Specifies the directory and file to search for device and font description files.
-v Shows version information.
files... Specifies the PostScript output file or files to create.

File Name: grops

Directory: /usr/bin/

Type: External

grops -g ugcontract.ps Prints the document ucgcontract.ps on either a4 or letter paper format.
grops -g -I ucgcontract.ps Prints the document ucgcontract.ps on either a4 or letter but using the landscape format.

grotty

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Translates GNU troff output into a simple printer format. Usually started from groff.

Page 48 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Syntax—grotty [options...] {files...}

-F directory/devname Specifies the directory and file to search for device and font description files.
-h Puts horizontal tabs every eight columns in the output.
-f Puts form feeds in the output if the page has no output on the last line.
-b Suppresses the use of overstriking all bold characters.
-u Suppresses the use of underlining all italic characters.
-B Allows only overstrike on bold-italic characters.
-U Allows only underline on bold-italic characters.
-o Suppresses overstrike on other than bold or underlined characters.
-d Ignores all \D commands.
-v Shows version information.
files... Specifies the file or files for output.

File Name: grotty

Directory: /usr/bin/

Type: External

groupadd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates a new group and adds it to the system.

Syntax—groupadd [options...] group

-g GID Assigns a specific GID number to the new group.


-o Allows the duplication of the GID.
-v Verbose mode. Shows more information.
group Specifies the name of the new qroup.

File Name: groupadd

Directory: /usr/sbin/

Type: External

groupadd ucg Adds the group ucg to the system.


groupadd -g 101 ucg Adds the group ucg to the system with a GID of 101.

gunzip

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Extracts files created by gzip, zip, compress, or pack.

Syntax—gunzip [options...] {names...}

-a Is ASCII text mode, converts end-of-lines. Supported only for some non-UNIX systems.
-c Doesn’t change the file and write to STDOUT.
-f Forces decompression.
-h Shows help information.
-l Shows information about compressed file.
-L Shows information about license and then quits.
-n Doesn’t restore filenames if present (is default).
-N Restores filename if it exists.
-r Decompresses recursive.
-S .ext Specifies suffix of the output file.
-q Uses quiet mode.

Page 49 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-t Tests the file integrity.


-v Verbose mode. Shows more information.
-V Shows version information.
names... Specifies one or more files to decompress.

File Name: gunzip

Directory: /usr/bin/

Type: External

gunzip ucg.gz Extracts the file ucg.gz to ucg.


gunzip -l -v ucg.gz ucg.Z Shows information about ucg.gz and ucg.Z.

gzcat

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Uncompresses a list of files from the command line or STDIN and writes the uncompressed data to STDOUT.

Syntax—gzcat [options...] files...

-f Forces compression or decompression.


-h Shows help information.
-L Shows information about license.
-V Shows version information.
files... Specifies the input file(s).

File Name: gzcat

Directory: /usr/bin/ Type

Type: External

Note Is sometimes used instead of zcat to preserve the original link to compress.

gzcat -L Shows the gzip license and then quits.

gzexe

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Compresses executable files into a self-extracting archive.

Syntax—gzexe [option] {files...}

-d Decompresses the specified file or files.


files... Specifies the file or files to compress.

File Name: gzexe

Directory: /usr/bin/

Type: External

Note Performance will suffer from use of this command— recommended only on small disks.

gzexe ls Compresses the command Is. It will expand on the fly when used.
gzexe -d Is Decompress Is to original size.

Page 50 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

gzip

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Compresses files with Lempel-Ziv-coding.

Syntax— gzip [options...] {files...}

-a Is ASCII text mode, converts end-of-lines. Supported only for some non-UNIX systems.
-c Doesn’t change file, only writes to STDOUT.
-d Decompresses the file. This is the same as using the gunzip command.
-f Forces compression.
-h Shows help information.
-l Shows information about compressed file.
-L Shows information about license and quits.
-n Doesn’t save name and timestamp.
-N Saves name and timestamp.
-q Suppresses all warnings.
-r Compresses all files in subdirectories, recursively.
-S .ext Specifies the suffix.
-t Tests integrity of the file.
-v Verbose mode. Shows more information.
-V Shows version information.
-number Specifies the compression rate 1 is fast but least compressed, and 9 is slow but most compressed.
--fast Specifies to use the fast but least compression rate. The same as -1.
--best Specifies to use the slow but most compression rate. The same as -9.
files... Specifies one or more files to compress.

File Name: gzip

Directory: /usr/bin/

Type: External

gzip ucg.filename Compresses the file ucg.filename.


gzip -9 -r ucgdir Compresses all files in the directory ucgdir with maximum compression.

h2ph

UNIX Shell—Perl script

Function—Converts the specified C header files into Perl header file format.

Syntax—h2ph [options...] {files...}

-d path Specifies a directory to save the converted filename to.


The -r and -a options can’t be combined.
-r Runs on all files in all subdirectories.
-a Runs on the filenames and all .h files that they include.
-l Replicates all links into the specified directory.
-h Creates hints into the Perl file to make it easier to troubleshoot the script.
-D Takes code from the .h file and adds that as comments to the .ph file. Used for debug.
-Q The quiet mode. Doesn t show names of converted files.
files... Specifies the header files to convert.

File Name: h2ph

Directory: /usr/bin/

Page 51 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Type: Script

h2xs

UNIX Shell—Perl script

Function—Creates Perl extensions from C header files,

Syntax—h2xs [options...] {files... directories...}

-A Skips all autoloaded values and disables the autoloader in the .pm file.
-C Doesn’t create the changes file, and adds a HISTORY section to POD template.
-F Specifies flags for C preprocessor to find function parameters in header. (You need to use the -x option with -F.)
-M expression Specifies macros or functions to process.
-O Overwrites directories if they already exist.
-P Skips the stub POD section.
-X Skips the XS portion. Used to create templates for non-XS-based modules.
-a Creates accessory method for each method of struts and unions.
-c Skips constants in the .as file and matching autoloads in the .pm file.
-d Shows debug information.
-f Creates an extension for a header.
-h Shows help information.
-k Skips the const attribute in the XS code.
-m Creates a perl variable for each corresponding variable in the header file.
-n module Specifies name to use for extension.
-o expression Specifies opaque data. (When you use -o you have to use the -x option.)
-p prefix Specifies prefix to remove from the Perl function names.
-s sub 1,sub2 Creates subroutines for the specified macros.
-v version Specifies the version number for this extension.
-x Creates XSUBs from function declarations in the header file.
files... Specifies header file or files.
Specifies the extra directories that have C header files.
directories...

File Name: h2xs

Directory: /usr/bin/

Type: Script

help

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Assists the user and system administrators in the use of OpenBSD.

Syntax—help {command}

command Shows help information for the specified command name.

File Name: help

Directory: /usr/bin/

Type: External

Note This is interchangeable with the command man.

help Shows a general help for new users.


help ls Shops help information for Is.
help find Shows help information for find.

hexdump

Page 52 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows files in ASCII, hexadecimal, decimal, or octal format on STDOUT

Syntax—hexdump [options...] {files...}

-b Shows the output as 1-byte octal format.


-c Shows the output as 1-byte character format.
-d Shows the output as 2-byte decimal format.
-o Shows the output as 2-byte octal format.
-v Shows every line of output. Otherwise, equal lines are only shown with a single *.
-x Shows the output as 2-byte hexadecimal format.
-e string Specifies a format string to use.
-f file Specifies a file containing format information.
-n count Shows only the specified length of input.
-s count Skips the specified number of bytes from the beginning of the input.
files... Specifies one or more files to show. If not specified, STDIN is read.

File Name: hexdump

Directory: /usr/bin/

Type: External

host

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Looks up hostnames or IP addresses using name servers.

Syntax—host [options...] name {server} {zone}, host [options...] option names..., host [options...] option zone

-w Waits forever for a response.


-v Verbose mode. Shows more information.
-r Returns only data from its own database. Doesn’t ask another server.
-d Shows debug information. Shows details about network transactions.
-t querytype Specifies the query type.
-a This is a synonym for -v -t any.
-I zone Shows a complete domain from the specified zone.
-H Shows the count of unique hostnames encountered within the zone.
-G Implies -H, but shows the names of gateway hosts.
-E Implies -H, but shows the names of extra zone hosts.
-D Implies -H, but shows the names of duplicate hosts.
-C Initiates the SOA records for the used zone to be compared as found at each server.
-A Specifies that it is to be in a special address mode.

Page 53 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-L level Specifies the level to recursively create zone listings.


-S Shows statistics about the types of resource records found during zone listings.
-p Contacts only the primary name server for zone transfers during zone listings.
-P server Prioritizes the specified server residing in domains given in a comma-separated list.
-N skipzone Stops zone transfers for the zones specified in a comma-separated list.
-f logfile Saves the resource record output to the specified file and shows it also on STDOUT.
-F logfile Same as -f, but all STDOUT goes to the log file.
-I chars Specifies a character to avoid warning messages about illegal domain names.
-i Creates a query for the reverse mapping inaddr.arpa domain.
-n Creates a query for the reverse mapping nsap.int domain.
-q Specifies to be in quit mode.
-T Shows the time-to-leave values.
-Z Shows the chosen resource record output in full zone file format.
Sets the class to look in when searching non-Internet data.
-c class
Excludes information about names not residing in the specified zone during listings.
-e
Same as -t MAILB.
-m
Stops the resource record output to STDOUT.
-o
Turns off the name server recursion in the request.
-r
Specifies that normally query name should be fully qualified.
-R
Specifies the timeout value for a new name server.
-s seconds
Uses virtual circuits (TCP) instead of datagrams (UDP) when doing name server queries.
-u
Allows multiple arguments on the command line.
-x
Specifies an explicit server to use. Implies the -x option.
-X server
Specifies the hostname or IP address to search for.
name Specifies a server to query.
server Specifies a domain zone name to query.
zone

File flame: host

Directory: /usr/sbin/

Type: External

Tip host is better than nslookup but dig is better than host.

host -l ucgbook.com Shows all hosts under ucgbook.com.


host -a ucgbook.com Shows any available info about the domain.

hpftodit

UNIX Shell—All primary shells (chs, ksh, sh)

Function—Uses an HP tagged font metric file and creates a font file for use with groff -Tlj4.

Syntax—hpftodit [options...] HPfile fontfile outfile

-s Specifies that a font is special and adds it to the font file.


-v Shows version information.
-in Generates an italic correction for each character with the specified number of units.
HPfile Specifies the HP tagged font metric file to use as input.
fontfile Specifies a file containing the groff names for characters in the font.
outfile Specifies the name of the file containing the output groff font file.

File Name: hpftodit

Directory: /usr/bin/

Type: External

htdigest

Page 54 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

UNIX Shell—All primary shells (chs, ksh, sh)

Function—Manages HTTP user authentication files.

Syntax—htdigest [-c] file realm user

-c Is used to create a password file, even if it exists.


file Specifies the file that holds password, realm, and username information.
realm Specifies the realm where the user belongs.
user Specifies the username that you want to manage.

File Name: htdigest

Directory: /usr/bin/

Type: External

htdigest -c pass Home Scarloc Creates pass and adds the user Scarloc to the realm Home.

htpasswd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Manages HTTP user authentication.

UNIX Shell—All primary shells (chs, ksh, sh)

Syntax—htpasswd [options...] passwordfile user {password}

-b Uses the command line to get the password.


-c Creates a password file even if it exists.
The following four encryption methods can’t be combined:
-m Uses the MD5 algorithm for passwords.
-d Uses crypt for passwords.
-s Uses the SHA encryption for passwords.
-p Uses plain text passwords.
passwordfile Specifies the file that holds password username information.
user Specifies the username to work with.
password Specifies the password to encrypt with -m, d, s, or p. Only used with the -b option.

File Name: htpasswd

Directory: /usr/bin/

Type: External

httpd

UNIX Shell—All primary shells (chs, ksh, sh)

Function—The Apache Internet Web server.

Syntax—httpd [options...]

-X Runs the server in single-process mode.


-R libexecdir Specifies where the server will put dynamic shared object files.
-d serverroot Is used to set the root directory for the server.
-f config Specifies a config file with startup commands.
-C bconfig Runs the specified configuration before reading the config file.
-c aconfig Runs the specified configuration after reading the config file.
-D params Is used to specify parameters to be used with IfDefine tags.
The following options can’t be combined with those above:

Page 55 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-h Shows help information.


-l Shows a list of compiled modules.
-L Shows a list of directives and attributes.
-v Shows version information.
-V Shows version and build information.
-S Shows the settings that are in the config file.

File Name: httpd

Directory: /usr/sbin/

Type: External

iceauth

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Modifies or shows authorization information to connect with ICE.

Syntax—iceauth [-f file] [options...] {commands...}

-f file Specifies the authority file.


-v Enables extra messages.
-q Disables extra messages.
-i Ignores locks on authority file.
-b Breaks locks on authority file.
commands... Here are the commands to use in the ICE program:
add Adds an entry.
exit Saves changes and exits program.
extract Extracts entries into file.
help Shows help information.
info Shows information about entries.
list Shows entries.
merge Merges entries from files.
quit Aborts changes and exits program.
remove Erases entries.
source Reads commands from file.
? Shows help information.

File Name: iceauth

Directory: /usr/X11R6/bin/

Type: External

iceauth info Shows information about auth entries.

ident

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Searches for RCS keyword strings in files.

Syntax—idend [options...] files...

-q Suppresses warning messages.


-V Shows version information.
files... Specifies the files to search in.

Page 56 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: ident

Directory: /usr/bin/

Type: External

Note The strings are normally inserted from the RCS command co, but can also be inserted manually.

identd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Searches TCP/IP connections and shows the usernames that own the connections.

Syntax—identd [options...]

The following three options are not to be combined:


-i Runs as if started from inetd with the nowait option.
-w Runs as if started from inetd with the wait option.
-b Runs as a stand alone daemon.
All the following options can bc combined with any mode of operation.
-h Shows the username as an opaque token in the log for later examination.
-t time Specifies the timeout in seconds when running in wait mode (default is none).
-u user ID Specifies the user to switch to after connection, if run as a standalone daemon.
-g groupID Specifies the group to switch to after connection, if run as a standalone daemon.
-p port Specifies an alternative service or port, if run as a standalone daemon.
-a address Specifies an IP address in dotted quad format, if run as a standalone daemon.
-V Shows version information.
-l Logs all information in with the syslogd command.
-v Logs all information to syslog if -l is set.
-o Hides the real operating system type and shows OTHER instead.
-e Returns the message UNKNOWN ERROR instead of NO-USER and INVALID-PORT.
-c characters Specifies an optional character set to use in replies.
-n Returns the user as ID number instead of name.
-N Checks for the file .noident and returns HIDDEN-USER if it is accessible.
-m Allows the process of multiple requests per session.
-d Shows debug information.

File Name: identd

Directory: /usr/libexec

Type: External

imake

UNIX Shell—All primary shells (chs, ksh, sh)

Function—Creates Makefiles from a template, a set of cpp macro functions, and a per-directory file that is called Imakefile.

Syntax—imake [options...]

-D define Specifies directory configurations.


-l dir Specifies directory to the imake template and configuration.
-U define Specifies variables to unset when debugging imake configuration files.
-T template Specifies the name of the master template file.
-f filename Specifies the per-directory input file.
-C filename Specifies the name of the .c file that is created— usually Imakefile.c.
-s filename Specifies the name of the make description file to create.
-e Runs the created Makefile.
-v Shows the cpp command line that is used to create Makefile.

Page 57 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: imake

Directory: /usr/X11R6/bin/

Type: External

imake -v Shows the cpp command line.

indent

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Inserts or erases whitespace in C code to make it easier to read. Converts from one C style to another.

Syntax—indent [options...] {inputfile} {outputfile}

-bad Inserts blank lines after declarations.


-bap Inserts blank lines after procedure bodies.
-bbb Inserts blank lines after block comments.
-bc Causes indent to insert a new line after commas in declarations (is default).
-bl Moves the statement braces to the line after the statement.
-br Moves the statement braces to the same line as the statement (is default).
-ccount Moves comments to the column equal to count (default is 33).
-cdcount Moves comments that are to the right of declarations to the column equal to count.
-cdb Is used to put comment delimiters on blank lines (is the default).
-ce Puts else directly after a preceding end brace (is default).
-cicount Causes a continuation indent of count spaces (default is same as -i).
-clicount Indents case labels count spaces (default is 0).
-dcount Specifies the indentation for comments not to the right of code (default is 1).
-dicount Moves variables to the column equal to count (default is 16).
-dj Indents declarations more than other code.
-ei Indents an if following an else the same as the last if before.
-fc1 Causes indent to format all comments found in the first column (is default).
-icount Specifies the level of indentation to count spaces (default is 8).
-ip Indents parameter declarations (is default).
-lcount Specifies the maximum length of lines to count (default is 75).
-lp Lines up code exceeding one row following a parentheses with continuation lines.
-npro Stops indent from reading .indent.pro files containing configuration profiles.
-pcs Inserts a space between a function call and the parentheses following it.
-psl Puts procedure type on the line before the procedure name (is default).
-sc Puts the * character on the left side of comments.
-sob Erases all optional blank lines found in the input code.
-st Takes input from STDIN and outputs on STDOUT.
Specifies type names for the type keyword list. Is repeatable.
-Tname
Formats the source for usage by troff and by default outputs to STDOUT.
-troff
-v Verbose mode. Shows more information.
The following -n options can’t be combined with their counterparts:
-nbad Disables insertions of blank lines after declarations (is default).
Disables insertions of blank lines after procedure bodies (is default).
-nbap
Disables insertions of blank lines after block comments (is default)
-nbbb
-nbc Disables insertions of new lines after commas in declarations.
-ncdb Disables putting comment delimiters on blank lines.
-nce Disables putting else directly after a preceding end brace.
Causes an if after an else not to be indented as the if before.
-nei
Indents declarations as much as other code (is default).
-ndj
-nfc1 Disables formatting comments in the first column.
-nlp Disables lining up code following a parentheses.
-npcs Disables inserting a space between a function call and the parentheses following it.
Puts procedure type on the same line as the procedure name.
-npsl
Disables putting the * character to the left of comments.
-nsc
-nsob Disables erasing optional blank lines found in the input code (is default).
-nv Disables verbose mode (is default).
Specifies file to act on.
inputfile
Specifies filename on the result.
outputfile

Page 58 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: indent

Directory: /usr/bin/

Type: External

indent HelloWorld.c Indents HelloWorld.c according to defaults.


indent HelloWorld.c -bad -bbb Indents HelloWorld.c with blank lines after declarations and procedure bodies.
indent Helloworld.c-i12 -npro Indents Helloworld.c by 12 spaces instead of 8 and skips profile reading.

inetd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Manages startup of all services listed in the file /etc/inetd. conf.

Syntax—inetd [options...] {file}

-d Shows debug information.


-R times Limits the number of times one service can be called during one minute.
file Specifies what configuration file to use (default is /etc / inetd. conf).

File Name: inetd

Directory: /usr/sbin/

Type: External

inetd Starts looking for connections on the services specified in the default configuration file.
inetd-R 10 Starts and limits the number of times a service can be accessed during one minute to the specified number of times.

info

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows hypertext info nodes. Info nodes fill the same function as man pages

Syntax—info [options...] {file} {item}

--directory directory Adds the specified directory to the infopath.


--apropos=subject Looks up subject in all indices of all manuals.
--index-search=string Goes to node pointed to by string.
--vi-keys Use vi-like and less-like key bindings.
--dribble file Remembers the user’s keystrokes in the specified file.
--file file Specifies an info file to show directly.
--node name Specifies nodes in the first visited info file.
--output file Saves the selected nodes in the specified file.
Reads initial keystrokes from the specified file.
--restore file
Shows the menu items recursively.
--subnodes
--help Shows help information.
--version Shows version information.
Specifies the info file to show.
file
Specifies an item, or node, in the info file to show.
item

File Name: info

Directory: /usr/bin/

Type: External

Page 59 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

info emacs Shows the emacs node from the top level.
info emacs buffers Shows the node buffers in the emacs manual.
info -f ./foo.info Shows the file /foo.info.

infotocap

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Reads the specified file and converts found terminfo descriptions to termcap descriptions.

Syntax—infotocap [options...] files...

-v level Verbose mode. Shows more information. Level specifies the verbose level to use.
-V Shows version information.
-1 Does one field per line.
-w width Changes the output to specified width of characters.
files... Specifies the terminfo file to convert.

File Name: infotocap

Directory: /usr/bin/

Type: External

Note This is actually a symbolic link to tic. Please see tic for more available options.

infotocap infofile Converts the info file to termcap format.

installboot

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Installs a first stage boot program to the boot area of an ffs disk partition.

Syntax—installboot [options...] boot biosboot disk

-n Does everything, but writes nothing to the disk.


-v Verbose mode. Shows more information.
-s value Specifies the number of sectors per track, works if sector translation is activated.
-h value Specifies the number of tracks per cylinder, works if sector translation is activated.
boot Specifies where the second-stage boot program is installed as a full pathname.
biosboot Specifies the name of the first-stage prototype file, usually /usr/mdec/biosboot.
disk Specifies the disk on which to install the new boot program.

File Name: installboot

Directory: /usr/mdec

Type: External

install-info

UNIX Shell—All primary shells (chs, ksh, sh)

Function—Erases or installs specified entries in the info files.

Syntax—install-info [options...] {file} {directory}

--delete Erases the specified entries, doesn’t install anything.

Page 60 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

--dir-file=file Specifies the name of the info directory file. Same as the argument directory.
--entry=text Adds the specified text as an info file.
--help Shows help information.
--info-file=file Specifies the name of the info file. Same as the argument file.
--info-dir=file Same as --dir-file.
--item=text Same as --entry.
--quiet Suppresses all warnings.
--remove Same as --delete.
--section=section Puts the info file in the specified section of the info files.
--version Shows version information.
file Specifies the info file to install or erase.
directory Specifies the info directory file in which the entries are to be installed or erased.

File Name: install-info

Directory: /usr/bin/

Type: External

ipf

UNIX Shell: All primary shells (csh, ksh, sh)

Function: Manages IP firewall and filter rules in the kernel.

Syntax: ipf [options...]

-A Changes will be made to the active ruleset.


-P Adds rules as temporary entries in the authorization rule table.
-l Changes will be made to the inactive ruleset.
-D Disables the filter.
-E Enables the filter.
-F Flushes entries. Below are the two valid flushing arguments:
list Flushes filter list.
table Flushes entries from the state tables.
-d Shows debug information.
-f filename Specifies a file that contains rules that should be read.
-l category Logs the category specified.
-n Changes will not be made.
-o Inserts or removes rules in the output list instead of the input list.
-s Changes the active and inactive set of rules.
-r Ignores matching filter rules instead of adding them to the in-kernel lists.
-V Shows version information.
-v Verbose mode. Shows more information.
-y Modifies the filter lists to use the current network interface IP address.
-z Shows each rule and its statistics. The rule counters will then be set to 0 again.
-Z Resets statistics for all the kernel filters.

File Name: ipf

Directory: /sbin

Type: External

Note Makes sure ipfilter is enabled in /etc/rc.conf, IP forwarding is enabled in /etc/sysct1.conf, and uses a correct
kernel.

ipf -l -Fa -f /ucg_examples/ipf.rules Flushes rules and installs the ones found in the specified rules file.
ipf -s Changes the inactive rules with the active rules.

ipfstat

Page 61 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

UNIX Shell: All primary shells (csh, ksh, sh)

Function—Shows packet filter statistics and filter lists.

Syntax—ipfstat [options...]

-a Shows the accounting filter list and bytes counted against each rule. Used with -i, -h.
-A Shows packet authentication statistics.
-d device Specifies to use device instead of /dev/ipl for interfacing with the kernel.
-f Shows fragment and held state information.
-h Shows the number of times there is a hit for each rule. Used with -i, -o.
-i Shows the filter list of rules used for the input side of the kernel IP processing.
-o Shows the filter list of rules used for the output side of the kernel IP processing.
-l Switches between retrieving inactive and active filter list details. Used with -h.
-n Specifies to show the rule number for each rule.
-M device Specifies the device to use for extraction of values associated with the name list.
-s Shows packet/flow and held state information.
-v Verbose mode. Shows more information.

File Name: ipf stat

Directory: /sbin

Type: External

ipftest

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Sends test packets through an ipf filter rule set found in a specified ruleset file.

Syntax—ipftest [options...] -r file [-i file]

-v Verbose mode. Shows more information about packets that pass and those that fail.
-d Shows debug information.
-b Shows the result of each packet. Results can be pass, block, or no match.
-l interface Specifies the interface name to bind a packet to. Used with -P, -S, and -E.
-P Reads the input file as a binary file created by libpcap.
-S Reads the input file as a snoop file.
-T Reads the input file as a tcpdump output file.
-H Reads the input file as hex digits.
-X Reads the input file as text descriptions of packets.
-E Reads the input file as an etherfind output file.
-i file Reads the input from the specified file (default is STDIN).
-r file Uses the filter rules found in the specified file.

File Name: ipftest

Directory: /usr/sbin/

Type: External

Tip Use this to test your filter rules instead of trying them on real packets.

ipftest -v -H -i packets - Reads the specified hex digits contained in the file specified and matches them against /etc /ipf.rules
r /etc/ipf.rules and shows what happens to the packets.

ipmon

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Shows the logged packets going through the IP packet log device.

Page 62 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Syntax—ipmon [options...] {file}

-a Shows all log messages from the device log files.


-f device Uses the specified device or file to use as the log device (default is /dev/ip1).
-D Goes into background.
-F Resets the packet log buffer and shows how many bytes have gone through.
-N file Uses the specified log file to read NAT log messages from.
-n Shows hostnames instead of IP addresses and service names instead of ports.
-o Reads messages from the log files represented by a letter that can be combined.
S Shows state log messages.
N Shows NAT log messages.
l Shows normal IP log messages.
-O Does the same thing as -o, except that it will not show the log files specified.
S Doesn’t show state log messages.
N Doesn’t show NAT log messages.
l Doesn’t show normal IP log messages.
-s Writes the packet information to syslog.
-S Handles the log file like a state log record.
device Specifies which device will be opened to read state logs from.
-v Shows the TCP window and the ACK and sequence fields.
-x Shows packet data in hex.
-X Shows the log header record data in hex.
file Outputs all messages to a file (default is STDOUT).

File Name: ipmon

Directory: /usr/sbin/

Type: External

ipmon -o N Shows the logged packets going through NAT.


ipmon -a -D network.log Writes all log messages to network.log while being in the background.
ipmon -o S -s Writes state messages to syslog.

inpnat

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Is used to configure IP network address translation rules. NAT is used to hide private networks

Syntax—ipnat [options...]

-C Removes all NAT rules.


-F Removes the mappings in the NAT table.
-l Shows the current rules and mappings.
-n Doesn’t change the NAT table.
-r Removes the rules specified in the file.
-s Shows statistics.
-v Verbose mode. Shows more information.
-f file Reads the NAT rules from the specified file (default is /etc/ipnat.rules).

File Name: ipnat

Directory: /sbin/

Type: External

Tip Use network address translation to let computers on the LAN access the internet.

ipnat -l Lists the current NAT rules.

Page 63 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

ipnat-f/etc/ipnat.rules Adds the NAT rules found in the specified file.

ipresend

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Sends out captured packets to the network.

Syntax—ipresend [options...]

-E Reads the input file as an etherfind output file.


-H Reads the input file as hex digits.
-P Reads the input file as a binary file created by libpcap.
-R Sends the packets in RAW format.
-S Reads the input file as a snoop file.
-T Reads the input file as a tcpdump output file.
-X Reads the input file as text descriptions of packets.
-d interface Specifies the interface name to bind a packet to. Used with -P, -S, and -E.
-g gateway Uses the specified gateway to send the packets through.
-m mtu Fakes the MTU to send.
-r file Reads input from the specified file (default is STDIN).

File Name: ipresend

Directory: /usr/sbin/

Type: External

ipsecadm

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Configures the security associations (SA) in the kernel to use IPSec.

Syntax—ipsecadm {command} modifiers...

The following are available commands:


new esp Sets the new esp as transform when the SA is set up (is the default).
old esp Sets the old esp as transform when the SA is set up.
new ah Sets the new ah as transform when the SA is set up.
old ah Sets the old ah as transform when the SA is set up.
ip4 Specifies use of the IP-in-IP encapsulation protocol.
delspi Deletes the SA.
group Creates a group of two SAs.
flow Creates a flow to see which SA routes which packet.
bind Specifies an association between an incoming and an outgoing SA.
flush Removes SAs with its routes and flows.
The following are modifiers:
-src Specifies the source IP address.
-dst Specifies the destination address for the SA.
-proxy Checks this IP address against the inner IP address when tunneling into a firewall.
-spi Sets the security parameter index.
-tunnel Has been stripped down to be similar to the -forcetunnel option.
-newpadding This option is no longer supported.
-forcetunnel Forces IP-inside-IP encapsulation before ESP or AH processing is done on outpackets
-enc Specifies an encryption algorithm to use with the SA.
des Encrypts using DES. This is an older type of encryption that should be avoided.
3des Encrypts using 3DES. Is safer than DES due to its use of larger encryption keys.
blf Encrypts using Blowfish. Is available only with the newer esp.
cast Encrypts using CAST. Is available only with the newer esp.
skipjack Encrypts using SKIPJACK. Is faster than 3DES and was developed by the NSA.
-auth Specifies the SA authentication algorithm that is used.
md5 Works with both older and newer ah and the newer esp.
sha! Works with both older and newer ah and the newer esp.

Page 64 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

rmd160 Works with both the newer ah and the newer esp.
-key key Specifies the secret key for encryption. Hexadecimal digits only.
-auth key Specifies the secret key material for the newer esp mode if needed.
-iv Has been stripped down to be similar to the -halfiv option.
-halfiv Permits use of a 4-byte IV, which means that it may only be used with old esp.
-proto Specifies the security protocol needed by flow, delspi, group, or bind.
50 Specifies the IPPROTO_ESP security protocol.
51 Specifies the IPPROTO_AH security protocol.
4 Specifies the IPPROTO_IP security protocol.
symbolicname Specifies the esp, ah, or ip4 security protocols.
-chain Deletes the entire SPI chain or the specified SPI.
-dst2 Specifies the second IP destination used by group.
-spi2 Specifies the second SPI used by group.
-proto2 Specifies the second security protocol that is used by group.
50 Specifies the IPPROTO_ESP security protocol.
4 Specifies the IPPROTO_IP security protocol.
symbolicname Specifies the esp, ah, or ip4 security protocols.
-addr Specifies source address, network mask, and destination addresses for security packets.
-transport Specifies the protocol number that is used for packet security matching.
-sport Specifies the source port that must match the packets. Use a number or service name.
-dport Creates a flow that matches local packets. Same as 0.0.0.0/255.255.255.255.
-delete Deletes an existing flow instead of creating one.
-ah Supports only flush SAs of the type ah.
-esp Supports only flush SAs of the type esp.
-oldah Supports only flush SAs of the type oldah.
-oldesp Supports only flush SAs of the type oldesp.
-ip4 Supports only flush SAs of the type ip4.

File Name: ipsecadm

Directory: /sbin/

Type: External

ipsecadm flush -esp Removes esp SAs with its routes and flows.
ipsecadm new ah -forcetunnel Forces IP-inside-IP encapsulation before ESP or AH processing is done on out packets.
ipsecadm ip4 -spi Sets the security parameter index for IP-in-IP encapsulation protocol.

ipsend

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Sends IP packets to a destination host.

Syntax—ipsend [options...] {destination} {flags...}

-d Shows debug information.


-v Verbose mode. Shows more information.
-f offset Specifies any decimal or hexadecimal value in the IP offset field.
-g gateway Specifies the name of the host to use as gateway between networks.
-i interface Sets the name of the interface to use on the network.
-m MTU Specifies the maximum transmitting unit (MTU) manually. The total data packet length.
-o option Specifies additional IP header options.
-s source Specifies an IP address or a hostname to include in the packet as a source address.
-t NR Sets the destination port number.
-w size Specifies the size of the TCP packet window.
-l Uses the ICMP protocol.
-T Uses the TCP protocol.
Uses the UDP protocol.
-U
Specifies a name of a protocol to use that exists in the /etc/protocols file.
-P protocol
Specifies the destination host.
destination
Specifies TCP flags to use.
flags...

Page 65 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: ipsend

Directory: /usr/sbin/

Type: External

iptest

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Tests the IP’s functions by generating packets and sending them to specified destinations.

Syntax—iptest [options...] destination

-1 Tests IP headers. Point tests that can be set with the -p option are as follows:
1 ip_hl < ip_len.
2 ip_hl > ip_len.
3 ip_v < 4.
4 ip_v > 4.
5 ip_len < packetsize, long packets,
6 ip_len > packetsize, short packets.
7 Zero-length fragments.
8 Packet > 64K after reassembly.
9 IP offset with MSB set.
10 TTL variations.
-2 Tests IP options. Point tests are as follows:
1 Option length > packet length.
2 Option length = 0.
-3 Tests the ICMP. Point tests are as follows:
1 ICMP types 0-31 and 255.
2 Type 3 and codes 0-31.
3 Type 4 and codes 0, 127, 128, 255.
4 Type 5 and codes 0, 127, 128, 255.
5 Types 8-10, 13-18 with codes 0, 127, 128, and 255.
6 Type 12 and codes 0, 127, 128, 129, 255.
7 Type 3 and codes 9, 10, 13, 14; and 17, 18— shortened packets.
-4 Tests the UDP. Point tests are as follows:
1 UDP length > packetsize.
2 UDP length < packetsize.
3 Sport = 0, 1, 32767, 32768, 65535.
4 Dport = 0, 1, 32767, 32768, 65535.
5 sizeof(struct ip) <= MTU <= sizeof(struct udphdr) + sizeof(struct ip).
-5 Tests the TCP. Point tests are as follows:
1 TCP flags variations, all combinations.
2 Seq = 0, 0×7fffffff, 0×8000000, 0×a0000000, 0×ffffffff. 
3 Ack = 0, 0×7fffffff, 0×8000000, 0×a0000000, 0×ffffffff. 
4 SYN packet with window of 0, 32768, 65535.
5 Sets urgent pointer to 1, 0×7fff, 0×8000, 0×ffff. 
6 Data offset.
7 Sport = 0, 1, 32767, 32768, 65535.
8 Dport = 0, 1, 32767, 32768, 65535.
-6 Tests overlapping fragments by trying to exhaust the network holding packets buffers.
-7 Tests the IP with random packets.
-d device Specifies the interface device (default is lan0). (Lan0 doesn t normally exist in OpenBSD, and so it should be specified.)
-g gateway Specifies the gateway to route packets through.
-m mtu Specifies MTU to use allowing network interfaces with a small MTU to be simulated.
-p pointtest Specifies the point test to run on specified group.
-s src Specifies the IP packets source address.
destination Specifies where to send packets.

File Name: iptest

Directory: /usr/sbin/

Page 66 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Type: External

isakmpd

UNIX Shells—All primary shells (chs, ksh, sh)

Function—The IKE key management daemon that establishes security associations for authenticated/encrypted network
traffic.

Syntax—isakmpd [options...]

-cfile Specifies a configuration file to use instead of /etc/isakmpd/isakmpd.conf.


-d Runs the daemon in the foreground and logs to STDERR.
-D class=level Specifies the debug class and the debug level to limit debug printouts.
-f fifo Specifies the named pipe (FIFO) that the daemon will listen to for requests.
- Specifies that STDIN will be used for input.
-n Blocks the kernel from negotiating.
-p port Specifies the port that isakmpd will be bound to.
-P port Specifies the port that isakmpd will bind its local end to.
-r seed Specifies a number sequence for internal use. Used for regression tests.
-R file Specifies a file to save internal state reports instead of the default.

File Name: isakmpd

Directory: /sbin/

Type: External

ispcvt

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Verifies whether the current video driver installed in the kernel is a PCVT driver.

Syntax—ispcvt [options...]

-c Shows all options for the PCVT driver used when the kernel was compiled.
-d device Specifies the device to check.
-v Verbose mode. Shows more information.

File Name: ispcvt

Directory: /usr/sbin/

Type: External

jot

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Creates a sequence of numbers, characters or words, according to the operands specified in the parameters.

Syntax—jot [options...] {repetitions} {start} {end} {step}

-c Shows the numbers as characters.


-n Doesn’t do a new line on the last generated value.
-r Generates random data instead of sequels. Generates values from 1 to 100.
-b word Shows the specified word specified number of times.
-w word Handles the word like printf format and uses the generated values on it.

Page 67 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-s string Specifies the string to insert between the values (default is new line).
-p decimals Sets the number of decimals to show the values on (default is 0).
repetitions Specifies how many values to generate.
start Specifies the starting value or character.
end Specifies the end value or character.
Specifies the change of each value. Can be decimal and negative.
step

File Name: jot

Directory: /usr/bin/

Type: External

jot 10 0 0-1 Does a countdown from 9 to 0.


jot-s ", " 100 Creates values from 1 to 100 with a comma between them, instead of a new
line.
jot -w "%i green bottles hanging on the wall..." 100 100 Creates the text for a very famous song.
1 -1

kadmin

UNIX Shells—All primary shells (chs, ksh, sh)

Function—The interactive Kerberos database administration program.

Syntax—kadmin [options..]

-u user Specifies the user to act as when using the program (default is current user).
-p principal Specifies the default principal.
-T timeout Sets timeout, -m equals -T 0.
-x Uses existing tickets.
-r realm Specifies the default realm for transactions (default is the local realm).
-m Doesn’t allow any other users to be logged in as the administrator while on it.

File Name: kadmin

Directory: /usr/sbin/

Type: External

Note This command can be used over the network, but the master database computer must then have kadmind
running.

kadmind

UNIX Shells—All primary shells (chs, ksh, sh)

Function—The daemon for the Kerberos network database administrator program.

Syntax—kadmind [options...]

-n Takes the master key from the master key cache file, instead of asking for it.
-h Shows status on the permissible control arguments.
-i address Listens only on that address.
-m Prompts the user to enter master key.
-r realm Pretends that the specified realm is the local realm, instead of the real realm.
-f file Specifies the file to use on log information.
-d name Specifies the database name to use.
-a acldirectory Searches for access control lists in the specified directory.

Page 68 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: kadmind

Directory: /usr/libexec/

Type: External

kauth

UNIX Shells—All primary shells (chs, ksh, sh)

Function—A login utility for the Kerberos database program.

Syntax—kauth [options...] {commands...}

-n name Specifies the principal to get tickets for.


-r user Specifies the remote host user that should own the ticket file.
-t host ticket file Specifies the ticket file on the remote host.
-h hosts... Specifies the remote hosts to obtain tickets for.
-l lifetime Specifies the tickets lifetime.
-f srvtab Specifies the srvtab to get service keys from (default is / etc /kerberosIV/ srvtab).
-c cell The AFS cell to get tokens for (default is local cell).
Specifies the commands to execute.
commands...

File Name: kauth

Directory: /usr/bin/

Type: External

kauthd

UNIX Shells—All primary shells (chs, ksh, sh)

Function—A remote login daemon for the Kerberos database program.

Syntax—kauthd [-i]

-i Runs the command in interactive mode. Doesn’t expect to be started by inetd.

File Name: kauthd

Directory: /usr/libexec/

Type: External

kbd

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Is used to show or change the keyboard’s values.

Syntax—kbd -l, kbd [-q] name

-l Shows all available keyboard encoding.


-q Sets quiet mode until an error occurs.
name Sets the keyboard encoding to name.

File Name: kbd

Directory: /sbin/

Page 69 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Type: External

kbd-l Shows all available keyboard values.

kcon

UNIX Shells—All primary shells (chs, ksh, sh)

Function—A keyboard configuration utility for the PCVT video driver.

Syntax—kcon [options...]

-d delay The delay to start to repeat strokes. The delay is 250 + delay * 250 milliseconds.
-m map Specifies the keyboard mapping to use, if found in the keycap database.
-l Shows the keyboard map currently used by the driver.
The following three options can only be use with the -l option:
-o Shows the keyboard map in octal.
-x Shows the keyboard map in hexadecimal (is default).
-p Doesn t show associated names on certain characters, only the values.
-r rate Specifies the rate of strokes per seconds is between 0 to 31.
-R Resets the keyboard.
-s Shows delay and rate values on repeating keystrokes.
-t mode Enables or disables repetition on keystrokes (+=enables, −=disables).

File Name: kcon

Directory: /usr/bsbin/

Type: External

kcon -l Shows current keyboard mapping.


kcon -d 3 -r 30 Configures the keyboard to start repeating after 1 second, and then strike 30 times per second.
kcon -t Disables the autorepeat feature.

kdb_destroy

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Deletes a Kerberos key distribution center database. Prompts the user for verification before actually doing it.

Syntax—kdb_destroy

File Name: kdb_destroy

Directory: /usr/sbin/

Type: External

kdb_edit

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Creates or changes principals stored in the Kerberos key distribution center database.

Syntax—kdb_edit [-n]

-n Gets the master key from the master key cache file, instead of asking for it.

File Name: kdb_edit

Directory: /usr/sbin/

Page 70 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Type: External

kdb_init

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Initializes a Kerberos key distribution center database and creates the necessary principals.

Syntax—kdb_init {realm}

realm Specifies the realm to create. Asks for the realm if not specified.

File Name: kdb_init

Directory: /usr/sbin/

Type: External

kdb_util

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Performs utility functions on the Kerberos key distribution center database.

Syntax—kdb_util ACTION file

ACTION Specifies the action to perform on the database.


load Initializes the database with the records contained in the specified file.
merge Merges entries from file into database.
dump Dumps the database to the specified file.
slave_dump Is like dump, but also creates a semaphore file signaling that an update has occurred.
new_master_key Dumps the database encrypted by the new master key, asked by the program.
convert old db Dumps the old database and encrypts it with the new master key, asked by the program.
file Specifies the file to use.

File Name: kdb_util

Directory: /usr/sbin/

Type: External

kdestroy

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Writes zeros to the files containing the user s Kerberos authorization tickets, to destroy them.

Syntax—kdestroy [options...]

-f Doesn’t display any status message.


-q Doesn’t beep you if operation fails.
-t Destroys only tickets, keeps AFS tokens.
-u Unlogs (removes tokens, leaves tickets).

File Name: kdestroy

Directory: /usr/bin/

Type: External

kdestroy Destroys the Kerberos tickets for the current user.

Page 71 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

kdump

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Converts kernel trace files produced with ktrace to readable format. Shows it on STDOUT.

Syntax—kdump [options...]

-d Shows all numbers in decimal.


-e emulation Specifies the emulation name to use instead of bsd.
-f file Specifies the file to use (default is ktrace.out).
-l Reads to the end of the file, and then waits for further data (infinite loop).
-m amount Specifies the max amount of bytes when decoding I/O.
-n Doesn’t do ad hoc translations.
-R Shows relative timestamps.
-T Shows absolute timestamps.
-t string Specifies the kernel trace points. Can be one of the following or combined:
c Translates system calls.
e Translates emulation changes.
n Translates name translations.
i Translates I/O.
s Translates signal processing.

File Name: kdump

Directory: /usr/bin/

Type: External

keynote

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Handles keynote operations. The function is described by the first identifier.

Syntax—keynote keygen algorithm size public private {offset}{length}, keynote sign -v algorithm assertion private,
keynote sigver {assertion}, keynote verify [options...] {files...}

keygen Creates a private and a public key pair.


sign Creates a signature for assertion information.
sigver Verifies the public-key signature.
verify Verifies one assertion in the given files.
-v Verifies the new signature (to use with the sign identifier).
-h Shows help information.
-e file... Specifies files with environment variables (format is var = value required).
-l files... Specifies files with trusted signatures. No verification on signature (required).
-r list Specifies a comma-separated list of values to return, lowest value first (required).
-k file Specifies a file that contains a key to add in the action authorizers (required).
algorithm Specifies a name of an algorithm to use, for example, sig-dsa-sha1-hex.
size Specifies the size of the key in bits (values are 512, 1,048 or 2,048).
public Sets the name of the file that stores the public key.
Sets the name of the file that stores the private key.
private
Specifies the offset where the printout of the key will start.
offset
Specifies how many characters to print out.
length
Sets the name of the file that contains assertion information.
assertion
Specifies the files to verify.
files...

File Name: keynote

Directory: /usr/bin/

Type: External

Page 72 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

kgmon

UNIX Shells—All primary shells (chs, ksh, sh)

Function—The monitor for kernel profiling.

Syntax—kgmon [options...]

-b Starts kernel profiling.


-h Stops kernel profiling.
-p Dumps the kernel profiling buffers to a gmon.out file.
-r Resets the kernel profiling buffers.
-M file Specifies a core file to read values from (default is /dev/kmem).
-N kernel Specifies a system kernel to read names from (default is /bsd).

File Name: kgmon

Directory: /usr/sbin/

Type: External

kinit

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Logs in to a Kerberos authentication system.

Syntax—kinit [options...] {name}

-i Requests a Kerberos instance.


-r Requests a Kerberos realm to use when connecting to a remote Kerberos server.
-v Verbose mode. Shows more information.
-l Requests a time in minutes, how long the ticket should be activated.
-p Acquires a ticket for changepw.kerberos.
name Specifies a Kerberos initialization name to use.

File Name: kinit

Directory: /usr/bin/

Type: External

Warning Remember to use kdestroy to remove your ticket before logout.

klist

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Shows you information listed in the ticket file about current Kerberos tickets held.

Syntax—klist [options...]

-s Doesn t show ticket filename, owner name, or information on issue and expire times.
-t Exits with status 0 if there are any valid tickets and 1 if there are not.
-file file Specifies the file to use as the ticket file.
-srvtab Uses the ticket file as a service key file and shows all of the keys it contains. (If no ticket file is specified -srvtab uses /etc/srvtab by default.)

File Name: klist

Directory: /usr/bin/

Page 73 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Type: External

kprop

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Propagates the Kerberos database to the Kerberos slaves.

Syntax—kprop database slavefile [options...]

-realm Uses the specified realm instead of the default.


-force Forces propagation to slaves even if there have been no recent changes to the master.
database Specifies the file to extract data from.
slavefile Specifies the file on the Kerberos master that lists the Kerberos slaves.

File Name: kprop

Directory: /usr/sbin/

Type: External

kpropd

UNIX Shells—All primary shells (chs, ksh, sh)

Function—Receives the Kerberos database propagated from a kprop process on a Kerberos master.

Syntax—kpropd [options...] file

-r realm Specifies the receiver realm for which data is accepted.


-s srvtab Specifies the service table file from which to read the password of the daemon.
-d file Specifies the primary Kerberos database file of a Kerberos slave.
-i Runs in standalone mode.
-l file Specifies the name of the log file to use.
-p kdb_util_path Specifies the full path to the program kdb_util.
-P kdb_util_path Same as option -p.
file Specifies the file to write incoming data to.

File Name: kpropd

Directory: /usr/libexec/

Type: External

ksh,rksh

UNIX Shell—Korn shell (ksh)

Function—The Korn shell, a standard/restricted command and programming language.

Syntax—ksh [options...] {arguments...}, ksh -c [options...] command {arguments...}, rksh [options...] {arguments...}, rksh -c
[options...] command {arguments...}

These options may only be used from the command line:


-c command Specifies the command to read.
-i Makes the shell interactive. TERMINATE, INTERRUPT, and QUIT are ignored.
-l Starts the login shell.
-r Runs the shell in restricted shell (same as rksh).
-s Reads commands from STDIN.
The following options can be changed with the set command in a script:
-A Sets the array parameter elements to the specified arguments.
-a allexport Is used to automatically export any parameters that are defined.

Page 74 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-b notify Sends print job notification asynchronously.


-C noclobber Protects files from being overwritten by shell>redirection.
-e errexit Runs the ERR tarp and exits if a command returns a non-zero exit status.
-f noglob Doesn t enlarge filename patterns.
-h trackall Tracks encountered commands as aliases.
-i interactive Makes the shell interactive. Works only if the shell is already active.
-k keyword Puts all keyword arguments in the environment for a command.
-l login Sets the shell as the login shell. Works only if the shell is already active.
-m monitor Enables job control.
-n -lc -noexec Reads commands, but will not run them.
-p privileged Sets the shell if the UID or GID doesn’t match the EUID or the EGID.
-r restricted Starts restricted mode.
-s stdin Reads commands from STDIN. Is set automatically if the shell starts without arguments.
-u nounset Handles an unset parameter as an error unless the − or + is used.
-v verbose Sends the shell input lines to STDERR as they are read.
-x xtrace Shows commands and their arguments when they are executed.
-X markdirs Marks the directories with a trailing/during a file rename.
bgnice Runs background jobs with a lower priority.
braceexpand Activates brace expansion (alteration).
emacs Activates command editing with a BRL Emacs-like editor.
gmacs Activates command editing with a Gmacs-like editor.
ignoreeof Prevents exiting when an EOF marker is read.
nohup Doesn’t stop jobs with an HUP signal.
nolog Does not do anything. Backward compatibility only.
physical Forces the cd and pwd commands to use physical directories.
posix Activates POSIX mode.
vi Activates vi-like editing from the command line.
viraw Does not do anything. Backward compatibility only.
vi-esccomplete Allows command and filename completion when escape ^ [is called in command mode.
vi-show8 Prefixes characters using an eighth bit set with M-.
vi-tabcomplete Allows command and filename completion when Tab ^ I is called in insert mode.
arguments... Specifies additional arguments to the shell or a script.

File Name: ksh, rksh

Directory: /bin/

Type: External

rksh Switch to restricted Korn shell.


ksh -r Switch to restricted Korn shell.

ksrvutil

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Manipulates host Kerberos key files.

Syntax—ksrvutil operation [options...]

-k Shows the old and new keys.


-i Prompts for yes or no before changing any key.
-a Specifies the AFS string-to-key function should be used.
-f filename Specifies the file to read keys from.
operation The following operations can be used:
list Shows the keys in the key file.
change Changes all the keys in the key file.
add Adds a key to the key file.

File Name: ksrvutil

Directory: /usr/sbin/

Page 75 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Type: External

kstash

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Saves the Kerberos key distribution center database master key in the master key file.

Syntax—kstash

File Name: kstash

Directory: /usr/sbin/

Type: External

ktrace

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Does log the kernel trace of the specified process.

Syntax—ktrace [options...] command

-a Appends the existing trace file instead of overwriting it.


-C Does’t trace processes if they are owned by the user.
-c Clears the trace points associated with the specified file or processes.
-d Traces child processes for the specified process.
-f file Specifies the file to put log information to (default is ktrace.out).
-g gpid Enables tracing on all processes in the process group.
-i Passes the trace flags to all future children of the designated processes.
-p pid Enables tracing on the indiced process ID.
-t string Specifies the kernel trace points to trace. Can be one of the following, or combined:
c Traces system calls.
e Traces emulation changes.
n Traces name translations.
i Traces I/O.
s Traces signal processing.
command Specifies the process to trace.

File Name: ktrace

Directory: /usr/bin/

Type: External

kvm_mkdb

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates kernel databases

Syntax—kvm_mkdb [-v] {file}

-v Verbose mode. Shows more information.


file Specifies the name of the file to create.

File Name: kvm_mkdb

Directory: /usr/sbin/

Type: External

Page 76 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

kx

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Forwards X connections from a remote client to a local screen through an authenticated and encrypted stream.

Syntax—kx [options...] host

-l username Specifies the username to use for login.


-k Disables keep-alive on the TCP connections.
-d Specifies the program should not fork.
-t Listens on both TCP and UNIX sockets.
-p port Specifies the port to use.
-P Forces passive mode.
host Specifies hostname to connect to.

File Name: kx

Directory: /usr/X11R6/bin/

Type: External

kxd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Forwards X connections securely

Syntax—kxd [options...]

-t Specifies that UNIX sockets should not be used.


-i Starts in interactive mode.
-p port Specifies the port to listen on.

File Name: kxd

Directory: /usr/X11R6/bin/

Type: External

lam

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Copies specified files parallel to STDOU.

Syntax—lam [options...] files...

-f min.max Shows fragments of line specified by the format string of the width.
-p min.max Like -f, but pads the specific file when end of file is reached.
-s sepstring Shows specified string before showing line fragments from next file.
-tc Specifies the input terminator instead of a new-line.
files... Specifies which file to copy.

File Name: lam

Directory: /usr/bin/

Type: External

Page 77 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

lastcomm

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows a reverse order list of commands executed last.

Syntax—astcomm [-f file] {command) {user} {terminal}

-f file Specifies an accounting file to use.


command Lists the command names that have been executed recently.
user Lists recently executed commands by a user.
terminal Lists recently executed commands from a terminal.

File Name: lastcomm

Directory: /usr/bin/

Type: External

ldconfig

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Scans built-in and specified system directories and stores any information about shared libraries in /var/run/ld.

Syntax—ldconfig [options...]

-m Merges information to the /var/run/ld file instead of rebuilding it.


-r Shows the content of the file /var/run/ld on STDOUT.
-s Leaves out the built-in library /usr/lib when a scan is made.
-v Verbose mode. Shows more information.

File Name: ldconfig

Directory: /sbin/

Type: External

Note The command is usually run as a boot sequence.

ldd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows all shared objects that are required to run the specified program.

Syntax—ldd [-f format] program

-f format Specifies a format string that is passed to rtld, which customizes Idd’s output. (This option is repeatable up to two times.)
-v Verbose mode. Shows more information.
program Specifies the program to show requirements for.

File Name: ldd

Directory: /usr/bin/

Type: External

leave

Page 78 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Reminds you of a time to leave. Reminds you 5 minutes and 1 minute before the specified time.

Syntax—leave [options...]

HHMM Specifies the time in hours and minutes. Assumes to be in the next 12 hours.
+HHMM Specifies the time in hours and minutes for the alarm to go off. It is like a timer.

File Name: leave

Directory: /usr/bin/

Type: External

leave Asks for the time when you have to leave.


leave 1100 Sets the alarm to 11:00.
leave +230 Sets the alarm to 2 hours and 30 minutes from now.

less, page

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A text pager for UNIX system, used to show ASCII files.

Syntax—less [options...] filenames...

+ command Specifies an internal command to perform when showing new files.


-? Shows help information.
-a Performs no search on lines shown on the screen; instead, does a search on lines under.
-b buffers Sets the number of buffers to use for each file (one buffer is 1 K).
-B Doesn’t automatically assign buffers when needed. Use amount specified with -bn.
-c Shows full screen lines from the top down instead of appending from the bottom.
-C Is used as -c, except that screen will be cleared before a new page is shown.
-d Doesn’t show error messages if the terminal can’t do what it’s supposed to.

Page 79 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-Dxcolor Sets the text’s type and color. Color is a value.value pair (MS-DOS only). (The text type x is n= normal, s=standout, d=bold, u=
-e Quits the second time less reaches an EOF instead of just giving a warning.
-E Quits directly when the EOF is reached.
-f Opens all files not only those who are regular.
-F Shows the file, and if it’s only one page, quits.
-g Specifies that only the last search string found will be highlighted.
-G Doesn’t highlight strings found by the search commands.
-hlines Specifies the number of lines that can be shown by scrolling back.
-i Isn’t case-sensitive when matching patterns.
-I The same as -i, but won’t be case-sensitive even when pattern contains uppercase.
-jline Marks a screen line as the line on the screen where the search begins.
-J Shows a status column on the screen. Is used only with the -w or -W option.
-kfilename Specifies a filename to open as a lesskey file. Is repeatable.
-m Makes verbose prompts with percentages of the file instead of colons.
-M Makes prompts look even more verbose than with -m.
-n Doesn’t use line numbers.
-N Shows line numbers at the beginning of the lines.
-ofilename Specifies a file where to put the input from STDIN when showing it on the screen.
-Ofilename Does the same thing as -o, except that it will overwrite the specified file.
Shows the specified file from the first line containing the specified pattern.
-ppattern
Specifies another prompt to use instead of the default.
-Pprompt
Sets quiet mode. Won’t ring the bell when the EOF has been reached.
-q
Sets very quiet mode. Never rings the bell.
-Q
Shows control characters that could create screen problems.
-r
Does the same as -r, except that it tries to keep the correct screen appearance.
-R
Combines multiple blank lines into one blank line.
-s
Chops lines longer than the screen width.
-S
Shows the file containing tag. For this to work, ctags must have been run.
-ttag Is used with the -t option. Specifies another tags file to use instead of the default.
-T tagsfile Shows backspaces and new line characters as usual characters.
-u Handles Tabs, backspaces, and new lines as control characters.
-U Shows version information.
-V Highlights the first new line when a full page movement has been done.
-w The same as -w, but highlights when more than one line of movement is performed.
-W Uses the NR to specify where to set the Tab stops (default is 8).
-xNR Disables sending termcap initialization and deinitialization strings to the screen.
-X Uses the NR to specify the maximum number of lines to scroll forward.
-yNR Uses NR to specify default scrolling window lines (default is one full screen).
-[z]NR Specifies the start and end quote characters to use instead of using quotes.
-~ Enables lines after EOF to be shown as blank lines.
-"charchar Specifies the horizontal scrolling length for the left and right arrow command.
-NR Specifies the end of options. After this, everything is taken as filenames.
-- Commands invoked from within less:
Marks position with specified lowercase letter.
mletter Goes to the earlier marked letter, or with ^ or $ it goes to beginning or end of file.
'letter Scrolls down one full screen. You can also use Ctrl+V, Ctrl+F, or f.
Space The same as Space. NR also sets the size of the screen.
{NR}z The same as Space, but scrolls down one full screen even if you reach the EOF.
Esc+Space Scrolls down one line or number of lines. You can also use Ctrl+J, Ctrl+E, f, or j.
{NR}Return Scrolls down half a screen or the specified number of lines. You can also use Ctrl+D.
{NR}d Scrolls up one screen or the specified number of lines. You can also use Ctrl+B or b.
{NR}Esc+v The same as Esc+V. Number also sets the default size of the screen.
{NR}w Scrolls up the number of lines. You can also use Ctrl+Y, Ctrl+P, Ctrl+K, or k.
{NR}y Scrolls down half a screen or the specified number of lines. You can also use Ctrl+U.
{NR}u Scrolls right the number of characters (default is 8). You can also use right arrow.
{NR}Esc+) Scrolls left the number of characters (default is 8). You can also use left arrow.
{NR}Esc+( Repaints the screen. You can also use Ctrl+R or Ctrl+L.
r The same as r, but discards buffered input.
R Scrolls forward, even if the EOF is reached.
F Goes to line number in the file (default is 1). You can also use < or Esc+<.
Goes to line number in the file (default last line). You can also use > or Esc+>.
{NR}g
Specifies in percent where to start reading in the file. You can also use %.
{NR}G
Number specifies which one to use, if there is more than one on the top line:
NRp
Goes to the matching} if a {is shown in the top line.

Page 80 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Goes to the matching {if a} is shown at the bottom line.


{NR}{
Goes to the matching] if a [is shown in the top line.
{NR}} Goes to the matching [if a] is shown at the bottom line.
(NR}[ Goes to the matching ) if a ( is shown in the top line.
{NR}] Goes to the matching ( if a ) is shown at the bottom line.
{NR}( The same as {. Handles the characters as opening and closing brackets.
{NR}) The same as}. Handles the characters as opening and closing brackets.
ESC-ctrl+F charchar Searches the file for lines containing pattern.
ESC-ctrl+B charchar Searches the file for lines that don t match the pattern.
/pattern Continues to the next file in the command line list if the pattern isn’t found.
/!pattern Starts the search at the first file in the command line list.
/* pattern Highlights found words on the screen, but keeps current cursor position.
/@pattern Creates a simple textual comparison.
/ctlr+Kpattern Searches the file backwards for lines containing pattern.
/ctrl+Rpattern Searches the file backwards for lines that don’t match the pattern.
?pattern Searches backward in multiple files. Searching in previous file if no match found.
?!pattern Starts the backward search at last line of the last file in the command-line list.
?*pattern Highlights found words in a backward search, but keeps current cursor position.
Creates a simple textual comparison in a backward search.
?@ pattern
Repeats previous search.
/ctlr+K?pattern
Repeats previous search, but in reverse direction.
/ctrl+R?pattern
Repeats previous search over files on the command list.
n
Repeats previous search, but in reverse direction over files on the command list.
N
Turns off search highlighting.
ESC-n
Inspects a new file.
ESC-N The same as :e.
ESC-u
Inspects the next file in the command line list. Number specifies the NRth next file.
:e filename Inspects previous file in command line list. Number specifies the NRth previous file.
E filename Inspects the first file in the command line list. Number specifies the NRth file.
:n{NR} Erases the current file from the list of files.
:p{NR} Goes to the tag given.
:x{NR} Shows some information about the file.
:d Shows version information.
:t Quits less. You can also use Q, :q, :Q, or ZZ.
= The next four options don’t work on all installations:
V Starts an editor to edit the current file being shown.
q Invokes a shell to run the specified Shellcmd.
Invokes shell, pipes section between current position and earlier marked letter. (The letter is marked with m letter, ^ and $ wo
v Specifies to save the input in a file. The input must be a pipe.
! Shellcmd Resets the specified command-line option to its default.
! letter Shellcmd Sets the specified command-line option to opposite of its default.
s file Shows the specified command-line option’s current value.
-+option Changes the settings of specified command-line option and shows a message of changes. (If the option has an operand, its s
-! option Specifies file to show.
_option
-option
filenames...

File Name: less

Directory: /usr/bin/

Type: External

Note less is more, more is use-less.

less -N /etc/passwd Shows /etc/passwd with a line number at the beginning of each line.
less -h 10 /etc/passwd Shows /etc/passwd; when Space is pressed displays the next 10 lines instead of the next full screen.
less -p ucgbook ~/books.txt Scrolls down to the first ucgbook match.

lesskey

UNIX Shell—All primary shells (csh, ksh, sh)

Page 81 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Function—Is used to manage key bindings for less.

Syntax—lesskey [options...] {file}

-V Shows version information.


-o output Is used to specify the output file.
- Is used to read input from STDIN instead of from a file.
file Specifies an input file with key binding information.

File Name: lesskey

Directory: /usr/bin/

Type: External

lint

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to check a specified C program file for errors that leave it nonportable, wasteful, or buggy.

Syntax—lint [options...] files...

-a Reports if long values are assigned to short variables.


-aa Is like -a, but reports integer value assignments that cause poor conversions.
-b Shows any break statements that can’t be reached.
-c Reports about casts with questionable portability.
-e Reports about unusual enum- and integer-type operations.
-g Suppresses warnings for extensions of gcc to the C language.
-h Starts a series of heuristic tests to find bugs, improve coding, or limit redundancy.
-i Creates a .ln file for every .c file from the command line.
-n Skips the standard library compatibility check.
-p Checks the portability of code within the file to other C dialects.
-r Reports the position of a previous declaration if there is a redeclaration.
-s Checks if code is following ANSI C rules and gives errors or warnings if not.
-t Checks if code is following traditional C rules and gives errors or warnings if not.
-v Suppresses any complaint that there is an unused argument in a function.
-x Reports if there is an unused variable that is referred to by an external declaration.
-z Complains about undefined structures.
-C library Creates a library called llib-llibrary .ln.
-D name [=def] Defines the name for cpp as if using a #define directive.
-l directory Specifies that this directory will be added to the list of searchable directories.
-L directory Searches for lint libraries in the specified directory first.
-F Shows file pathnames.
-H Shows the name of the included file if an error comes from an included file.
-o file Specifies the output file.
-U name Removes the initial definition of the specified preprocessor name.
-V Shows all the command lines created by the controller program.
files... Specifies file to act on.

File Name: lint

Directory: /usr/bin/

Type: External

Routines that don’t give any return, like exit, will not be understood by lint, which may cause incorrect reporting.

lint -l ucg Specifies that ucg will be added to the list of searchable directories.

listres

Page 82 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Generates a list of a widget’s resource database.

Syntax—listres [options...]

-all Shows information for all widgets and objects.


-nosuper Doesn’t show resources inherited from a super class.
-variable Defines widgets by the names of the class record variables.
-top name Specifies the name of the widget to be treated as the top of the hierarchy.
-format printf-string Specifies the string to be used to show the name, class and so forth.

File Name: listres

Directory: /usr/X11R6/bin/

Type: External

listres -all Lists all known widgets and objects.

lkbib

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Searches for references in bibliographic databases that contains the specified keyword. Shows result on
STDOUT.

Syntax—lkbib [options...] keywords...

-v Shows version information.


-istring Ignores the specified strings when searching the database.
-pfile Specifies filename to inspect. It can be used multiple times.
-tnumber Specifies how many of the first characters that must match (default is 6).
keywords... Specifies the keyword to search for.

File Name: lkbib

Directory: /usr/bin/

Type: External

lndir

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates a shadow of the current or specified directory containing only symbolic links to the parent directory.

Syntax—lndir [options...] {directory1} {directory2}

-e file Adds the specified file to a list of files to be excluded from the shadow directory.
-s Suppresses all normal error messages in operation.
-i Creates symbolic links to the parent directories’ symbolic links (not recommended).
directory1 Specifies the parent directory.
directory2 Specifies the shadow directory to create.

File Name: lndir

Directory: /usr/bin/

Type: External

Page 83 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

locate

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Finds files in a database. The script /usr/libexec/locate.updatedb, usually run by cron daily, lists all files on the
system and builds /var/db/locate.database.

Syntax—locate [options...] pattern

-S Shows statistics about the database and exit.


-c Specifies to show a count of matching filenames.
-d database Searches the specified database instead of default. Use colon to specify multiple databases.
-i Ignores case distinctions in both the database and the pattern.
-l number Limits the number of output files and exit.
-m Specifies to use mmap(2) instead of the STDIO(3) library (is the default).
-s Specifies to use STDIO(3) instead of default.
pattern Specifies the pattern to search for.

File Name: locate

Directory: /usr/bin/

Type: External

Tip Note that you won’t find files that were created or renamed after /usr/libexec/locate updatedb was last run.

locate .jpg Find files whose names contain string .jpg.


locate make grep Looks for commands containing string make; extracts the files that contain the string bin.
bin
locate -i JPG Searches for files whose names contain the string JPG; ignores case. This also searches for files containing
the string .jpg.

locate.updatedb

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Updates the locate database. This is usually updated using the /etc/weekly script.

Syntax—locate.updatedb [options...]

--tmpdir=directory Sets the temporary directory for the files.


--fcodes=file Uses the specified file as the find codes database.
--searchpaths=directories... Adds the specified directory paths into the database.
--pru nepaths= directories... Specifies a list of directories that will not be included into the database.
--filesystems=types... Specifies which file system types are navigated by the find command.

File Name: locate.updatedb

Directory: /usr/libexec/

Type: External

locate.updatedb --tmpdir=/ucgtemp Sets the temporary directory to UCGtemp.

lock

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Locks a terminal to a user with password. It stays locked until it’s released by a user or timed out.

Page 84 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Syntax—lock [options...]

-n Disables the timeout function.


-p Uses the user’s login name or s/key instead of a password.
-t time Specifies the timeout limit in minutes (default is 15).

File Name: lock

Directory: /usr/bin/

Type: External

lock Locks the terminal until 15 minutes has passed or the password is entered.
lock -p -t 60 Locks the terminal for 60 minutes, doesn’t ask for password when invoked; instead, login password is used.
lock -n Asks for a password twice, then locks the terminal until that password is entered again.

lockspool

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Locks user’s system mailbox.

Syntax—lockspool {user}

user Specifies the username to lock the mailbox for.

File Name: lockspool

Directory: /usr/libexec/

Type: External

logresolve

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Resolves IP-addresses in Apache’s access log files. This is to reduce the impact for the name server.

Syntax—logresolve [options...] accesslog newaccesslog

-s file Specifies the filename for the log file.


-c Verifies IP addresses to names with DNS.
accesslog Specifies the Apache access log to run lookups on.
newaccesslog Specifies an output file.

File Name: logresolve

Directory: /usr/sbin/

Type: External

lorder

UNIX Shell—Bourne shell (sh)

Function—Finds ordering relation for an object or library archive and shows a list of the pairs.

Syntax—lorder filenames...

filenames... Can use one or more object or library archive filenames as the input.

Page 85 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: lorder

Directory: /usr/bin/

Type: Script

lpc

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used by the system administrator to control the operation of the line printer system.

Syntax—lpc {ACTION}

ACTION Select one of the following actions:


? {commands...} Shows a short description of each command specified in the argument list.
abort printer Kills the active job and disables unspooling for the specified printer. Can use “all.” 
clean printer Removes any temporary files, data files, and control files that can’t be printed.
disable printer Disables spooling for the specified printer.
down printer Disables both queuing and printing for the specified printer.
enable printer Enables spooling for the specified printer.
exit Exits the command.
restart printer Attempts to start a new printer daemon.
start printer Starts the printer.
Shows the status of daemons and queues on the local computer.
status printer
Shows any further unspooling after the current job completes.
stop printer
Places the selected job at the top of the printer queue.
topq printer jobID
Enables queuing and printing for the specified printer.
up printer Quits program.
quit Shows help information.
help

File Name: lpc

Directory: /usr/sbin/

Type: External

lpc start ljet4a Starts the printer ljet4a.

lpd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A print daemon

Syntax—lpd {-l}

-l Logs valid requests from the network

File Name: lpd

Directory: /usr/sbin/

Type: External

lpf

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used by lpd in the printcap file to filter printouts.

Syntax—lpf options... [options...]

Page 86 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

The following options must be specified. This is done by lpd.


Specifies what printer to use.
-P printer
-wchars Specifies the width of the page in chars.
-llines Specifies the length of the page in lines.
-xpixels Specifies the width of the page in pixels.
-ypixels Specifies the length of the page in pixels.
-Kfile Specifies the control file to use.
-Lbanner Specifies the banner name.
Specifies the username.
-nuser
Specifies the host the job came from.
-hhost
Specifies the job format.
-Fformat
The following option isn’t needed, but if used it is set through lpd:
Specifies extra options directly to lpf taken from the lpr command line.
-Zoption The following options are used mainly from the printcap file but also from lpr:
Ignores control characters. Set with lpr -b or lpr -l.
-c
Specifies which indentation amount. Set with lpr -i indent.
-iindent Specifies the class name. Set with lpr -C class.
-Cclass Specifies the job name. Set with lpr -J job.
-Jjob Specifies the accounting file.
-Rfile Specifies the debugging level number to use.
-Dnumber Turns off CR/LF translation.
-Tcrlf Adds the corresponding character for the integer specified to the end of the line.
-Tnumber

File Name: lpf

Directory: /usr/libexec/lpr/

Type: External

lptest

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates a ripple test pattern to STDOUT and shows all 96 printable ASCII characters useful for testing.

Syntax—lptest {length number}

length -+number Specifies the length of the output line in characters and the number of lines.

File Name: lptest

Directory: /usr/sbin/

Type: External

lptest Displays a test with 79 columns and 200 lines.


lptest 60 50 Displays a test with 60 columns and 50 lines.

lynx

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A fully featured, text only Web browser.

Syntax—lynx [option...] {url}

This is the same command as the one found in Linux. Please see lynx in the Linux chapter for all the options.

File Name: lynx

Directory: /usr/bin/

Page 87 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Type: External

lynx -cookies http://www.ucgbook.com/ Starts lynx and goes to the URL http://www.ucgbook.com.
Iynx -color http://www.ucgbook.com Starts Iynx with colors and does to the URL http://www.ucgbook.com.

machine

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows the kernel or application architecture.

Syntax—machine [-a]

-a Shows the application architecture.

File Name: machine

Directory: /usr/bin/

Type: External

machine Returns the kernel architecture, for example, “i386.”


machine -a Returns the application architecture, for example, “i386.”

mail.local

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Reads from STDIN and appends the information to the specified user’s mail file

Syntax—mail.local [options...] users...

-f name Specifies the sender’s name.


-l Requests that files ending with .lock be used for locking (is the default).
-L Does not create a lock file when locking the spool.
users... Specifies the user mailbox that is appended.

File Name: mail.local

Directory: /usr/libexec/

Type: External

Warning When running disk quotas on /var/mail, you must unset the m mail option for the local mailer.

mailwrapper

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Starts appropriate MTA software based on configuration information in /etc/mailer.conf.It is designed to replace
usr/sbin/sendmail.

Syntax—mailwrapper

File Name: mailwrapper

Directory: /usr/sbin/

Type: External

Page 88 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

MAKEDEV

UNIX Shell—Bourne shell (sh)

Function—Create system and device special files. This script is run at installation, but can be run later.

Syntax—MAKEDEV names...

names... Specifies device name.

File Name: MAKEDEV

Directory: /dev/

Type: Script

/dev/MAKEDEV all Makes all devices.


/dev/MAKEDEV st1 Makes device st1 (SCSII tapes).
/dev/MAKEDEV std Makes all the standard devices for the specific architecture.

makeg

UNIX Shell—Bourne shell (sh)

Function—Is used to make an executable file that can be used for debug operations.

Syntax—makeg [options...] {file}

The command will take any make options.


file Specifies the output file.

File Name: makeg

Directory: /usr/X11R6/bin/

Type: Script

makeg program If a target program is specified in the makefile, a debuggable executable program is made.

makeinfo

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Converts TeX info files to plain text, HTML or info files for online reading.

Syntax—makeinfo [options...] files...

This is the same command as the one found in Linux. Please see makeinfo in the Linux chapter for all the
options.

File Name: makeinfo

Directory: /usr/bin/

Type: External

makekey

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates an encryption key using ASCII characters for programs that run encryption

Page 89 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Syntax—makekey options...

-k Runs makekey in compatible mode.


-b rounds Encrypts the string using Blowfish hashing with the specified rounds.
-m Encrypts the string using MD5.
-P Prompts for a single string with the echo turned off.
-s salt Encrypts the string using DES, with the specified salt.

File Name: makekey

Directory: /usr/libexec/

Type: External

makemap

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Uses the keyed map lookups in sendmail to create the specified type of database map. Reads from STDIN and
writes to the specified new map name.

Syntax—makemap [options...] type name

-N Adds the null byte that will terminate the strings in the specified map.
-d Allows the use of duplicate keys in the specified map. Works with B-tree format maps.
-f Disables uppercase letters from being forced into lowercase (default is uppercase).
-o Appends to a previously existing file.
-r Allows for repeating existing keys. Default gives an error if repeated keys exist.
-s Disables the safety check on the map being created.
-v Verbose mode. Shows more information.
name Specifies the map name of the map database being created.
type Specifies the specific database map format. Only one of the following may be used:
dbm Specifies the map will follow DMB format rules.
btree Specifies the map will follow B-Tree format rules.
hash Specifies the map will follow hash format rules.

File Name: makemap

Directory: /usr/sbin/

Type: External

makemap -d btree newmap Allows the use of duplicate keys in the B-tree formatted map.

map-mbone

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows all multicast routers that are available from the specified multicast router startingrouter.

Syntax—map-mbone [options...] {router}

-d level Specify the debug level to 0-3 (default is 0).


-f Initiates a recursive search. Always done if no starting router is specified.
-g Specifies the graphing format to GraphEd format.
-n Disables DNS lookup for the names of the multicast routers.
-r number Specifies the number of neighbor query retries (default is 1).
-t seconds Sets the seconds to wait for a neighbor query reply before retrying (default is 2).
router Specifies which starting router to begin with (default is local host).

Page 90 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: map-bone

Directory: /usr/sbin/

Type: External

md5

UNIX Shell—All primary shells (csh, ksh, sh)

Function—An algorithm used for digital signature applications to create a 128-bit message-digest fingerprint.

Syntax—md5 [options...] {file}

-s string Shows a checksum of the specified string.


-p Echoes the STDIN to STDOUT and appends the md5 sum to STDOUT.
-t Runs a built-in time trial.
-x Runs a built-in test script.
file Specifies the file to calculate on.

File Name: md5

Directory: /bin/

Type: External

merge

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Merges three files together. It merges the changes between input files two and three into input file number one.

Syntax—merge [options...] file1 file2 file3

-A Verbose mode. Shows more information.


-e Shows no error or conflict messages.
-E Shows no error messages (is the default).
-L label Specifies a label to use instead of filenames in conflict reports.
-p Shows output on the screen.
-q Shows no output.
-V Shows version information.
file1 file2 file3 Specifies the files to merge.

File Name: merge

Directory: /usr/bin/

Type: External

midiplay

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to play MIDI files.

Syntax—midiplay [options...] {files...}

-d number Specifies the device number to use for MIDI output (default is 0).
-f device Specifies the sequencers device.
-l Shows the possible MIDI output devices without playing anything.
-m Shows MIDI file meta events.

Page 91 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-t tempo Specifies the tempo (default is 100).


-v Verbose mode. Shows more information. If repeated, the verbosity increases.
-x Plays a small sample sound.
files... Specifies the MIDI file to play.

File Name: midiplay

Directory: /usr/bin/

Type: External

midiplay-t 150techno.mid Plays the file techno.mid in tempo 150.

mkalias

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Converts YP mail.aliases maps to mail.byaddr maps.

Syntax—mkalias [options...] inputfile {outputfile}

-v Verbose mode. Shows more information.


-e Verifies that the host exists.
-E Verifies that the host exists, and that a valid MX-record exists.
-d Assumes that the domain names are valid. Use with the -e option.
-u Assumes that the UUCP names are valid. Use with the -e option.
-n Adds capital letters to each name. Changes ucgbook.com to Ucgbook.Com.
inputfile Specifies the map to be used as input.
outputfile Specifies the map to be used as output.

File Name: mkalias

Directory: /usr/sbin/

Type: External

mk-amd-map

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates database maps for Amd.

Syntax—mk-amd-map [-p] mapname

-p Shows the map on STDOUT instead of creating a database.


mapname Specifies the map name of the database map to create.

File Name: mk-amd-map

Directory: /usr/sbin/

Type: External

mkdep

UNIX Shell—Bourne shell (sh)

Function—Creates Makefile dependency lines for a specified source file.

Syntax—mkdep [options...] {files...}

Page 92 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-a Allows multiple mkdeps to run from a single Makefile by appending to the output file.
-p Makes mkdep to produce dependencies from the form: program: program.c
-f file Specifies a file to write the include file dependencies to.
flags List of flags for the C compiler.
files... Specify input file(s).

File Name: mkdep

Directory: /usr/bin/

Type: Script

mkdep input.c Creates dependency lines for the specified source file.

mkisofs

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates an ISO9660 file system. Uses the specified directory tree to create a ISO9660 file system copy.

Syntax—mkisofs [options...] -o file directory

-a Includes all ISO9660 files and backup files that use ~ or #.


-A ID Specifies text to be written into the application volume header (max 128 characters).
-b file Specifies path- and filename to a boot image. Must be 1.2, 1.44, or 2.88 MB in size.
-c directory Specifies a boot directory to use when creating a bootable CD.
-d Excludes a trailing period from files that lack a period. Use this with caution.
-D Packs the directory as it is seen. Does not use deep directory relocation.
-f Generates the file system by following symbolic links.
-i list Specifies the file to be used to create a list of files to add to the directory.
-l Enables the use of 32-character filenames.
-L Permits the use of filenames that begin with a period.
-m glob Specifies a glob to ignore when writing to a CD.
-M path Specifies a path to an ISO-9660 image that needs to be merged.
-N Doesn’t put ISO-9660 version numbers in the filenames.
-o file Specifies the name of a file to write the file system image to.
-P ID Specifies publisher info text to be written into volume header (max 128 characters).
Specifies prepared info text to be written into the volume header (max 1 28 characters).
-p ID
Creates SUSP and RR records to explain the created files.
-R
Similar to -R, but with more user-friendly values to show nodes and ownership.
-r
Creates a TRANS.TBL file in each directory on the CD-ROM.
-T
Specifies the volume ID to be written into the master block.
-V ID
Verbose mode. Shows more information.
-v
Excludes the specified path from being written to the CD-ROM. Separate paths by a space.
-x paths...
Creates SUSP records for compressed files that are transparent.
-z Specifies the directory to create an ISO-9660 file system of.
directory

File Name: mkisofs

Directory: /usr/sbin/

Type: External

Note Options -d and -D don’t follow ISO9660 rules.

mkisofs -o rom -m '*.x' -m ucg -m rules Excludes all files ending with . x and that are called ucg or rules to be copied to CD-ROM.
mkisofs -o cd -x /local/ucgbook Does not write files from the directory /local/ucgbook to the CD-ROM.

mkstr

UNIX Shell—All primary shells (csh, ksh, sh)

Page 93 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Function—Creates specific files containing error messages that are extruded from a list of other files.

Syntax—mkstr [-] messagefile prefix files...

[-] Places any error messages at the end of the message file.
messagefile Specifies the message file to be captured.
prefix Specifies the file prefix to use for the created file.
files... Specifies the files where the error messages will be extracted from. Use wildcards.

File Name: mkstr

Directory: /usr/bin/

Type: External

Note mkstr was intended for the limited architecture of the PDP 1 1 family, so very few programs actually use it. The
Pascal interpreter, pi(1), and the editor, ex(1), are two programs that are similar.

mkstr pistrings processed Places the error messages from C source files into the file pistrings and places them in files with a prefix
*.c of processed.

mktemp

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates a temporary filename using another filename as a template.

Syntax—mktemp [options...] file

-d Creates a directory instead of a file.


-q Quiet mode. Fails silently if an error occurs.
-u Unlinks the file before mktemp exits.
file Specifies the file to use as a template.

File Name: mktemp

Directory: /usr/bin/

Type: External

modload

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Loads a loadable kernel module into a running system where the input file in the syntax is an object file (.o file).

Syntax—modload [options...] [-o outputfile] inputfile

-d Shows debug information about modload itself.


-q Sets quiet mode.
-u Erases the output file of the loaded module after loading.
-v Verbose mode. Shows more information.
-A kernel Specifies kernel’s symbol file used to resolve module references to external symbols. (If specified
-e entry file is other than running kernel’s, it can crash the system.)
-p exec Specifies the entry point of the module (default is xxxinit).
-o outputfile Specifies a shell script or program that is executed on successful module load.
inputfile Specifies the output file. If not specified, a file modulename.out is created in /tmp.
Specifies the name of the module object file to load.

File Name: modload

Page 94 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Directory: /sbin/

Type: External

modstat

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows the status of any loadable kernel modules present in the kernel.

Syntax—modstat [options...]

-i /D Shows the status of the module with the ID.


-n name Shows the status of the module with the name.

File Name: modstat

Directory: /usr/bin/

Type: External

modunload

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Unloads a previously loaded module from a running system.

Syntax—modunload [options...]

-i modulelD Unloads the module with the specified ID.


-n name Unloads the module with the specified name.

File Name: modunload

Directory: /sbin/

Type: External

Note The modunload command was designed to be similar in fuctionality to the corresponding command in SunOS
4.1.3.

modunload -i 14 Unloads module 14.

mopchk

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows information about MOP images.

Syntax—mopchk [options...] {file}

-a Shows all the Ethernets connected to the system.


-v Shows version information of mopprobe.
file Specifies the file to read the MOP-images information from—it reads from the header.

File Name: mopchk

Directory: /usr/sbin/

Type: External

Page 95 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Bug: In some implementations, the same interface can occur more than once.

mopd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A MOP loader daemon that services MOP load requests on the Ethernet connected to one or all interfaces.

Syntax—mopd [options...] {interface}

-a Listens on all the Ethernets connected to the system.


-d Runs in debug mode in the foreground, with all the output to STDOUT.
-f Specifies to run in the foreground.
interface Specifies which interface to use. Must be specified if there is no -a.

File Name: mopd

Directory: /usr/sbin/

Type: External

Note Supports two kinds of files. The file is first checked to see if it is in a.out format. If not, a few of Digital’s formats
are checked. Anomalies and errors are reported via syslog.

mopprobe

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows Ethernet address and node name for DEC servers 100/200/250/300 connected to one or all interfaces,

Syntax—mopprobe [options...] {interface}

-a Listens on all the Ethernets connected to the system.


-3 Ignores all MOP V3 messages (Ethernet II).
-4 Ignores all MOP V4 messages (Ethernet 802.3).
-o Shows a node just once.
-v Shows all nodes sending MOP/RC SID messages.
interface Specifies which interface to use. Must be specified if there is no -a.

File Name: mopprobe

Directory: /usr/sbin/

Type: External

moptrace

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows the contents of MOP packages on the Ethernet connected to one or all interfaces.

Syntax—moptrace [options...] {interface}

-a Listens on all the Ethernets connected to the system.


-3 Ignores all MOP V3 messages (Ethernet II).
-4 Ignores all MOP V4 messages (Ethernet 802.3).
-d Runs in debug mode, with all the output to STDERR.
interface Specifies which interface to use. Must be specified if there is no -a.

File Name: moptrace

Page 96 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Directory: /usr/sbin/

Type: External

mount_ados

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to mount an Amiga DOS file system.

Syntax—mount_ados [options...] device path

-o options Specifies the mount options, as described in the mount command.


-u UID Specifies the group of the files in the file system.
-g GID Specifies the owner of the files in the file system.
-m mask Specifies the default file permissions for files in the file system.
device Specifies where the file system resides.
path Specifies where to mount the file system.

File Name: mount_ados

Directory: /sbin/

Type: External

mount_ados /dev/wd1a /mnt Mounts the Amiga DOS file system from /dev/wd1a in /mnt.
mount_ados -u 0 -m Same as above, but makes root owner of all files and sets full permissions for root and none
700 /dev/wd1a /mnt for all others.

mount_cd9660

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Mounts an ISO-9660 file system found on the specified device to the specified mount point path.

Syntax—mount_cd9660 [options...] device directory

-e Uses extended attributes.


-g Doesn’t remove the version numbers of the files.
-j Disables the Joliet extensions on the file system.
-o options... Specifies options to use when mounting. Multiple options are separated with a comma.
-R Disables the Rock ridge extensions on the file system.
-v Verbose mode. Shows more information.
device Specifies a special device to use as the source when mounting.
directory Specifies a directory to use as the destination when mounting.

File Name: mount_cd9660

Directory: /sbin/

Type: External

mount_cd9660 /dev/cd0a /mnt Mounts the CD-ROM found in /dev/cd0a to /mnt.


mount_cd9660 -e /dev/cd0a /mnt Mounts and disables the Joliet extensions.

mount_ext2fs

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Mounts an extended2 file system found on the specified device and attaches that to the specified destination

Page 97 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

directory.

Syntax—mount_ext2fs [options...] device directory

-o options... Specifies options to use when mounting. Multiple options are separated with a comma.
device Specifies a special device to use as the source when mounting.
directory Specifies a directory to use as the destination when mounting.

File Name: mount_ext2fs

Directory: /sbin/

Type: External

mount_ext2fs /dev/wd0d /linux Mounts the specified partition to /linux.

mount_fdesc

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Mounts an instance of the per-process file descriptor namespace to the file system.

Syntax—mount_fdesc [-o] mountpoint

-o options Specifies a comma-separated list of any mount options.


mountpoint Specifies the contents of the mount point options as follows:
fd A directory’s contents that appear as a list of numbered files.
stderr Appears as symlinks to the relevant entry in the /dev/fd subdirectory.
stdin Appears as symlinks to the relevant entry in the /dev/fd subdirectory.
stdout Appears as symlinks to the relevant entry in the /dev/fd subdirectory.
tty An indirect reference to the current process’s controlling terminal.

File Name: mount_fdesc

Directory: /sbin/

Type: External

mount_ffs

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Mounts a Berkeley Fast File System on the specified device and node.

Syntax—mount_ffs [-o] device node

-o options Specifies a comma-separated list of any mount options.


device Specifies the special device the file system will be mounted in.
node Specifies the node the file system will be mounted to.

File Name: mount_ffs

Directory: /sbin/

Type: External

mount_kernfs

UNIX Shell—All primary shells (csh, ksh, sh)

Page 98 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Function—Mounts an instance of the kernel parameter namespace to the global file system.

Syntax—mount_kernfs [-o] mountpoint

-o options. Specifies a comma-separated list of any mount options.


mountpoint. Specifies the Kern file system mount point.

File Name: mount_kernfs

Directory: /sbin/

Type: External

mount_mfs

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates a file system in the virtual memory and then mounts it on the specified node.

Syntax—mount [options...] file node

-o options Specifies a comma-separated list of any mount options.


-N Shows the parameters, but doesn’t create the files.
-a count Specifies the maximum number of blocks laid out before a rotational delay (default is 8).
-b size Specifies the block size of the file system in bytes.
-c count Specifies the number of cylinders per cylinder group in a file system (default is 16).
-d time Specifies the expected time in milliseconds for a transfer completion/initialization.
-e count Specifies the maximum number of blocks any file can allocate in a cylinder group.
-f size Specifies the fragment size in bytes.
Specifies the file systems inode density in bytes (default is 4096).
-i count
Specifies the space reserved from normal users in percent (default is 5).
-m count
Specifies the number of distinguished rotational partitions.
-n number
Specifies the size of the file system in sectors.
-s size
Specifies the special file to read for parameters.
file Specifies the mount node.
node

File Name: mount_mfs

Directory: /sbin/

Type: External

mount_msdos

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Mounts an MS-DOS file system to the specified special device at the specified node.

Syntax—mount [options...] device node

-o options Specifies a comma-separated list of any mount options.


-u user Specifies the name of the owner to the file system.
-g group Specifies the name of the group owner.
-m mask Specifies the file’s permissions in octal numbers.
-s Disables Windows 95/98 long filenames.
-l Enables Windows 95/98 long filenames.
-9 Ignores the special Windows 95/98 directory entries even if deleted. Forces -s flag.
-G Interprets the file system as an Atari Gemdos file system.
device Specifies device to mount at.
node Specifies node at the specified device.

Page 99 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: mount_msdos

Directory: /sbin/

Type: External

Warning The -9 flag could result in damaged file systems. Default handling for -s and -l will result in empty file systems
to be populated with short filenames only.

mount_nfs

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Mounts the NFS directory located on the computer specified to the mount point.

Syntax—mount_nfs {options...} hostname:sourcepath mountpoint

-2 Uses version 2 of NFS.


-3 Uses version 3 of NFS.
-D threshold Specifies the dead server threshold to set with the NQNFS.
-I size Specifies the read size to set on the readdir.
-K Uses Kerberos authentications with client-to-server mapping.
-L seconds Specifies the lease term in seconds.
-P For compatibility only.
-R tries Specifies the amount of tries to mount before giving up.
-T Disables the use of UDP and uses only TCP for transport.
-U Disables the use of TCP and uses only UTP for transport.
-a number Specifies how many blocks will be read before a large file is being read.
-b Tries to connect to the NFS server even if the contact failed.
-c Sends UTP requests to an NFS server without sending a TCP connect.
-d Disables the retransmit timeout estimator.
-g groups Specifies how many groups a user can be a member of.
-i Interrupts a mount when a server stops responding.
-l Uses cache to make the RPC traffic faster.
-m realm Specifies the Kerberos realm to use.
Specifies options to use when mounting. Multiple options are separated with a comma.
-o options...
Specifies a port to connect to on the NFS server. (There are other standard options that can be sent.)
port= number
Uses the NFS version 3 leasing extensions.
-q
Specifies what read data size to use.
-r size
Performs a soft mount.
-s
Specifies the retransmit timeout to use.
-t seconds
Specifies what write data size to use.
-w size Specifies how many retries to use when mounting soft.
-x number Specifies the NFS server’s hostname.
hostname Specifies the pathname to the shared directory on the NFS server.
source path Specifies the place to mount the NFS.
mountpoint

File Name: mount_nfs

Directory: /sbin/

Type: External

Tip NFS is perfect if you have several computers and want to share the same home file system.

mount_nfs ucgbook.com:/home/nfs /ucg Mounts the remote directory /home/nfs to the local directory /mnt.

mount_null

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Duplicates a subtree of the file system namespace and creates a null file system layer.

Page 100 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Syntax—mount_null [-o] {mountpoint}

-o options Specifies a comma-separated list of any mount options.


mountpoint Specifies the mount point of the null file system layer.

File Name: mount_null

Directory: /sbin/

Type: External

Tip Two good reasons for a null layer: A good demo to use when teaching "how to build a layer" and a good prototype
layer, because it has all the necessary layer framework that you need.

mount_portal

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Mounts an instance of the portal daemon to the global file system namespace.

Syntax—mount_portal [-o] mountpoint

-o options Specifies a comma-separated list of any mount options.


mountpoint Specifies the mount point.

File Name: mount_portal

Directory: /sbin/

Type: External

mount_procfs

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Mounts an instance of the process namespace to the global file system namespace.

Syntax—mount_procfs [-o] mountpoint

-o options Specifies a comma-separated list of any mount options.


mountpoint Specifies the mount point.

File Name: mount_procfs

Directory: /sbin/

Type: External

mount_ufs

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Mounts a Berkeley Fast File System on the specified device to the specified mount point.

Syntax—mount ufs [options...] device node

-o options Specifies a comma-separated list of any mount options.


device Specifies the special device the file system will be mounted in.
node Specifies the node the file system will be mounted to.

Page 101 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: mount_ufs

Directory: /sbin/

Type: External

mount_umap

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Mounts a subtree of a file system with a different set of UIDs and GIDs than the local system.

Syntax mount umap [options...] target mountpoint

-o options Specifies a comma-separated list of any mount options.


-u file Specifies the file containing the UID mappings to be made between the identifiers.
-g file Specifies the file containing the GID mapping to be made between the identifiers.
target Specifies the current location of the subtree.
mountpoint Specifies a directory where the mapped subtree is to be placed.

File Name: mount_umap

Directory: /sbin/

Type: External

Note The layer created by this command is meant to serve as an example of file system layering, so this is a good
template or a training tool.

mount_union

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Mounts a directory above uniondir and makes the contents of both directories visible.

Syntax—mount_union [options...] directory unioundirectory

-o options Specifies a comma-separated list of any mount options.


-b Inverts the layer positions to make the new directory the lower one.
-r Hides the lower layer.
directory Specifies the union directory that is the lower layer.
uniondirectory Specifies the union directory that is the upper layer.

File Name: mount_union

Directory: /sbin/

Type: External

mount_xfs

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Mounts one of the xts character devices.

Syntax—mount_xfs [-o list] device mountpoint

-o list Specifies a comma-separated list of any mount options.


device Specifies a device to use for communication.
mountpoint Specifies the mount point of the xfs character device.

Page 102 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: mount_xfs

Directory: /sbin/

Type: External

mrinfo

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows the configuration information from a multicast router. Must be run as root.

Syntax—mrinfo [options...] {multicastrouter}

-d evel| Specify the debug level to 0-3 (default is 0).


-t seconds Sets the seconds to wait for a neighbor query reply before retrying (default is 4).
-r number Specifies the number of neighbor query retries (default is 3).
multicastrouter Specifies which multicastrouter to query.

File Name: mrinfo

Directory: /usr/sbin/

Type: External

mrouted

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Handles IP multicast routing among subnets.

Syntax—mrouted [options...]

-c file Specifies a filename for the overriding configuration commands.


-d {level} Shows debug information with the specified level of 0-3.
-p Starts in nonpruning mode.

File Name: mrouted

Directory: /usr/sbin/

Type: External

Tip The tunneling mechanism allows mrouted to establish a virtual Internet, for the purpose of multicasting only which is
independent of the physical Internet and which may span multiple autonomous systems.

mset

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Retrieves mapping information for the ASCII keyboard to an IBM 3270 terminal.

Syntax—mset [options...] {name}

-picky Shows warnings about all unknown entries.


-shell Breaks the entries to fit in the shell environment.
name Specifies a keyboard to take the mapping from.

File Name: mset

Directory: /usr/bin/

Page 103 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Type: External

mset -picky Shows all warning messages.

msgs

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to read or save system messages sent by mail.

Syntax—msgs [options...] {position}

-f Disables the message No new messages.


-q Searches to see if there are any messages.
-h Prints only the first part of a message.
-r Deactivates the ability to do a message save or enter the mailer.
-l Causes local messages to be shown.
-p Pipes messages through a program specified by pager or with more.
-s Prepares message posting and must be put into /etc/aliases to work.
Possible responses when the message is longer than the screen:
y Shows the rest of the message.
RETURN Uses the Return key on the keyboard instead of the y option.
n Skips the message and goes on to the next.
- Repeats the last message.
q Quits msgs and picks up where it left off the next time msgs starts.
m Copies the message into a temporary mailbox and starts mail.
s{file} Adds a current message to the message file in the local directory or a specified file.
s-{file} Saves the last message to the message file in the local directory or a specified file.
position Specifies the position (integer) in .msgsrc to start reading messages from.
-position Specifies the position (integer) in .msasrc to read messages backwards from.

File Name: msgs

Directory: /usr/bin/

Type: External

msgs -h 1 Shows the beginning of all of the messages available in the .msgsrc, starting from the first one.
msgs -20 Shows all of the messages available in the .msgsrc, starting from the 20th one and going backward to the first one.
msgs -f Disables the No new messages message.

mtrace

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows trace information about IP multicast traffic.

Syntax—mtrace [options...] source {receiver} {group}

-g name Sends the trace unicast directly to the specified multicast router.
-e number Tries to trace past a non-responding router the specified number of times.

Page 104 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-i address Specifies the local and also default receiver address.


-l Runs the trace as a loop and show information every ten seconds.
-M Uses multicast to send responses only.
-m count Specifies the maximum number of hops to trace.
-n Shows hop addresses numerically only.
-q count Specifies the maximum number of query attempts for a hop (default is 3).
-p Listens passively to multicast responses from traces started by others.
-r destinationt Sends the response to the specified destination.
-s Shows only the multicast path as output.
-S time Specifies the interval between traces in seconds (default is 10).
-t time Specifies the maximum number of hops (TTL) for a multicast trace (default is 64).
Verbose mode. Shows more information.
-v
Specifies the time to wait for a trace response in seconds (default is 3).
-w time
Specifies the source of the query.
source
Specifies the receiver of the query. The default is the host that is running mtrace.
receiver
Specifies the multicast group. Default group is MBone Audio (224.2.0.1).
group

File Name: mtrace

Directory: /usr/sbin/

Type: External

Warning Ver. 3.3 and 3.5 will crash if a trace query is received via a unicast packet without a route for the source
address.

mtree

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows the difference between a rooted directory and a specification on STDIN.

Syntax—mtree [options...]

-c Shows a specification of the file hierarchy on STDOUT.


-d Shows only directory type files.
-e Ignores any error messages from files in the file hierarchy, but not the specification.
-f file Specifies a file to read the specification from instead of STDIN.
-i Indents with four spaces each time a directory level is descended, only when -c is used.
-K words Adds the specified (whitespace or comma-separated) keywords to the current set.
-k words Uses the specified and the type keywords instead of the current set.
-n Does not emit pathname comments when a specification is created.
-p path Specifies a different file hierarchy to use instead of the current directory.
-q Quiet mode. Does not show error messages about missing directories.
-r Deletes all files in the hierarchy that are not described in the specification.
-t Updates the timestamps to match the specification time.
-s value Shows a single checksum of the files, seeded with the specified value.
-U Modifies the owner, group, and permissions to match the specification.
-u Same as -U, except that status 2 is returned if the file hierarchy did not match.
-x Does not descend below mount points in the directory.

File Name: mtree

Directory: /usr/sbin/

Type: External

named.reload

UNIX Shell—All primary shells (csh, ksh, sh)

Page 105 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Function—Initiates the name server to synchronize its database. It sends a SIGHUP to the running name server.

Syntax—named.reload

File Name: named.reload

Directory: /usr/sbin/

Type: External

named.restart

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Stops the running name server by sending a SIGKILL signal and starts a new name server.

Syntax—named.restart

File Name: named.restart

Directory: /usr/sbin/

Type: External

Warning Does not wait after killing the old server before starting a new one. Does not check whether the name server
is actually running.

named-xfer

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A program that is used to run inbound zone transfers.

Syntax—named-xfer options... [options...] nameservers... {ACTION}

The following options are required:


-z transferzone Is used to specify the zone that you want to transfer.
-f file Specifies the file where to put the zone that is received from the name servers.
-s serialno Is used to specify the serial number of the zone.
The following options are optional:
-d level Shows debug information. Debug level can be between 1 and 10.
-l logfile Specifies where to put debug messages.
-t tracefile Specifies a protocol trace file for debugging the zone transfer.
-p port Sets a new port number to use instead of the default.
-S Transfers only SOA, NS, and A records.
nameservers... Specifies the name server or servers to run a zone transfer on.
ACTION Specifies the type of zone transfer to perform.
Does a full zone transfer.
ixfr
Does an incremental zone transfer.
axfr

File Name: named-xfer

Directory: /var/named/

Type: External

nawk, awk

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Scans each input file for lines that match any of a set of patterns specified as a string.

Syntax—nawk/awk [options...] [‘scriptstr’] {files...}

Page 106 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-F expression Specifies the expression to use as field separator.


-safe Disables file output and access to the environment.
-mr value Sets the maximum record size.
-mf value Sets maximum number of fields.
' scriptstr ' Contains the pattern action statements and must be enclosed by singles quotes (').
The following arithmetic functions are supported:
pattern {action} The format for the pattern action statements specified by ‘scriptstr’.
The following arithmetic functions are supported:
atan2(x,y) Returns the arctan of x/y. The result is in radians.
cos(x) Returns the cosine of the specified value. The value must be in radians.
exp(x) Returns the exponential function of the specified value.
Shortens the specified value to an integer. It trims the value when x>0.
int(x)
Returns the natural logarithm of the specified value.
log(x)
Returns a random number between 0 and 1.
rand( ) Returns the sine of the specified value. The value must be in radians.
sin(x) Returns the square root of the specified value.
sqrt(x) Specifies a new seed for the rand function; if not specified, use time of day.
srand({x}) The following are the supported string functions (string is indicated by s):
Replaces all regular expression r with s in t. If t not given, use $0.
gsub(r, s [, t]) Is same as above if h=g or G. Otherwise, h specifies the match to replace.
gensub(r, s, h [, t}) Gives the position of string s where the substring sub occurs first.
index(s, sub) Gives the total length of an argument or an entire line if there is no argument.
length(s) Returns the position where the regular expression re matches the string s.
match(s, re) Splits string s into an array of elements a1, a2, and separates fields with the fs exp.
split(s, a, fs) Formats listed expressions with printf using the format specified by fmt.
sprintf(fmt, expr...) The same as gsub, but replaces only the first match.
sub(r,s[,t]) Gives the n-character substring of the string s that starts at the m position.
substr(s, m, n) Returns the string with all letters uppercase.
toupper(s) Returns the string with all letters lowercase.
tolower(s) The following are the built-in variables that can be used:
Is used to specify a built-in variable listed below and assign it a value.
-v var=value Defines the number of command-line arguments, not counting the one to gawk.
ARGC Defines the index in ARGV of the current file being processed.
ARGIND Defines an array of command-line arguments index from 0 to ARGC-1.
ARGV Specifies the conversion format for numbers (default is %.6g).
CONVFMT Defines an array with the environment variables.
ENVIRON Define a string containing error description if an error occurs.
ERRNO Specifies a list of field widths.
FIELDWIDTHS Specifies the name of the current file being used for input.
FILENAME Defines the input record number in the current input file.
FNR Defines input field separators (default is Space and Tab).
FS Specifies if case will be ignored. If zero (0), all function is case-sensitive.
IGNORECASE Defines number of fields in the existing file.
NF Defines ordinal number for the current record.
NR Defines output numbers in a specific format (default is %.6g).
OFMT Defines output field separators (default is blank).
OFS Defines output record separators (default is new line).
ORS Defines input record separators (default is new line).
RS Specifies index of the first character match by match(); 0 if no match.
RSTART Specifies the length of the string that matched by match(); -1 is no match.
RLENGTH Specifies the character that separates subscripts in array elements (default is \034).
SUBSEP The following are control flow functions:
Is used to exit from a for, while, or do loop.

Page 107 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

break Starts the next loop cycle in a for, while, or do loop.


continue A loop that executes the specified statement while the condition is true.
Is evaluated by do and runs the do statement if the condition is true and exits if false.
do statement
Executes the end routine if it exists, and exits the script with return value exp.
while (condition)
Performs the statement if the condition is true or will perform the else condition.
exit {exp}
Performs the else condition when the if condition is false.
if (condition) Performs the condition as long as the condition is true.
else (condition) A loop that uses three expressions (see below). Exit when any expression is false.
while (condition) Sets the counter variable an initial value that counts the number of loops.
for(exp1; exp2; exp3) Defines the variable that is read and evaluated before executing the statement.
exp1 A counter that increments each time the loop is true. (The variables exp1, exp2, exp3 are all optional and are true if not used.
exp2 A loop that executes each variable defined in an array.
exp3 Reads the input line and begins a new loop or procedure.
for (arrayvar) The following input/output functions are supported:
next Sets $0 into the next input record using the current input file. (1 = success, -1 = error.)
Shows the results of the ‘scriptstr’ and variables to STDOUT.
getline Same as print, but also formats the output.
print Specifies the field number in the file ($1, $2, $3, and so forth) and separated by FS.
printf Specifies to use the entire line in the file as input.
$n Specifies the input files that are scanned for pattern matching.
$0
files...

File Name: nawk

Directory: /usr/bin/

Type: External

nc

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used for TCP and UDP connections and listens.

Syntax—nc [options...]

-e command Runs the specified command.


-g host Specifies a chain in a loose source-routed path. Can be used several times.
-G pointer Is used to position the hop counter in the list of hosts. Must be a multiple of 4.
-i seconds Specifies the time interval between lines of text sent and received.
-l Listens to incoming connection. Doesn’t start a connection.
-n Doesn’t use DNS lookup.
-o filename Creates a log file of transfer information in hexadecimal format.
-p port Specifies the port to use.
-r Uses semirandom ports for source and destination.
-s ip-adress Specifies the IP address for the interface to use. Can be specified with the name.
-t Uses RFC854 Don’t and won’t response to DO and WILL request.
-u Uses UDP, not TCP.
-v Verbose mode. Shows more information.
-w timeout Specifies the timeout for nc. After the timeout, nc will end.
-z Scans for listening daemons, without sending any data to them.

File Name: nc

Directory: /usr/bin/

Type: External

nc -p 31337 example.host Opens a TCP connection to port 42 of example. host, and uses port 31337 as the source port.
42
nc -w 5 example.host 42 Opens a TCP connection to port 42 of example.host, and times out after five seconds while attempting
to connect.

Page 108 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

nc -u example.host 53 Sends any data from STDIN to UDP port 53 of example.host, and shows any data returned.

ncheck_ffs, ncheck

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates a list of filenames and inode numbers for the given file system.

Syntax—ncheck_ffs [options...] filesystem

-i numbers Shows only those files whose inode numbers follow.


-a Shows the filenames dot (.) and double dot (..), which are ordinarily skipped.
-m Verbose mode. Shows more information about inodes.
-s Shows only special files and files with set-user ID or set-group ID set.
filesystem Specifies which file system to use.

File Name: ncheck_ffs

Directory: /sbin/

Type: External

Tip -s is a great way of finding hidden violations of security policies.

ndc

UNIX Shell—All primary shells (csh, ksh, sh)

Function— Allows the administrator of the name server to send commands to the name server.

Syntax—ndc {ACTIONS...}

ACTIONS... Select one or more of the following actions:


status Shows the status of the name server.
dumpdb Dumps the name server database and cache to /var/named/namedb/named_dump.db.
reload Checks the name server serial numbers of the primary/secondary zones and loads changes.
stats Dumps the name server statistics to /var/named/namedb/named.stats.
trace Increases the name server’s tracing level by one. Find it at /var/named/namedb/named.run.
notrace Causes named to set tracing level to 0 and closes /var/named/namedb/named.run if open.
querylog Toggles query logging, which starts a syslog of queries.
start Starts the name server as long as it isn’t already active.
stop Stops the name server as long as it is active.
restart Stops and then starts the name server.

File Name: ndc

Directory: /usr/sbin/

Type: Script

Tip Query logging consumes a lot of file space and any arguments that are sent to the name server are not saved by
restart.

ndc status Shows the status of the name server.


ndc stats Dumps the name server statistics to /var/named/namedb/named.stats.

netgroup_mkdb

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates netgroup databases (/etc/netgroup.db) from the /etc/netgroup file and saves it in /etc/netgroup.db.

Page 109 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Syntax—netgroup_mkdb [-o database] {file}

-o database Uses the specified database instead of /etc/netgroup.db.


file Specifies a different file than /etc/netgroup to use as input.

File Name: netgroup_mkdb

Directory: /usr/sbin/

Type: External

newfs

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates a new file system using defaults based on the disk label created by disklabel.

Syntax—newfs [options...]

-N Shows what the command would do, but doesn’t execute.


-O Creates an older boot ROMs compatible 4.3-BSD format file system.
-a value Specifies the maximum contiguous blocks before forcing a rotational delay (default is 8).
-b bsize Specifies the logical block size in bytes when you create a file system.
-c cgsize Specifies the number of cylinders to use per cylinder group (default is 16).
-d gap Specifies the time a service can take to initiate a new transfer if it’s interrupted. (The time is specified in milliseconds,
-e value Specifies the max amount of blocks per cylinder group a file may use.
-f fragsize Specifies the fragment size in bytes to use on the new file system.
-l idensity Specifies the inode density in the file system (default is 1 inode per 4096 bytes).
Specifies the minimum percentage of free space to be available (default is 5%).
-m free
Specifies the number of rotational positions per cylinder group (default is 1).
-n nrpos
Minimizes time spent allocating time or minimizing fragments space.
-o opt
Sets quiet mode.
-q
Specifies the size of the file system in sectors.
-s size The following options skip the defaults, for creating an FS for other disks:
Specifies the size of sectors in bytes (often 512 bytes).
-S size Used to describe problems in the media format to compensate for slow controllers.
-k value Used to describe problems in the media format to compensate for slow controllers.
-l hardware sector interleave Spares sectors per track. This is often used to spare bad sectors.
-p sector(s) Shows the speed of the disk in revolutions per minute.
-r revolutions per minute The number of tracks/cylinders available for data allocation by the file system.
-z #tracks/cylinder Sets the file system type of the file system you wish to create, like newfs_fstype.
-t filesystemtype The number of sectors per track available for data allocation by the file system.
-u sectors per track Spares sectors per cylinders. This is often used to spare bad sectors.
-x sector(s)

File Name: newfs3

Directory: /sbin/

Type: External

newfs_msdos

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates a new MS-DOS file system on the device.

Syntax—newfs_msdos [options...] device

-s kilobytes Specifies the size in kilobytes (can be 360, 720, 1200, or 1440).
-L label Specifies the label of the disk (default is 4.4-BSD).
device Specifies the device to use.

Page 110 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: newfs_msdos

Directory: /sbin/

Type: External

newfs_msdos /dev/wd1a Creates a new MS-DOS file system on /dev/wd1a.


newfs_msdos -s 1440 /dev/fd/0 Creates a new MS-DOS file system on a 1.44MB floppy.

newsyslog

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Archives system log files at intervals or when log file exceeds a specified size.

Syntax—newsyslog [options...]

-v Verbose mode. Shows more information.


-m Runs newsyslog in monitoring mode. (Only entries marked with an M in flags are processed.)
-n Outputs what newsyslog would do with the log file, but does nothing.
-r Enables newsyslog to run without being root. Mainly for debugging.
-f [config file] Uses the specified configuration file (default is /etc/newsyslog.conf).
The following fields exists in the configuration file:
logfile name Specifies full pathname to the system log file.
owner.group of archives Specifies the owner and the group for the archives (is optional).
mode of logfile &archives Specifies the octal mode of created archives and log files.
number of archives Specifies how many archives to keep, except the original log file.
To skip any of the two following insert an * in that field:
size of archives Specifies the size of the log file at which it will be archived.
archive interval Specifies the interval in hours at which the log file will be archived.
flags Enables special processing (is optional). The following flags are valid:
Z Compresses the archive using gzip or compress.
B Assumes the file is a binary file.
M Handles the log file as monitored.
monitor notification Specifies an account to send messages to when a log file is monitored (is optional).
pid file Specifies a PID file to send the SIGHUP signal (is optional). (Default is /var/run/syslog.pid.)

File Name: newsyslog

Directory: /usr/bin/

Type: External

newsyslog -v -f mypersonalsyslog.conf Runs newsyslog in verbose mode and uses the specified config file.

nfsiod

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Improves performance for NFS asynchronous I/O requests for its server.

Syntax—nfsiod [-n number]

-n number Specifies the number of servers that are started (max 20).

File Name: nfsiod

Directory: /sbin/

Type: External

Page 111 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

nologin

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A shell used only to deny a user to login. Shows the user the contents of /etc/nologin.txt.

Syntax—nologin

File Name: nologin

Directory: /sbin/

Type: External

Tip I use this when I want to reject an abusive user from the system for a short time instead of removing the user.

objdump

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows information about object files. Information shown is controlled by given options.

Syntax—objdump [options...] objectfiles...

-a Shows archive header information if any object file is an archive file.


-b bfdname Sets the object-code format to bfdname for object files. Please see -i option for formats.
--debugging Shows debug information.
-d Shows the assembler instructions in the object file for instruction sections only.
-D Shows the assembler instructions in the object file for all sections.
-prefix-addresses Shows information in an older format, a complete address at every line.
-EB Specifies that big endian is in use when disassembled.
-EL Specifies that little endian is in use when disassembled.
-f Shows all information of the overall header summary for each object file.
-h Shows a summary of the section header for each object file.
-help Shows help information.
-i Shows all architectures and object formats to use with -b and -m options.
-j name Specifies the name of the section to show information for.
-l Labels the display if used with the -d, -D, or -r options.
-m architecture Sets the architecture when disassembling object files. See -i option for formats.
-r Shows the relocation entries for the object file.
-R Shows the dynamic relocation entries for the object file.
-s Shows all contents for any section.
-S Shows disassembly information in the source code when possible.
--show-raw-insn Shows the instructions in HEX and symbolic form when disassembling instructions.
--noshow-raw-insn Doesn’t show the instruction bytes.
--stabs Shows the content in .stab sections in an ELF object file.
--start-address=address Specifies the address to start showing data.
--stop-address=adress Specifies the address to stop showing data.
-t Shows the symbol table entries in the object file.
-T Shows the dynamic symbol table entries in the object file.
--version Shows version information.
-x Shows all header information, with the symbol table and relocation entries.
objectfiles... Specifies the object files to examine.

File Name: objdump

Directory: /usr/bin/

Type: External

objdump -f hello.o Shows overall header summary information for object hello.o.

Page 112 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

oldrdist

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A file distribution program that remotely maintains copies of files over multiple hosts.

Syntax—oldrdist [options...] [-f file] [-d var=value] [-m host] {names...}, rdist [options...] -c names... {user@] host
[:destination}

The following options are valid for both syntax formats:


-b Compares binary differences between files.
-d var=value Forces a specified variable to have a specific value.
-h Follows any symbolic links by copying the file that the link points to.
-i Ignores any unresolved links.
-m host Limits which hosts will be updated. Use more m ' s for more hosts.
-n Shows the commands, but will not run them.
-q Starts quiet mode. Any file modification information is suppressed.
-R Removes any extra files while a directory is being updated.
-v Verifies that the host files are up-to-date. Any out-of-date files will be shown.
-w Starts whole mode—that is, the entire filename is appended to the destination directory.
-y Starts younger mode. Forbids the updates of files that are newer than the master copy.
This option works only with the first syntax:
-f file Specifies which distfile to use. If a hyphen - is used then STDIN is the input.
This option works only with the second syntax:
-c names... Specifies the distfile that is used.
user@host [:destination] Forces oldrdist to interpret these arguments as an additional distfile.
user Specifies the login ID.
host Specifies the host to use.
destination Specifies the file destination.

File Name: oldrdist

Directory: /usr/bin/

Type: External

olf2elf

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Converts from OLF to ELF object module format.

Syntax—olf2elf [-v] files...

-v Verbose mode. Shows more information.


files... Specifies the files to convert.

File Name: olf2elf

Directory: /usr/bin/

Type: External

openssl

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Performs various cryptographic functions from the shell and can create certificates.

Syntax—openssl command [command options...] {command arguments...}, openssl [list-command], openssl no-command

This is the same command as the one found in Linux. Please see openssl in the Linux chapter for all the

Page 113 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

options.

File Name: openssl

Directory: /usr/sbin/

Type: External

openssl list-standard-commands Shows the complete list of standard commands that are available.

otp-md4

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates one-time passwords to authenticate access to a computer system with the MD4 hash algorithm.

Syntax—otp-md4 [options...] NR key

-x Shows the string in hexadecimal instead of ASCII.


-4,-5 Selects MD4 or MD5, respectively, as the response generation algorithm.
-n value Specifies how many one-time passwords to show.
-p password Specifies the password to use. if not specified, the command will ask for it.
NR Specifies a sequence number to use.
key Specifies the key to use.

File Name: otp-md4

Directory: /usr/bin/

Type: External

otp-md4954shagul1 Generates a password string.

otp-md5

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates one-time passwords to authenticate access to a computer system with the MD5 hash algorithm.

Syntax—otp-md5 [options...] NR key

-x Shows the string in hexadecimal instead of ASCII.


-n value Specifies how many one-time passwords to show.
-p password Specifies the password to use. If not specified, the command will ask for it.
NR Specifies a sequence number to use.
key Specifies the key to use.

File Name: otp-md5

Directory: /usr/bin/

Type: External

otp-md5 873 ksjdur Generates a password string.

otp-rmd160

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates one-time passwords to authenticate access to a computer system with the rmd160 hash algorithm.

Page 114 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Syntax—otp-rmd160 [options...] NR key

-x Shows the string in hexadecimal instead of ASCII.


-n value Specifies how many one-time passwords to show.
-p password Specifies the password to use. If not specified, the command will ask for it.
NR Specifies a sequence number to use.
key Specifies the key to use.

File Name: otp-rmd160

Directory: /usr/bin/

Type: External

otp-rmd160 99shagul1 Generates a password string.

otp-sha1

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates one-time passwords to authenticate access to a computer system with the sha1 hash algorithm.

Syntax—otp-sha1 [options...] NR key

-x Shows the string in hexadecimal instead of ASCII.


-n value Specifies how many one-time passwords to show.
-p password Specifies the password to use. If not specified, the command will ask for it.
NR Specifies a sequence number to use.
key Specifies the key to use.

File Name: otp-sha1

Directory: /usr/bin/

Type: External

otp-sha1 99shagul1 Generates a password string.

pac

UNIX Shell—All primary shells (csh, ksh, sh)

Function Shows you general statistics about a printer or a plotter.

Syntax—pac [options...] {users...}

-P printer Shows the account file for the specified printer.


-c Makes the output be sorted by cost, instead of sorting alphabetically.
-m Ignores the hostname in the accounting file.
-pprice Specifies the cost in dollars (default is 0.02 or what’s in /etc/printcap).
-r Reverses the sorting order.
-s Summarizes the accounting information in the summary file.
users... Specifies the users to show statistics for.

File Name: pac

Directory: /usr/sbin/

Page 115 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Type: External

pac -Pprinter1 -c Shows statistics about printer1 sorted by cost.

pagesize

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows the page size of memory.

Syntax—pagesize

File Name: pagesize

Directory: /usr/bin/

Type: External

pax

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Administers archives. Lists member; extracts archives and archive files.

Syntax—pax -r [options...] {patterns...}, pax-w [options...] {files...}, pax -r -w [options...] {files...} directory, pax [options...]
{patterns...}

Select one of these modes of operation:


-r Extracts members of the pax archive read from STDIN using pattern matching.
-w Writes the file content to STDOUT or to a file in the specified archive format.
-rw Copies the file content to the destination or from STDIN.
The following options are supported in all modes:
-d Doesn’t use subdirectories when archiving files or extracting archive members.
-v Verbose mode. When in list mode, shows table of contents; otherwise, pathnames.
-s oldnew Alters archive or file member names listed by pattern or filenames. (oldnew follows the following
old format: /old/new/ [gp] where:.)
new Specifies the regular expression or a string containing new line characters.
g Contains ampersand and/or a back reference \n, where n = subpattern number.
p Applies the replacement globally.
-U user Causes successful replacements to be written to STDERR.
-G group Selects a file based on its username or user ID if it starts with “#.” 
-T{fromdate} [,todate] [/] [c] [m] Selects a file based on its group name or group ID if it starts with “#.” 
fromdate Selects files changed between the specified time range.
todate Specifies the start date.
c Specifies the end date.
m Uses the inode change time for comparison. Can only be used in write or copy mode.
Uses the modification change time for comparison. Can only be used in w or c mode.

Page 116 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-c The following options are only available in a mode if the first letter appears:
-n L = list, R = read, W = write, C = copy:
-z (LR) Doesn’t use archive or file members that match patterns or filenames.
(LRC) Uses the first archive member for every specified pattern.
-f file
(LRW) Compresses or decompresses the file. Cannot be used with -a option.
-i
(LRW) Specifies the file of the input or output archive, instead of STDIN or STDOUT.
-k
(RWC) Prompts when renaming archive members or files matching the specified pattern.
-u
(RC) Doesn’t overwrite files that already exist.
-D
(RWC) Skips files that are older than preexisting files or archive members.
-Y
(RC) Is like -u, but will check the inode change time, instead of modification time.
-Z
(RC) Is like -D, but will check the pathname created after file modifications are done.
-o options
(RC) Is like -u, but will check the pathname created after file modifications are done.
options (RW) Specifies how to modify the algorithm for extracting or writing archive files.
-p priv Modifies the algorithm with the format name = value.
a (RC) Specifies the privileges that the extracted file will keep.
m Doesn’t save file access times.
o Doesn’t keep the file modification times.
p Keeps the user and group IDs.
e Keeps the file mode bits.
-E limit Keeps the user and group IDs, file mode bits, and the access and modification times.
-t (R) Specifies how many read faults to accept before stopping the operation.
-H (WC) Resets the archived files’ access times to what they had before being read.
-L (WC) Follows command-line symbolic links while doing a physical FS traversal.
-P (WC) Follows all symbolic links to perform a logical file system traversal.
-X (WC) Doesn’t follow symbolic links.
-b blocksize (WC) Doesn’t include subdirectories if they don’t match parent device ID.
-a Specifies the number of bytes per write to the archive file. Must be a multiple of 512.
-x (W) Appends the specified files to the end of the archive. (Can only be used with the -f option.)
cpio (W) Specifies the archive format to use. Can be one of the following:
bcpio Specifies the extended cpio interchange format.
sv4cpio Specifies the old binary cpio format.
sv4crc Specifies the system V release 4 cpio.
tar Specifies the system V release 4 cpio with file crc checksums.
ustar Specifies the old BSD tar format.
-B bytes Specifies the extended tar interchange format.
-l (W) Limits the number of bytes that can be written to a single archive volume. (Can have a suffix for multiple. m=1,04
patterns... (C) Makes hard links between src and dst file hierarchies whenever possible.
Specifies files of archive members.

File Name: pax

Directory: /bin/

Type: External

pctr

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows the current values of TSC and can access the pctr pseudo device on i386-compatible computers.

Syntax—pctr [-l value]

-l 5 or 6 Lists vendor-specific counters (5 or 6 specify which family to show).

File Name: pctr

Directory: /usr/bin/

Type: External

perlbug

UNIX Shell—All primary shells (csh, ksh, sh)

Page 117 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Function—Is used to create bug reports for perl.

Styntax—perlbug [options...] {ACTION}

-a address Specifies the address to send the bug report to. Default is [email protected].
-s subject Specifies a subject for the bug report.
-b body Specifies a body for the bug report.
-f infile Specifies a file with the body report already written.
-F outfile Specifies an output file instead of sending the bug report by e-mail.
-r returnaddress Specifies the return address.
-e editor Specifies the editor that is used.
-c adminaddress Specifies an address where to send a copy of the bug report.
-C Sends any copies of the bug report to the administrator.
Sends the bug report without waiting for confirmation.
-S
-t Runs the command in test mode.
-d Shows your configuration data.
-h Shows help information.
-v Verbose mode. Shows more information.
The following actions can’t be combined:
ACTION
-ok Reports successful builds on the system.
-okay Reports successful builds on older systems.
-nok Reports unsuccessful builds on the system.
-nokay Reports unsuccessful builds for older systems.

File Name: perlbug

Directory: /usr/bin/

Type: External

perlbug -ok Reports on any successful binds on the system.


perlbug -t Runs perlbug in test mode.
perlbug -d Shows configuration data.

perldoc

UNIX Shell—Perl script

Function—Is used to find and show Perl documentation from inside installation’s trees or scripts.

Syntax—perldoc [options...] item

-h Shows help information.


-v Shows verbose information.
-t Shows documents in plain text instead of nroff.
-u Finds the documents, but doesn’t show them.
-m Shows the whole module.
-l Shows the filename of the module.
-F Takes all arguments as filenames, not directories.
-X Uses an index, if available.
-f function Uses a perl function to pick out function-specific information.
-q expr Specifies a regular expression to search the perlfaq for matching entries.
The following items can be searched for:
page Specifies a page to search for.
module Specifies a module to search for.
program Specifies a program to search for.

File Name: perldoc

Directory: /usr/bin/

Page 118 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Type: Script

pfbtops

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Converts a PostScript font in .pfb format into ASCII format.

Syntax—pfbtops {pfbfile}

pfbfile Specifies the .pfb file to convert.

File Name: pfbtops

Directory: /usr/bin/

Type: External

photurisd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—It is a daemon used for IPSec key management.

Syntax—photurisd [options...]

-c Forces a primality check of the bootstrapped module.


-v Starts photurisd in VPN mode.
-i Ignores the photuris.startup file.
-d directory Specifies the directory where the startup file is.
-p port Specifies the local port to use.

File Name: photurisd

Directory: /sbin/

Type: External

pkg_add

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Installs software package distributions.

Syntax—pkg_add [options...] pkgnames...

-v Verbose mode. Shows more information.


-l Doesn’t run any installation script that exists.
-n Doesn’t install the package, only shows the steps.
-f Is used to force an installation even if some requirements are not met.
-R Doesn’t record any information about the packet. Packet cannot be uninstalled.
-M Runs pkg_add in MASTER mode.
-S Runs pkg_add in SLAVE mode.
-t template Specifies a template to be used by mktemp.
-p directory Specifies the directory to look in for the package.
pkgnames... Specifies the package to install - . (dot) searches in current directory.

File Name: pkg_add

Directory: /user/sbin/

Type: External

Page 119 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

pkg_add. Search for package from the current directory.


pkg_add -v newpackage Add newpackage in verbose mode.

pkg_create

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Utility for creating software package distributions.

Syntax—pkg_create [options...] pkgname

-f packlist Uses pack list as the packing list for the package.
-c file Specifies a file that contains a one-line description for the package.
-c -description Specifies a description of the package.
-d file Specifies a file that contains a long description for the package.
-d -description Specifies a long description of the package.
-Y Uses yes as the answer for all questions.
-N Uses no as the answer for all questions.
-O Uses packing list only mode.
-v Verbose mode. Shows more information.
-h Makes tar follow symbolic links.
-i script Specifies an installation script.
-P pkgs... Specifies a list of dependency packages.
-C pkgs... Specifies a list of conflicts packages.
Specifies the directory to start to build the package from.
-p directory
Specifies a deinstallation script.
-k script
Specifies a script to check for requirements.
-r script Specifies the template for mktemp (default is /tmp/instmp.XXXXXX).
-t template
Specifies a list of files to exclude in the package.
-X excludefile Specifies a file to be shown with more after the installation.
-D file Runs mtree with mtreefile before the package is installed.
-m mtreefile Specifies the name of the package to create.
pkgname

File Name: pkg_create

Directory: /usr/sbin/

Type: External

pkg_delete

UNIX Shell—All primary shells (csh, ksh, sh)

Function—It is used to remove previously installed software packages from the system.

Syntax—pkg_delete [options...] pkgnames...

-v Verbose mode. Shows more information.


-D Doesn’t run any deinstallation scripts.
-n Doesn’t deinstall the package, only shows the steps.
-p directory Specifies a directory where to start deleting files. Normally, this isn’t used.
-d Removes empty directories.
-f Forces a removal of the package.
pkgnames... Specifies the name of the package to be removed.

File Name: pkg_delete

Directory: /usr/sbin/

Type: External

Page 120 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

pkg_delete softpack Delete the package softpack.

pkg_info

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to show information about software packages, both installed and not installed.

Syntax—pkg_info [options...] pkgnames..

-a Shows information for all packages.


-c Shows the one-line comment.
-D Shows the install message file (if any).
-d Show the long description.
-e pkgname Tests if the package is installed. If so, returns 0.
-f Shows the packing list instructions.
-l Shows the index entry.
-i Shows the install script (if any).
-k Shows the de-install script (if any).
-L Shows the files in the package with a full path.
-l prefix Sets a prefix for the information category header shown.
-m Shows the mtree file (if any).
-p Shows the installation prefix.
-q Doesn’t show any report headers. Shows only the raw information.
-R Shows the required packages for the package.
-r Shows the requirements script (if any).
-v Verbose mode. Shows more information.
-h Shows help information.
pkgnames... Specifies package to show information about. Can be a file or an installed package.

File Name: pkg_info

Directory: /usr/sbin/

Type: External

pkg_info -a Shows information about all installed packages.

pl2pm

UNIX Shell—Perl script

Function—Is used to convert perl4 .pl files to perlS .pm modules.

Syntax—pl2pm files...

files... Specifies the files to convert.

File Name: p12pm

Directory: /usr/bin/

Type: Script

pl2pm module.pl Converts the file to module. pm.

pom

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows the current moon phase.

Page 121 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Syntax—pom datetime

datetime Specifies the date and time using the following format: ccyymmddHH.

File Name: pom

Directory: usr/games/pom

Type: External

portmap

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Converts RPC program numbers into DARPA protocol port numbers.

Syntax—portmap [-d]

-d Debug mode. Shows debug information on STDERR.

File Name: portmap

Directory: /usr/sbin/

Type: External

portmap -d Runs a debug and shows the result without starting the daemon.

ppp

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates user PPP links over the tunnel device.

Syntax—ppp [options...] {systems...}

-alias Enables packet aliasing features.


-auto Configures the interface automatically.
-background Attempts to establish a connection with the peer immediately.
-direct Receives incoming connections.
-dedicated Keeps the device open and never uses any configure chat scripts.
-ddial Brings the link back up any time it’s dropped for any reason.
-interactive Starts the interactive mode.
systems... Specifies one or more systems defined in /etc/ppp/ppp.conf.

File Name: ppp

Directory: /usr/sbin/

Type: External

pppctl

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to control the PPP daemon.

Syntax—pppctl [options...] socket {commands...}

-v Verbose mode. Shows more information.


-t sec Specifies the timeout in seconds (default is 2 seconds).
-p passwd Specifies the password used. If not given, pppctl will ask for one.

Page 122 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

socket Specifies the socket to connect to. It can be one of the following syntaxes:
{host:}port Specifies a local port to use, or a port on host.
localsocket Specifies a localsocket to use.
commands... Specifies commands to send to the PPP daemon.

File Name: pppct1

Directory: /usr/sbin/

Type: External

pppd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Starts the Point-to-Point Protocol daemon

Syntax—pppd {tty} {speed} [options...]

active-filter expression Specifies a packet filter to be applied to data packets to detect link activity.
asyncmap map Specifies an async character map.
auth Specifies the peer must authenticate itself.
bsdcomp number, total Specifies the compression level for the peer to send using BSD compression.
call script Specifies a file in /etc/ppp/peers/name to read options from.
chap-interval number Specifies rechallenge of the peer every number of seconds.
chap-max-challenge number Specifies maximum number of CHAP challenge transmission to number (default is 10).
chap-restart number Specifies the CHAP retransmission timeout for challenges to number seconds.
Specifies a script to set up the serial line.
connect script
crtscts Specifies that hardware flow control should be used on the serial port.
Specifies that connection debugging should be done.
debug
Specifies that asyncmap negotiation should be disabled.
default-asyncmap
default-mru Specifies that MRU negotiation should be disabled.
Specifies that a default route should be added to the system routing tables.
defaultroute
Specifies the compression level for the peer to send using a deflate scheme.
deflate number:total
Specifies the link only should be initiated when data traffic is present.
demand
Specifies a script to run when the link is terminated.
disconnect script
Specifies that domain should be added to the local hostname for authentication.
domain domain
Specifies that certain characters should be escaped on transmission.
escape characters Specifies a file to read option from.
file file Specifies the number of seconds before reinitiating the link after it terminates.
holdoff number Specifies the link should be closed if the link is idle for number of seconds.
idle number Specifies the peer’s idea of our local IP address is accepted.
ipcp-accept-local Specifies the peer’s idea of our remote IP address is accepted.
ipcp-accept-remote Specifies maximum number of IPCP configure requests to be sent (default is 10).
ipcp-max-configure number Specifies the maximum number of IPCP NAKs returned before sending rejects.
ipcp-max-failure number Specifies maximum number of IPCP terminate requests (default is 3).
ipcp-max-terminate number Specifies IPCP restart interval to number seconds (default is 3).
ipcp-restart number Specifies an extra parameter to the ip-up and ip-down scripts.
ipparam string Specifies the IPXCP and IPX protocols should be enabled.
ipx Specifies the IPX network number in the IPXCP configure request frame.
ipx-network number Specifies the IPX local node number and the peer’s node number.

Page 123 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

ipx-node number.number Specifies the name of the IPX router.


ipx-router-name {string} Specifies the routing protocol to be received by this option.
ipx-routing number Specifies that peer’s NAK should be accepted for the node number.
ipxcp-accept-local Specifies that peer’s NAK should be accepted for the network number.
ipxcp-accept-network Specifies the peer’s network number specified in the configure request frame.
ipxcp-accept-remote Specifies the maximum number of IPXCP configure request frames.
ipxcp-max-configure number Specifies the maximum number of IPXCP NAK frames.
ipxcp-max-failure number Specifies the maximum number of IPXCP terminate request frames.
Specifies the number for debugging the PPP driver in the kernel.
ipxcp-max-terminate number
Specifies the number of LCP echo-request frames before assuming the peer is dead.
kdebug number
Specifies that LCP echo-request should be sent every number of seconds.
Icp-echo-failure number
Specifies the maximum number of LCP configure-request transmissions (default is 10).
Icp-echo-interval number
Specifies the maximum number of LCP NAKs returned before sending rejects.
Icp-max-configure number Specifies the maximum number of LCP terminate-request transmissions (default is 3).
Icp-max-failure number Specifies the LCP retransmission timeout to number seconds (default is 3).
Icp-max-terminate number Specifies the modem control lines should not be used.
Icp-restart number Specifies that a UUCP-style lock file for the serial device should be created.
local Specifies the system password database should be used for authenticating.
lock Specifies the number of seconds to wait before terminating the connection.
login Specifies the modem control lines should be used (is the default).
maxconnect number Enables usage of the modem control lines when running chat scripts. For cua devices.
modem Specifies the MRU number.
modem_chat Specifies a DNS address for a Microsoft Windows client. Can be used twice.
mru number Specifies a WINS address for a Microsoft Windows client. Can be used twice.
ms-dns address Specifies the MTU number.
ms-wins address Specifies the name of the local system for authentication purposes.
mtu number Specifies a netmask to the interface.
name name Specifies that address/control compression should be disabled.

Page 124 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

netmask address Specifies the peer doesn’t need to authenticate itself. This option is privileged.
noaccomp Specifies that BSD compression should be disabled.
noauth Specifies that compression control protocol should be disabled.
nobsdcomp Specifies that hardware flow control should be disabled.
noccp Specifies the defaultroute option should be disabled.
nocrtscts Specifies that deflate scheme should be disabled.
nodefaultroute Specifies that detaching from the controlling terminal should be disabled.
nodeflate Specifies that IPCP negotiation and IP communication should be disabled.
nodetach Specifies the default behavior when no local IP address is specified.
noip Specifies the IPXCP and IPX protocol should be disabled.
noipdefault Disables detections of looped back lines by disabling magic number negotiations.
noipx Specifies the field compression negotiation protocol should be disabled.
nomagic Specifies that once a connection has been made, it should be terminated.
nopcomp Specifies that Predictor-1 compression should be disabled.
nopersist Specifies that proxyarp option should be disabled.
nopredictor1 Specifies that Van Jacobson-style TCP/IP header compression should be disabled.
noproxyarp Specifies that Van Jacobson connection-ID compression should be disabled.
novj Indicates that all secrets in the /etc/ppp/pap-secrets file are be encrypted.
novjccomp Specifies maximum number of PAP authenticate-request transmissions (default is 10).
papcrypt Specifies the PAP retransmission timeout to number of seconds (default is 3).
pap-max-authreq number Specifies the maximum time to wait for the peer to authenticate itself with PAP.
pap- restart number Specifies that it should be passive until it gets a valid LCP packet, and not to exit.
pap-timeout number Specifies a packet filter to apply to data packets being sent or received.
passive Specifies that a terminated connection should be reopened.
pass-filter expression Specifies that Predictor-1 compression should be used.
persist Specifies that an entry to this system’s ARP should be added.
predictor1 Specifies the remote system name for authentication purposes.
proxyarp Specifies that CHAP authentication is disabled.
remotename name Specifies that PAP authentication is disabled.
Specifies that CHAP authentication is required.
refuse-chap
Specifies that PAP authentication is required.
refuse-pap
Specifies that LCP packets should not be sent to initiate a connection.
require-chap
Specifies enforcing of the hostname.
require-pap
silent Specifies the name used for authenticating the local system to the peer.
Specifies the number of slots to be used by the Van Jacobson TCP/IP header compression.
usehostname
Specifies a script to execute before initiating PPP negotiation.
username
Specifies that software flow control should be used.
vj-max-slots number
Specifies the local and/or remote interface IP addresses.
welcome script
Specifies the device to communicate over.
xonxoff
Specifies the baud rate to use.
local:remote
tty
speed

File Name: pppd

Directory: /usr/sbin/

Type: External

pppstats

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows PPP-related statistics for a PPP interface. The statistics are shown since the last report.

Syntax—pppstats [options...] {interface}

-a Shows absolute values instead of deltas. Shown since the link was initiated.
-c count Specifies the number of times the statistics will be shown.
-d Shows values in terms of data rate (KB/s) rather than in bytes.
-r Shows statistics about compression ratio of the packet compression algorithm in use.
-v Shows statistics related to the Van Jacobson TCP header compression algorithm.
-w time Specifies the time between updates of the screen.
-z Show statistics indicating the performance of the packet compression algorithm in use.

Page 125 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

interface Specifies the interface to use (default is ppp0).

File Name: pppstats

Directory: /usr/sbin/

Type: External

praliases

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows system mail aliases.

Syntax—praliases [-f file]

-f file Reads specified alias file instead of the default sendmail system alias file.

File Name: praliases

Directory: /usr/sbin/

Type: External

primes

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows primes, one per line, in ascending order.

Syntax—primes {start} {stop}

start The value must be at least 0 and can’t be greater than stop.
stop The value cannot be greater than 4,294,967,295.

File Name: primes

Directory: usr/games/primes

Type: External

print

UNIX Shell—Kornshell (ksh)

Function—Is used to show any arguments on the STDOUT.

Syntax—print [option] {arguments...}

- Is used to show the arguments as describe by echo.


-n Doesn’t add new line to the output.
-R Ignores any escape characters in the arguments (raw mode).
-e Processes\sequences when using the -R option.
-n Same as option -e, but will also suppress trailing new lines.
-r Ignores any escape characters in the arguments (raw mode).
-p Writes the output to a shell spawned with | &.
-s Writes the argument to the history file.
-un A one-digit file descriptor to use as output.
arguments... Specifies the valid arguments that are used with the command.

Page 126 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

print UCG-book Shows UCG-book on the screen


print -n Prompt: Shows Prompt: with no new line.

psbb

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows the bounding box information from PostScript documents.

Syntax—psbb file

file Specifies the PostScript document to use.

File Name: psbb

Directory: /usr/bin/

Type: External

psbb ucgpsfile Shows the bounding box from ucgpsfile.

pstat

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows open file entries, swap space utilization, terminal state, and vnode data structure information.

Syntax—pstat [options...]

-T Shows the number of used and free slots for open files, used vnodes, and swap space.
-f Shows the open file table with various headings.
-k Specifies that 1KB blocks should be used.
-n Shows devices by major and minor number rather than by name.
-s Shows information about swap space usage on areas compiled into the kernel.
-t Shows table for terminals with various headings.
-v Shows the active vnodes.
-M core Specifies a core to search in.
-N system Specifies a namelist to search in (default is /bsd).

File Names: pstat

Directory: /usr/sbin/

Type: External

pstat -f Shows the open file table.

pts

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Administers AFS users and groups.

Syntax—pts [options...]

adduser Adds a user to a group.


chown Changes owner of user or group.
creategroup Creates a group.
createuser Creates a user.
dump Dumps databases.
delete Deletes entries.
examine Shows information about a user or group.

Page 127 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

help Shows help information.


listmax Shows largest UID and GID.
listowned Shows groups owned by a user or group, or orphaned groups.
membership Shows group or user membership.
removeuser Removes user from group.
rename Renames user or group.
syncdb Syncs ptsdb with /etc/passwd.

File Name: pts

Directory: /usr/sbin/

Type: External

pwd_mkdb

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates a secured or unsecured database for the specified file and installs it into /etc/master.passwd.

Syntax—pwd_mkdb [options...] file

-c Checks whether the password file is in the right format.


-p Creates a version 7-style password and installs it into /etc/passwd.
-d directory Operates in the specified directory rather than the default /etc.
file Specifies the absolute path to a file using the master.passwd format.

File Name: pwd_mkdb

Directory: /usr/sbin/

Type: External

pwd_mkdb -p Creates a password and places it into /etc/passwd.

quiz

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Runs a quiz that tests knowledge in the specified subject. Shows a list of subjects if run without arguments.

Syntax—quiz [options...] {question} {answer}

-t Runs quiz in tutorial mode.


-f file Specifies an index file other than the default (default is /usr/share/games/quiz.db).
question Specifies the subject on which quiz will ask questions. Requires answer.
answer Specifies the type of answer for the question. Requires question.

File Name: quiz

Directory: /usr/games/

Type: External

quiz Asian capital Tests your knowledge on Asian capitals by naming an Asian country, and expects a city name as answer. quot

quot

Page 128 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows the number of blocks in the file system that each user currently owns and summarizes the information.

Syntax—quot [options...] filesystem

-a Creates a report for file systems that are currently mounted.


-c Shows block information about file sizes and summarizes the information in three columns.
-f Shows the number and space of files owned by each user (Do not use with -v, -c).
-h Is used to estimate the number of blocks in the file.
-k Causes the numbers to be reported in kilobytes instead of BLOCKSIZE environment variable value.
-n Connects names to the file list read from STDIN (must be used alone).
-v Shows information about blocks not accessed for the last 30, 60, and 90 days.
filesystem The mount point of the file system you want to check.

File Name: quot

Directory: /usr/sbin/

Type: External

quot -a Creates a report of all currently mounted file systems.


quot -a -f -k Shows disk space and number of files occupied by each user.
quot -a -k -v Same as above, but adds files not accessed within 30, 60, and 90 days.

raidctl

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Configures RAID frame disk drivers.

Syntax—raidctl [options...]

-a component device Makes the specified component to a spare for the specified device.
-B device Starts a copyback of reconstructed data to the original disk from a spare disk.
-c file device Uses the specified config file to configure the specified RAID device.
-C file device Works as -c, but forces the configuration, disregarding any error messages.
-f component device Marks the component specified as failed.
-F component device Works as -f, but also begins a reconstruction onto a hot spare.
-g component device Shows the label of the specified component.
Rewrites the parity on the specified device.
-i device
Sets the component labels on each component of the device.
-l serialnumber device
Checks the status of the parity on the RAID set.
-p device
Same as -p, but rewrites the parity if the parity isn’t up-to-date.
-P device Removes the specified spare disk from the set of spare components.
-r component device Marks the specified component as failed and begins a reconstruction.
-R component device Shows the status of the RAID frame device for each component and spares.
-s device Checks component reconstruction status.
-S device Unconfigures the specified RAID frame device.
-u device Verbose mode. Shows more information.
-v

File Name: raidctl

Directory: /sbin/

Type: External

random

Page 129 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Copies lines it reads from the STDINT to the STDOUT with a probability of 1/value.

Syntax—random [options...] {value}

-e Causes random to return a randomized exit code between 0 and value -1.
-r Causes all random output to be unbuffered.
value Specifies a value (default is 2).

File Name: random

Directory: /usr/games/

Type: External

random -e 7 Randomizes a value between 0 and 6, shows it on standard output and exits.

rarpd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Provides MAC-address-to-IP-address resolution to workstations at startup.

Syntax—rarpd [options...] {interface}

-a Listens to all interfaces on the system. If not given, interface must be specified.
-d Shows debug information on STDERR.
-f Runs rarpd in the foreground.
-l Logs all requests to syslog.
interface Specifies the interface to listen on.

File Name: rarpd

Directory: /usr/sbin/

Type: External

rarpd -a Starts rarpd on every interface.

rbootd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A server for Hewlett-Packard workstations on a local network.

Syntax—rbootd [options...] {file}

-a Ignores the configuration file and responds to boot requests from any system.
-d Starts the debug mode and shows packet information.
-i interface Specifies the interface to use for boot requests.
file Specifies a configuration file to use if not the default.

File Name: rbootd

Directory: /usr/sbin/

Type: External

rc

Page 130 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

UNIX Shell—Bourne shell (sh)

Function—Runs system housekeeping and starts up system daemons.

Syntax—rc

rc runs through the following sequences:


fsck -p Auto-checks and repairs disks.
rc.conf Asks for config. variables, mounts file systems, and sets what daemons and services to run.
[netstart] If system daemons runs, netstart defines the server name, alters network interfaces.
[rc.securelevel] Starts daemons that must run before it alters level to values specified by rc.conf.
rc.local Holds commands and daemons not being part of the stock installation.

File Name: rc

Directory: /etc/rc

Type: Script

rcs

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates and/or changes the attributes of RCS files

Syntax—rcs [options...] files...

This is the same command as the one found in Linux. Please see rcs in the Linux chapter for all the options.

File Name: rcs

Directory: /usr/bin/

Type: External

rcsclean

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Erases files based upon revision differences.

Syntax—rcsclean [options...] {files...}

-n{revision} Shows what the program, at the set revision level, would have done.
-q{revision} Activates quiet mode. Shows less information for the set revision level.
-r{revision} Specifies the revision to use for comparison.
-T Saves the modification time of the RCS file even if the file changes. Use carefully.
-u{revision} Unlocks the specified revision if there is no revision difference found.
-V Shows version information.
-kkey word Specifies the keyword to use when the comparison for revision is captured.
-V{version} Emulates the specified RCS version.
-xsuffix Characterizes the files with the specified suffixes.
-ztimezone Specifies the date output format to use for the keyword option.
Specifies the files to use.
files...

File Name: rcsclean

Directory: /usr/bin/

Type: External

rcsdiff

Page 131 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Compares different versions of RCS files using the diff command

Syntax—rcsdiff [options...] files...

-q Suppresses any diagnostic output. Quiet mode.


-r{revision} Selects the revision. Select two revisions by separating the -r’s with a space.
-k key word Affects the keyword substitution that is specified when extracting revisions.
-T Saves the modification time of the RCS file even if the file changes. Use carefully.
-V{num} Imitates that the RCS version is the specified value. Values 3, 4, or 5 are valid.
-xsuffix Specifies the suffixes to explain RCS files.
-ztimezone Specifies the date output format to use for the keyword option, (rcsdiff also supports all of the diff command options.)
-v Shows version information.
files... Specifies the RCS files that are compared. Separate these by a space.

File Name: rcsdiff

Directory: /usr/bin/

Type: External

rcsfreeze

UNIX Shell—Bourne shell (sh)

Function—Assigns a unique revision number (freeze) to all RCS files that are checked in.

Syntax—rcsfreeze name

name Specifies a symbolic name of the configuration.

File Name: rcsfreeze

Directory: /usr/bin/

Type: Script

rcsmerge

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Merges two RCS files by first comparing the differences between them, and then creates a new file.

Syntax—rcsmerge [options...] file

-A Merges changes from file1 to file2 and stores it in file3. Outputs diff3 type conflicts.
-E Shows conflicts in less verbose mode than -A (is default).
-e Same as -E, but disables warnings about conflicts totally.
-kkeyword Uses the specified keyword substitution when “compare and merge” takes place.
You must specify at least one, at the most two, of these rev options:
-p{revision} Sends results to STDIN instead of overwriting the working file of the set revision.
-q{revision} Runs quietly. Doesn’t show any diagnostics at all about the specified revision.
-r{revision} Merges with respect to the specified revision—if none, then the latest revision.
-T Is for compatibility with other RCS commands only. Doesn’t do a thing otherwise.
-V Shows version information.
-Vversion Emulates the specified RCS version.
-xsuffix Specifies the suffix to be used to explain RCS files.
-ztimezone Specifies the date output format to use for the keyword substitution.
Specifies the file to use.
file

Page 132 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: rcsmerge

Directory: /usr/bin/

Type: External

rcsmerge -p -r2.8 -r3.4 Compares and merges the different versions of ucg_rules.txt and overwrites the file with the new
ucg_rules.txt information.

rdate

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Gets the time from a specified remote system and sets or shows it on the local system.

Syntax—rdate [options...] hostname

-p Show the time from the other system.


-s Sets the time on the local system.
-a Changes the time on the local system gradually to the remote system time.
hostname Specifies the name or IP address of the remote system.

File Name: rdate

Directory: /usr/sbin/

Type: External

rdate -p pluto Shows the time on pluto.


rdate -s pluto Sets the time to that of pluto, without any output.
rdate -a pluto Changes your local time gradually to that of pluto.

rdconfig

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Configures RAM disk devices.

Syntax—rdconfig file block

file Specifies a range of user virtual memory.


block Specifies the size of user space memory.

File Name: rdconfig

Directory: /usr/sbin/

Type: External

Tip Should be run in the background.

rdistd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used by the rdist command as a remote file distribution server program.

Syntax—rdistd [options...]

-S Specifies that the rdistd isn’t accidentally started. Must be used.

Page 133 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-V Shows version information. With this option, you don’t need the -S option.
-D Shows debug information. Messages are logged in syslog.

File Name: rdistd

Directory: /usr/bin/

Type: External

readlink

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows the destination name of a symbolic link.

Syntax—readlink [options...] file

-f Shows the full path to the target recursively.


-n Does not show the trailing new line characters.
file Specifies the pathname to the symbolic link.

Name: readlink

Directory: /usr/bin/

Type: External

readlink ucg If ucg is a link, it returns the target. If not, nothing is returned.
readlink -f ucg Shows full path of target to ucg.

reconfig

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Converts the older Xconfig file format to the XF86config file format.

Syntax—reconfig < Xconfig > XF86config

Xconfig Specifies file to convert.


XF86config Specifies the name of the converted file.

File Name: reconfig

Directory: /usr/X11R6/bin/

Type: External

reset

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Links to the tset command that determines and configures terminals.

Syntax—reset [options...] {type}>

- Shows the terminal type on STDOUT.


-e char Specifies the erase character to use on all terminals (default is Backspace).
-i char Specifies the interrupt character to use on all terminals (default is Ctrl+C).
-k char Specifies the kill character to use on all terminals (default is Ctrl+U).
-l Suppresses transmission of terminal initialization strings.

Page 134 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-n Specifies the new tty driver modes should be initialized. For BSD 4.3 tty driver.
-Q Suppresses printing of the erase, interrupt, and line kill characters.
-q Shows the terminal type on STDOUT, but doesn’t initialize it.
-r Prints the terminal type on STDERR.
-S Shows the terminal type and the termcap entry on STDOUT.
-s Prints the sequence of csh commands that initialize the TERM environment variable.
-m port-id {baudrate} Maps the terminal on the specified port.
type Specifies a terminal type configure or to map with the -m option. (In addition to the regular tset function, the following is done):
Turns on cooked and echo modes.
Turns off cbreak and raw modes.
Turns on newline translation.
Restores all special characters.

File Name: reset

Directory: /usr/bin/

Type: External

restore, rrestore

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Restores files or file systems from backups made with dump.

Syntax—restore {ACTION} [options...] {files...}

ACTION Use one of the following five actions:


-i Sets interactive restoration of files from a dump—use one of the following commands:
add arg Adds the current directory or the specified argument to the extraction list.
cd arg Changes the working directory to the specified argument.
delete directory Deletes the current directory or the specified argument to the extraction list.
extract Extracts all files in the extraction list from the dump.
help Shows a list of the available commands.
ls{arg} Lists current or specified directory.
pwd Shows the pathname of the working directory.
quit Exits directly without dealing with the extraction list.
setmodes Sets the directory’s owner, modes, and times.
verbose Shows Is output with inode numbers and shows file information when restoring.
-R Requests a tape of a multivolume set to restart a full restore.
-r Rebuilds a file system.
-t Lists files if they occur on the backup.
-x Reads the named files from the given media.
These options are combinable:
-c Reads the dump in the old format.
-h Extracts the actual directory.
-m Extracts by inode numbers.
-v Verbose mode. Types the name and file type of each file it treats.
-y Skips over bad blocks and continues to restore in the event of an error.
-b blocksize Sets the number of kilobytes per dump record.
-f file Specifies a file to use as backup.
-s fileno Reads from the specified file number on a multifile tape.
files... Specifies the file or files that are to be restored.

File Name: restore, rrestore

Directory: /sbin/

Type: External

restore -f ucg.bak Reads the backup from ucg.bak.

Page 135 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

rev

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Reverses every line of a file or STDIN if no filename is given.

Syntax—rev {file}

file The file to reverse. If not specified, STDIN is reversed.

File Name: rev

Directory: /usr/bin/

Type: External

rev Reverses every line you type.


rev ucg1 > ucg2 Reverses ucg1 to ucg2.

rlog

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows information about RCS files and log messages.

Syntax—rlog [options...] files...

-L Doesn’t include the RCS files that have no lock set.


-R Shows only the filename.
-h Limits the output to paths, head, branch, access list, locks, symbolics, and suffix.
-v {string} Shows only working path and tip-revision. Optional string is prepended to the output line.
-t Same as -h, but also adds description text to output.
-N Doesn’t show symbolic names.
-b Shows revision information on the branch, with the highest branch on the trunk.
-d dates Shows information about revisions checking the date-time, dates—range of dates.
-T Has no effect—for compatibility only.
-V Shows RCS version number.
-l {iockers} Prints information about locked revisions only.
-r {revisions} Shows information about revisions in the comma-separated list of revisions.
-w {logins} Shows information about revisions checked in by users in a comma-separated list.
-Vn Simulates RCS version “n” when generating logs.
-sstates Shows information about revisions if the state matches one in the list of states.
-xsuffixes Specifies the suffix to characterize RCS files.
Sets the date output format.
-zzone
Shows information about revisions within specified dates.
-ddates
Specifies file(s) to acton.
files...

File Name: rlog

Directory: /usr/bin/

Type: External

rlog -L -R RCS/* Shows information for files in the RCS directory.

rmail

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Administer received mail from remote hosts through basic networking utilities (BNU).

Syntax—rmail users...

Page 136 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

users... Specifies users or IPaddresses.

File Name: rmail

Directory: /bin/

Type: External

Note This command is for use with uucp and sendmail only.

rmd160

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows a calculated checksum of the specified files.

Syntax—rmd160 [options...] {files...}

-p Appends the sum to STDOUT echoing from STDIN.


-t Runs a time trial.
-x Runs a test script.
-s string Shows a checksum of the given string.
files... Specifies the file to act on.

File Name: rmd160

Directory: /bin/

Type: External

rmgroup

UNIX Shell—Bourne shell (sh)

Function—Deletes a specified UNIX group from the system.

Syntax—rmgroup group

group Specifies the name of the group to erase.

File Name: rmgroup

Directory: /usr/sbin/

Type: Script

rmgroup ucg Deletes the group ucg from the system.

rmuser

UNIX Shell—Perl script

Function—A perl script that will erase the specified user from the system.

Syntax—rmuser {user}

user Specifies the name of the user to erase.

File Name: rmuser

Directory: /usr/sbin/

Page 137 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Type: Script

rmuser Prompts you for the user to remove.


rmuser ucg1 Removes ucg1 from the system.

rotatelogs

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Starts a new log file and saves the old. Only for Apache Web server.

Syntax—rotatelogs logfile rotationtime

logfile Specifies the log file that you want to rotate.


rotationtime Specifies the rotation time in seconds for the log file.

File Name: rotatelogs

Directory: /usr/sbin/

Type: External

rotatelogs accesslog 86400 Rotates the log named accesslog every 24 hours.

routed

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Manages and provides network routing tables for hosts on the network.

Syntax—routed [options...]

-s Provides routing information even if the host doesn’t act as a router.


-q Doesn’t provide routing information, even if the host acts as a router.
-d Runs in the foreground. Meant for interactive use.
-g Sets the default destination for the Internet router.
-h Specifies that hosts or point-to-point routes will not be advertised.
-m Specifies that hosts or point-to-point routes will be advertised.
-A Does not ignore RIPv2 authentication.
-t Logs more information to the trace file specified with -T or STDOUT.
-T file Increases the debug level and sends the information to the specified file.
-F net {mask} Minimizes transmission routes on interfaces specified.
{hops.} Makes a fake default route to the specified system with the specified number of hops.
-P parameters Adds the specified parameters to the /etc/gateways file.

File Name: routed

Directory: /sbin/

Type: External

rpc.bootparamd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Serves diskless clients with startup information at boot time.

Syntax—rpc.bootparamd [options...]

-d Shows debug information.


-s Sends debugging to syslog.

Page 138 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-r router Specifies the router to use.


-f file Specifies which file to read boot parameters from (default is /etc/bootparams).

File Name: rpc.bootparamd

Directory: /usr/sbin/

Type: External

rpc.bootparamd -r 192.168.1.1 Starts the daemon and uses the specified router.
rpc.bootparamd -d -s Shows debugging information to syslog.
rpc.bootparamd -f /boot/param/bootparam Uses the specified bootparam files.

rpc.lockd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Starts the NFS lock manager (NLM). Useful for kernels who do this automatically.

Syntax—rpc.lockd [-d level]

-d level Specifies level of debugging. The higher the level, the more debug information (default is 1).

File Name: rpc.lockd

Directory: /usr/libexec/

Type: External

rpc.lockd -d Shows one line of debug information per protocol operation.


rpc.lockd -d 4 Shows more debug information, such as operation arguments and internal operations.

rpc.pcnfsd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Provides authentication and printing requests to and from different PCs.

Syntax—rpc.pcnfsd

File Name: rpc.pcnfsd

Directory: /usr/sbin/

Type: External

Warning This program doesn’t provide any high security at all.

rpc.rquotad

UNIX Shell—All primary shells (csh, ksh, sh)

Function—An RPC server that manages users of a local file system mounted over the NFS by reporting quotas.

Syntax—rpc.rquotad

File Name: rpc.rquotad

Directory: /usr/libexec/

Type: External

Page 139 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

rpc.sprayd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—The server daemon for the spray command.

Syntax—rpc.sprayd

File Name: rpc.sprayd

Directory: /usr/libexec/

Type: External

rs

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Converts lines from STDIN to columns on STDOUT.

Syntax—rs [options...] {rows...} {columns...}

-ccharacter Uses the specified character (or ^|) as the delimiter of the input columns.
-scount Uses the specified number of strings as delimiter of the input.
-Ccharacter Uses the specified character (or ^|) as the delimiter of the output columns.
-Scount Uses the specified number of padded strings as delimiter of the output.
-t Uses the columns from the input to fill the rows in the output.
-T Shows the pure transpose of the input.
-kcount Specifies the number of rows to ignore from the beginning of the input.
-Kcount Works like -k, but shows the ignored lines from the input.
-gcount Specifies the gutter width.
Adds the specified percent of maximum column width to the gutter.
-Gcount
Handles each line of input as an array entry.
-e
-n Uses null entries to pad out lines if they are shorter than the first line.
-y Pads the output by recycling the input from the beginning instead of blanks.
-h Shows only the shape of the input array and does nothing else.
Works like -h, but also shows the line length.
-H
-j Adjusts columns to the right side.
Specifies the width of the screen.
-wcount
Does not erase excess delimiters from the ends of the output array.
-m
Adjusts the column width to the largest string.
-z
Specifies the number of rows.
rows...
Specifies the number of columns.
columns...

File Name: rs

Directory: /usr/bin/

Type: External

rstart

UNIX Shell—Bourne shell (sh)

Function—A simple example of the remote start client. This script relies upon rsh.

Syntax—rstart [options...] host command arguments...

-c context Specifies which environment to use. The default context is X-window.


-g Allows common commands to be started as generic commands.
-l user Starts the command as the specified user. This option is passed to rsh.
-v Verbose mode. Gives more information without disconnecting the program.

Page 140 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

host Specifies the hostname or IP address.


command Specifies the command that is used.
arguments... Specifies the valid arguments that are available for the command.

File Name: rstart

Directory: /usr/X11R6/bin/

Type: Script

rstartd

UNIX Shell—Bourne shell (sh)

Function—A script that helps the use of working with a remote shell.

Syntax—rstartd

File Name: rstartd

Directory: /usr/X11R6/bin/

Type: Script

rstartd & Runs the script in the background.

rtquery

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows information about the routing tables of the daemons routed or gated.

Syntax—rtquery [options...] hosts...

-n Shows only the numeric information, not symbolic.


-p Uses the poll command to get information from gated.
-l Uses RIP version 1 instead of RIP version 2 when information is gathered.
-w time Specifies the time for hosts to answer in seconds (default is 15).
-r address Shows information about the route to the specified address.
-t operation Changes the behavior of routed to one of the following operations:
on=tracefile Starts trace and logs information into the specified file, mostly /etc/routed, trace.
more Shows debug information.
off Turns off the trace.
dump Saves the routing table of routed to the current trace file.
hosts... Specifies host or hosts to gather information from.

File Name: rtquery

Directory: /sbin/

Type: External

rwall

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Send an message to all users on a network

Syntax—rwall host {file}

host Sends a message to the users logged into the specified host.
file Specifies the file to read from instead of STDIN.

Page 141 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: rwall

Directory: /usr/bin/

Type: External

rwall 192.168.1.1 hello Sends the message “hello” to all users logged on to 192.168.1.1

rxtelnet

UNIX Shell—Bourne shell (sh)

Function—Starts an xterm telnet window on a specified host and enables X connections.

Syntax—rxtelnet [options...] hostname port

-l username Specifies the name to use as login to the remote host.


-k Specifies not to use keep-alives.
-t arguments Sends the specified arguments to telnet.
-x arguments Sends the specified arguments to the xterm command.
-w emulator Specifies the emulator to use instead of xterm.
hostname Specifies the hostname or IP address of the system to start the window on.
port Specifies the port to use instead of the default.

File Name: rxtelnet

Directory: /usr/X11 R6/bin/

Type: Script

rxterm

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Starts an xterm window on a remote system.

Syntax—rxterm [options...] hostname port

-l username Specifies the name to use as login to the remote host.


-k Specifies not to use keep-alives.
-r arguments Sends the specified arguments to the rsh command.
-x arguments Sends the specified arguments to the xterm command.
-w emulator Specifies the emulator to use instead of xterm.
hostname Specifies the hostname or IP address of the system to start the window on.
port Specifies the port to use instead of the default.

File Name: rxterm

Directory: /usr/X11R6/bin/

Type: Script

s2p

UNIX Shell—Perl script

Function—Converts a sed script to a perl script. The converted script will be shown on STDOUT.

Page 142 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Syntax—s2p [options...] {file}

-D value Specifies the number of debug flags.


-n Specifies the sed script was always started with the -n option.
-P Specifies the sed script was never started with the -n option.
file The sed script file to convert.

File Name: s2p

Directory: /usr/bin/

Type: Script

Tip One of the perl-to-other tools. See also a2p, which converts perl scripts from awk scripts, and perlcc, which
compiles C-binaries from perl source code.

s2p sedscript Converts sedscript to a perl script and shows result on STDOUT.
s2p sedscript > perlscript Writes the created perl script to file perlscript.

sa

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Administers accounting files. Cleans up and shows information in the /var/account/acct file.

Syntax—sa [options...] files...

-a Shows all commands typed by the users.


-b Sorts commands by the sum of users and system time divided by the number of calls.
-c Shows percentage of the total overall command.
-d Sorts by the average number of disk I/O operations.
-D Sorts by the total number of disk I/O operations.
-f Forces the threshold comparison with the -v option to be in noninteractive mode.
-i Doesn’t read in summary files.
-j Gives seconds per call, instead of the total minutes per category.
-k Sorts average memory usage by the CPU time.
-K Shows and sorts by the CPU storage integral.
-l Separates system and user time.
-m Shows per-user statistics rather than per-command statistics.
-n Sorts by number of calls
-q Quiet mode. Only shows errors.
-r Reverses the sorting order.
-s Truncates the accounting files when done and merges their data into the summary files.
-t Shows the ratio of real time to the sum of user and system CPU times.
-u Supercedes all other flags.
-v value If a command is used fewer times than value, asks if it would go to *junk* category.
files... Specifies an alternate file to use.

File Name: sa

Directory: /usr/sbin/

Type: External

savecore

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Saves a crash dump of the operating system kernel (if one is created) after a system crash.

Syntax—savecore [-c], savecore [options...] directory

Page 143 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-c Clears the crash dump. Cannot be combined with other options.


-f Causes savecore to force a dump to be taken even if there isn’t enough disk space.
-v Verbose mode. Shows more information.
-z Compresses the kernel and core dump.
-N system Specifies the system to use as kernel instead of default (default is /bsd).
directory Saves the crash dump to the specified directory.

File Name: savecore

Directory: /sbin/

Type: External

savecore -f -v/dumps Forces a verbose dump into directory/dumps.

scan_ffs

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Finds any UFS/FFS partitions on the specified disk.

Syntax—scan_ffs [options...] device

-l Converts and shows a disklabel-friendly input string.


-s Doesn’t scan partitions for superblocks.
-v Verbose mode. Shows more information.
-b value Specifies which partition number to begin searching for file systems.
-e value Specifies which partition number to stop searching for file systems.
device Specifies the device to look for file systems.

File Name: scan_ffs

Directory: /sbin/

Type: External

scanpci

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows information about the PCI bus.

Syntax—scanpci [options...]

-v Shows config space.


-1 Specifies config type 1.
-2 Specifies config type 2.

File Name: scanpci

Directory: /usr/X11R6/bin/

Type: External

scon

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Configures the pcvt VT220 video driver.

Syntax—scon [options...]

Page 144 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-a Shows what video adapter is found.


-b number Specifies how many pages of scroll back buffer there should be.
-c screen Changes from the current screen to the specified.
-d device Changes will be made on the specified device.
-f on | off Turns full VT220 support on or off. On is 24 lines and off is 25 lines.
-h Shows help information.
-l Shows the settings that are changeable during runtime.
-m Shows what type of screen is found.
-v Verbose mode. Shows more information.
-V Makes the current screen a pure VT220 screen.
-H Makes the current screen a HP/VT220 screen.
-o Changes the old pcvt mode to a traditional PC mode.
-s number Specifies how many characters one line could contain—could be 25, 28, 35, 40, 43, or 50.
-p palette Specifies what VGA palette to use.
default Uses the default color palette.
list Shows the VGA DAC palettes that can be used.
entry,red,green,blue Specifies what palette to change and to what RGB color.
-t seconds Specifies how many seconds to wait before the screen saver is activated.
When altering screen column widths, select only one of these options:
-1 Uses 132 columns—used only by VGA adaptors.
-8 Uses 80 columns.

File Name: scon

Directory: /usr/sbin/

Type: External

scon -o Changes the old pcvt mode to a traditional PC mode.


scon -p black,0,0,0 -p white,255,255,255 Shows pure black-and-white text and text background.

scp

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Copies files in a secure way with all network traffic encrypted by SSH.

Syntax—scp [options] source destination

-p Preserves times and modes of copied files.


-B Selects batch mode.
-4 Forces to use IPv4 addresses only.
-6 Forces to use IPv6 addresses only.
-q Quiet mode. No progress meter.
-r Copies whole directories recursively.
-v Verbose mode. Shows more information.
-C Enables compression.
-P port Specifies the port to use for connecting.
-c cipher Specifies the cipher to use for encryption—for example 3des or blowfish.
-i identityfile Specifies where the private key is located (default is $HOME/.ssh/identity).
source Specifies one or more files to use as the source. (If more than one file is specified, destination must be a directory.)
destination Specifies a file or directory to use as the destination.

File Name: scp

Directory: /usr/bin/

Type: External

scp /etc/passwd ucg@pluto:/tmp Copies the local file /etc/passwd to the host pluto as user ucg into /tmp.

Page 145 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

scp /etc/passwd pluto: Copies the local file /etc/passwd as current user to the home directory on the host pluto.
scp ucg@pluto:/etc/passwd. Copies the remote file /etc/passwd from the host pluto as user ucg to current directory.

scsi

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Sends commands to or probes a specified SCSI device.

Syntax—scsi -f device [options...] [option], scsi -f device [-v] [-s seconds] -c format {arguments...} -o size format
{arguments...} -i size format

-f device Specifies the SCSI device that is opened.


Select only one of these six options. They can’t be combined:
-d level Sets the debug level of the SCSI kernel.
-z time Halts the activity on all SCSI busses for the specified time in seconds.
-v Sends a BEL character to STDOUT at the start and end of the bus freeze. (When using this -v option, it must be plac
-m page Reads a specified device mode page.
-P value Specifies the value of a page control field, which must be one of the following:
0 Uses the current values field.
1 Uses the changeable values field.
2 Uses the default values field.
3 Uses the saved values field.
-e Allows field edits.
When probing SCSI devices, select only one of these two options:
-p Inspects devices with the specified SCSI lun on the given SCSI bus.
-r Restarts an inspection at the specific SCSI device at a given bus, target, and lun.
-b bus Specifies the bus to use for probing.
-t target Specifies the target. This can only be used with the -r option.
-l lun Specifies the lun to use for probing.
Sends user-level SCSI commands and arguments specified on the command line to a device.
-c format {arguments...}
Verbose mode. Shows more information.
-v
Sets the command timeout to seconds.
-s seconds
Sends data from the system to the device in the given byte size and format arguments.
-o size format {arguments...}
Reads data from the system into the device with the specified byte size and format.
-i size format

File Name: scsi

Directory: /sbin/

Type: External

scsi -f/dev/rsd2c-m1 -e -P3 Conducts an inquiry to /dev/rsd2c.

sendbug

UNIX Shell—Bourne shell (sh)

Function—A script that sends problem reports to a central support site, using the vi editor.

Syntax—sendbug [options...]

-P Shows the form specified by the PR_FORM environment variable. Sends no mail.
-L Shows a list of available categories. Sends no mail.
-V Shows version information. Sends no mail.

File Name: sendbug

Directory: /usr/bin/

Type: Script

Page 146 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

sendbug -P Starts vi with the form specified in PR_FORM.

setxkbmap

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Sets the keyboard layout by means of the X keyboard extension.

Syntax—setxkbmap [options...]

-help Prints a message describing the valid input.


-compat name Specifies compatibility map for the keyboard layout construction.
-config file Specifies the file containing configuration info for the keyboard to use.
-display display Updates the display specified with the new keyboard layout.
-geometry name Specifies the geometry component for the keyboard layout construction.
-keymap name Specifies the key map for the keyboard layout construction.
-layout name Uses the layout specified to choose components for the keyboard description.
-variant name Specifies variant of the layout specified.
-option name Specifies an option for the layout specified. This option is repeatable.
Uses the model specified to choose components for the keyboard description.
-model name
Uses the rules file specified to interpret the components chosen in layout and model.
-rules file
Uses the symbols component specified for a keyboard layout construction.
-symbols name
Synchronizes X requests.
-synch Uses the type component specified for a keyboard layout construction.
-types name

File Name: setxkbmap

Directory: /usr/X11R6/bin/

Type: External

sh

UNIX Shell—Bourne shell (sh)

Function—The Bourne shell command interpreter.

Syntax—sh [options...] {file} {arguments...}

-c string Reads commands to execute from string.


-s Reads commands from STDIN. file will be ignored.
Replace the − to + to disable the following options:
-a Marks modified and created variables for export.
-b Shows job notifications asynchronously, rather than just before the prompt.
-C Prevents redirections from overwriting existing files.
-e Exits immediately with a nonzero exit status.
-h Locates and remembers function commands when they are defined.
-i Makes the shell interactive. TERMINATE, INTERRUPT and QUIT are ignored.
-k Places all keyword arguments in the environment for a command.
-l Makes the shell as a login shell.
-m Enables job control.
-n Reads commands but does not run them.
-p Sets automatically if the read UID or GID doesn’t match the effective UID.
-r Enables restricted mode.
-u Handles unset variables as an error if it is a substitute.
-v Shows input lines as they are read.
-x Shows commands and their arguments when they are executed.
-X Marks directories with a trailing/during filename generation.
-o name Enables an option based on its long name.
file Specifies the file the shell reads commands from.
arguments... Specifies arguments to commands.

Page 147 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: sh

Directory: /bin/

Type: External

shar

UNIX Shell—Bourne shell (sh)

Function—Creates a shell archive of files.

Syntax—shar files...

files Specifies the name of the archive

File Name: shar

Directory: /usr/bin/

Type: External

showfont

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows information from the X font server about a specified font.

Syntax—showfont [options...]

-server host.port Connects to the specified X font server.


-fn font Specifies the font to show information about.
-lsb Sets the bit order of the font to be least significant bit first.
-msb Sets the bit order of the font to be most significant bit first.
-LSB Sets the byte order of the font to be least significant byte first.
-MSB Sets the byte order of the font to be most significant byte first.
-ext Shows only the extents of the font.
-start number Shows a range of characters from the number specified.
-end number Shows a range of characters up to the number specified.
-unit number Sets the font’s scan line unit. The values are 8, 16, 32, or 64.
-pad number Sets the font’s scan pad unit. The values are 8, 16, 32, or 64.
-b number Specifies the font’s bitmap padding unit. The values are 0, 1, or 2.
-noprops Specifies not to show the font properties.

File Name: showfont

Directory: /usr/X11R6/bin/

Type: External

showrgb

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Converts a compiled RGB color name database back to the original form.

Syntax—showrgb {database}

database Specifies the database to be converted.

File Name: showrgb

Page 148 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Directory: /usr/X11R6/bin/

Type: External

showrgb Converts the default color database.

skey

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Generates an encrypted string by getting a password key and sequence number.

Syntax—skey [options...] sequence key

-x Shows the string in hexadecimal instead of ASCII.


-n value Specifies how many one-time passwords to show.
-p password Specifies the password to use. If not specified, the command will ask for it.
The following options can’t be combined:
-md4 Selects MD4 as the hash algorithm.
-md5 Selects MD5 as the hash algorithm.
-sha1 Selects SHA-1 (NIST Secure Hash Algorithm Revision 1) as the hash algorithm.
-rmd160 Selects RMD-160 (160-bit Ripe Message Digest) as the hash algorithm.
sequence Specifies which algorithm to use.
key A six-character-long key to use as the decryption key.

File Name: skey

Directory: /usr/bin/

Type: External

skey -md4 -n 10 -p sitbobosit 44 Shows generated string sequences from 34-44 with the password sitbobosit and the key
gooddog gooddog.
skey 100 abcdef Asks for the password and uses abcdef as the key. Only shows the 100th generated word.
skey-x-p hello 10 abcdef Shows the generated string in hexadecimal format.

skeyaudit

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Notifies users that have a low number of one-time passwords.

Syntax—skeyaudit [options...]

-a Checks all keys in /etc/skeykeys. Can only be used by root.


-i Runs the command in interactive mode. Shows only information doesn’t send it.
-l value Notifies the user if the user has fewer passwords left than specified (default is 12).

File Name: skeyaudit

Directory: /usr/bin/

Type: External

skeyaudit -i Doesn’t send notifications, just shows them on the screen.


skeyaudit -l 5 Notifies all users that have fewer than five passwords left.

skeyinfo

Page 149 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows the specified user’s next S/key challenge. Current user will be used if no user is specified.

Syntax—skeyinfo [-v] {user}

-v Shows the hash algorithm.


user Shows the next S/Key challenge for the specified user.

File Name: skeyinfo

Directory: /usr/bin/

Type: External

skeyinfo -v Shows which hash algorithm is used.

skeyinit

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Administers the user’s S/Key authentications.

Syntax—skeyinit [options...] {user}

-x Shows the password phrase in hexadecimal, not ASCII.


-s Specifies that you are working on a secure system.
-z Allows the user to erase their password.
-n count Starts the skey sequence at the specified count (default is 100).
-md4 Uses MD4 as the hash algorithm.
-md5 Uses MD5 as the hash algorithm.
-sha1 Uses SHA (NIST Secure Hash Algorithm Revision 1) as the hash algorithm.
-rmd160 Uses RMD-160 (160-bit Ripe Message Digest) as the hash algorithm.
user Specifies the username that is to be changed or added.

File Name: skeyinit

Directory: /usr/bin/

Type: External

skeyprune

UNIX Shell—Perl script

Function—Erases old and zeroed entries in the /etc/skeykeys file.

Syntax—skeyprune {days}

days Specifies the number of days of inactivity before it will be erased.

File Name: skeyprune

Directory: /usr/bin/

Type: Script

skeyprune Removes commented out entries.


skeyprune 100 Removes commented out entries and entries not modified in 100 days.

Page 150 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

slattach

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Assigns tty lines to a network interface.

Syntax—slattach [options...] {ttyname}

-h Turns the RTC/CTS flow control on (default is off).


-m Maintains the modem control signals after closing line—this disables the HUPCL.
-s baudrate Determines the speed of the connection (default is 9600).
ttyname Specifies the tty device.

File Name: slattach

Directory: /sbin/

Type: External

slipiogin

UNIX Shall—All primary shells (csh, ksh, sh)

Function—Turns the terminal line on STDIN into a serial line IP (SLIP) link to a remote host.

Syntax—slipiogin {user}

user Specifies the login name to use.

File Name: slipiogin

Directory: /usr/sbin/

Type: External

slipiogin ucg Reads /etc/sliphome/slip.hosts for the user ucg and then connects to the remote host specified in the configuration file.

slstats

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows statistic information for a slip interface.

Syntax—slstats [options...] NR

-v Verbose mode. Shows more information.


-i interval Specifies the time between reports (default is 5 sec).
-N system Shows the name list for the specified system (default is bsd).
-M core Extracts values associated with the name list from the specified.
NR Specifies the unit number for the sl interface (default is 0).

File Name: slstats

Directory: /usr/sbin/

Type: External

slstats -v Shows more information about interface 0.


slstats 1 Shows information about interface 1.

Page 151 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

smproxy

UNIX Shall—All primary shells (csh, ksh, sh)

Function—Works as a proxy for an X application that doesn’t support X11R6 management.

Syntax—smproxy [options...]

-clientId clientID Specifies the session ID that was used in the previous session.
-restore file Specifies the file that was used to save the state in from the previous session.

File Name: smproxy

Directory: /usr/X11R6/bin/

Type: External

smrsh

UNIX Shell—All prirnary shilis (csh, ksh, sh)

Function—Restricts a shell for users to only be able to run certain commands.

Syntax—smrsh [-c command]

-c command Specifies a valid command to run.

File Name: smrsh

Directory: /usr/sbin/

Type: External

smptd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to receive mails from other SMTP servers, will put messages in the spool directory.

Syntax—smtpd [options...]

-H Doesn’t check if the host connected is valid against a DNS.


-P Stops the connection if the hostname looks strange.
-D Starts as a daemon and listens to port 25.
-L Doesn’t let children of the daemon write to syslog.
-q Quiet mode. Sends fewer messages to the syslog.
-c directory Specifies a directory to chroot into when starting up.
-d directory Specifies where to put the spool messages.
-u user Runs the program as the specified user, who needs to be able to run sendmail -f.
-g group Runs the program as the specified group.
-m hostname Specifies what hostname the daemon should use.
-s bytes Specifies how big the messages are allowed to be.
-l address Specifies what IP address to listen on.
Specifies what TCP port to listen on.
-p port
Specifies a process ID file to use.
-i file

File Name: smtpd

Directory: /usr/libexec/

Type: External

Page 152 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

smtpfwdd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Forwards SMTPFWDD emails from a spool directory to their destinations,

Syntax—smtpfwdd [options...]

-d directory Specifies a spool directory and should be the same directory as for smtpd.
-g group Specifies a group that is run.
-M children Specifies the maximum number of children to create during delivery (default is 10).
-P time Specifies the polling interval for the spool directory, in seconds (default is 10 sec).
-q Starts quiet mode. Shows only one log message line per message exchange.
-s program Specifies the mail program to use instead of the default /usr/sbin/sendmail.
-u user Specifies which user to run smtpfwdd as. Does not have to be root.

File Name: smtpfwdd

Directory: /usr/libexec/

Type: External

spray

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Sends a stream of packets to a host. Reports how many were received and the transfer rate.

Syntax—spray [options...] host

-c count Specifies how many packets to send.


-d delay Specifies in microseconds the pause between each packet (default is 0).
-l length Sets the number of bytes in the packet (default is 86).
host Specifies the host to send to.

File Name: spray

Directory: /usr/sbin/

Type: External

spray sun Sends packets to the host sun.


spray -c 50 sun Sends 50 packets.
spray -c 20 -d 1000000 sun Sends 20 packets with a 1-second pause between each.

ssh, slogin

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Logins securely to a remote computer. Intended to replace rlogin.

Syntax—ssh [options...] host {command}

This is the same command as the one found in Linux. Please see ssh, slogin in the Linux chapter for all the
options.

File Name: ssh

Directory: /usr/bin/

Type: External

Page 153 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Tip Use ssh instead of telnet—it’s so much more secure.

ssh -l uk newstyledata.net Connects securely to newstyledata.net with user uk.


ssh -C -l uk newstyledata.net Connects securely to newstyledata.net with user uk using compression.

ssh-add

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Administrates RSA identities for the SSH authentication agent.

Syntax—ssh-add [options...] {files...}

-l Shows fingerprints of all identities used by the authentication agent.


-d Erases the identity from the authentication agent instead of adding it.
-D Erases all identities from the authentication agent.
files... Is one or more alternative files to write authentication information to.

File Name: ssh-add

Directory: /usr/bin/

Type: External

ssh-add -l Shows all identities fingerprints.


ssh-add -D Erases all identities.

ssh-agent

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Holds private keys for RSA authentication.

Syntax—ssh-agent command

-c Generates C-shell commands on stdout (is default).


-s Generates Bourne-shell commands on STDOUT.
-k Kills the current agent.
command Runs the command and exits.

File Name: ssh-agent

Directory: /usr/bin/

Type: External

sshd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Listens for secure connections from ssh clients.

Syntax—sshd [options...]

-d Shows debug information.


-i Specifies that sshd is run from inetd.
-q Specifies quiet mode. Doesn’t log anything.
-Q Doesn’t show error messages if RSA support is missing.
-v client-protocol-id Stops the protocol Version identification exchange.
-4 Uses IPv4 addresses only.

Page 154 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-6 Uses IPv6 addresses only.


-b bits Specifies the length of the server key (default is 768).
-f configfile Specifies the configuration file (default is /etc/sshd_config).
-g logingracetime Specifies the time a client has to authenticate before being disconnected.
-h hostkeyfile Specifies the RSA host key file (default is /etc/ssh_host_key).
-k keygentime Specifies the time between regenerating the server key (default is every hour).
-p port Specifies the port to use for connections (default is 22).

File Name: sshd

Directory: /usr/sbin/

Type: External

ssh-keygen

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates public and private SSH keys.

Syntax—ssh-keygen [options...]

-q Specifies silent mode.


-f filename Specifies the filename of the key file.
-R Exits with code 0 if RSA support is working; else it exits with 1.
-y Reads a private open SSH DSA format file and prints an OpenSSH DSA public key to STDOUT.
-x Reads and prints an SSH2-compatible public key to STDOUT.
-l Shows fingerprint of specified public or private key file.
-b bits Specifies the number of bits to use (default is 1024).
-N passphrase Specifies a new pass phrase.
-C comment Provides a comment.
-P Requests a new pass phrase.
-P passphrase Specifies the old pass phrase.
-c Changes the comment in a private and a public key.

File Name: ssh-keygen

Directory: /usr/bin/

Type: External

Tip Tired of entering a password every time? Add an empty pass phrase. This is a security risk.

ssh-keygen Creates an authentication key for the current user.


ssh-keygen -p -P oldie -N ucgworld Changes pass phrase.

startkey

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to initialize a key exchange with the photurisd daemon.

Syntax—startkey [-d directory] options...

-d directory Specifies a directory where photurisd looks for startup files.


dst=ip-address Specifies the IP address where the server is.

Page 155 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

port=number Specifies the port number to use.


options=opt Specifies the options used in the exchange (opt can be enc or auth).
tsrc=ip-address/netmask Is used together with tdst to set up an IP tunnel.
tdst=ip-address/netmask Is used together with tsrc to set up an IP tunnel.
exchange_lifetime=time Specifies the lifetime of the exchange (default is 1800 sec).
spi_lifetime=time Specifies the lifetime for each created SPI.
Specifies the username for whom the key shall be done.
user=name

File Name: startkey

Directory: /sbin/

Type: External

startx

UNIX Shell—Bourne shell (sh)

Function—Starts a session of the X-window system. A front end to xinit. Usually run without arguments.

Syntax—startx {client} {options...} [--] {server} {options...}

-- Is used only when specifying color depth for a specified program server.
client Specifies the hostname or IP address of the client to use.
options... Specifies the options to use for the specified client.
server Specifies the hostname or IP address of the server to use.
options... Specifies the options to use for the specified server.

File Name: startx

Directory: /usr/X11R6/bin/

Type: Script

stdethers

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Deletes unwanted information in a file.

Syntax—stdethers {file}

file Specifies file to act in.

File Name: stdethers

Directory: /usr/sbin/

Type: External

stdhosts

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to get rid of unwanted information.

Syntax—stdhosts {file}

file Specifies file to act in.

File Name: stdhosts

Page 156 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Directory: /usr/sbin/

Type: External

stdhosts > ucghost Filters what you type into a clean host filenamed ucghost.
stdhosts ucghosts1 > ucghosts2 Filters ucghostsl and outputs the result to ucghosts2.

sudo

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Allows a permitted user to execute a command as the super user.

Syntax—sudo [options...] command

-V Shows version information.


-L Lists parameters that may be set in a defaults line + short description.
-K Removes the user’s timestamp.
-S Reads the password from STDIN.
-h Shows help information.
-l Shows what commands the user can run and can’t run.
-v Resets the timeout counter that allows the user to run without a password. (If the timeout limit is reached, the user needs to specify his
-k Removes the timeout counter and make the user specify his or her password.
-s Runs a shell found in the SHELL environment variable.
-H Changes the HOME environment variable to the super user home directory.
-b Runs the specified command in the background.
-r realm Lets the user specify other Kerberos realm than the system default.
-p prompt Specifies other password prompt than the default.
-u username Specifies a username to run the command as instead of root.
-- Stops processing command-line arguments.
command Specifies what command to run.

File Name: sudo

Directory: /usr/bin/

Type: External

sudo adduser Runs adduser as root.

suexec

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Switches user when executing an external application through programs that is used internally by Apache.

Syntax—suexec

File Name: suexec

Directory: /usr/sbin/

Type: External

Tip Without Apache, this won’t do anything.

sup

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Upgrades files or programs by acting like a client and then talks to a file server process.

Syntax—sup [options...] {file} {ACTION}

Page 157 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

These options affect all specified collections and may not be combined:
-t Shows the time that each collection was upgraded. Doesn’t start an upgrade.
-N Traces any network messages sent and received by the sup network protocol.
-P Uses nonprivileged network ports otherwise reserved for debugging.
These options affect all collections unless over-ridden by another option:
-a Copies all the files in the collection from the repository no matter what the status.
-b Saves the contents of the local files before overwriting them.
-B Overrides and disables the -b option.
-d Erases any files left in the collection that are left over from a previous sup.
-D Overrides and disables the -d option.
-e Starts commands that should be run when a file is being upgraded. (If no -e is given, sup specifies which command.)
-E Overrides and disables the -e option.
-f Upgrades only lists and shows what would happen if an upgrade was done.
-k Checks the local file modification times before updating. Newer local files are kept.
-K Overrides and disables the -k option.
-l Upgrades collections even if the repository is a local one.
-m Sends mail to the suo user or the user specified by the notify supfile option.
-o Checks all collection files for changes instead of just the new ones.
-O Overrides and disables the -o option.
-z Compresses, sends, and decompresses a file over the network and restores its attributes.
-Z Overrides and disables the -z option.
-v Shows messages while sup is running.
-s Uses the system sup file instead of a specified one.
ACTION The following actions may be used in the specified sup file:
release=release Specifies which particular release is needed for upgrading.
base=directory Specifies another base directory to use for a collection.
prefix=directory Specifies another base directory to use for a collection’s file content.
host=host Specifies a host containing private collections to be upgraded.
login=ID Specifies a different account ID for the file server.
password =password Specifies a different password for the file server.
crypt=key Specifies an encryption key to use for network transmission.
notify=address Sends the log messages by mail to another netmail address.
The same as the -b option.
backup
The same as the -d option.
delete
The same as the -e option.
execute
The same as the -k option.
keep
The same as the -o option.
old
Uses the release name as a suffix for the first and last files in the collection.
use-rel-suffix
You must select -s or specify the sup file for sup to work.
-s Uses the system sup file instead of the specified one.
Specifies the sup file that is used.
file

File Name: sup

Directory: /usr/bin/

Type: External

SuperProbe

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Finds installed video hardware, used by some X11 configuration software to determine configurations.

Syntax—SuperProbe [options...]

-verbose Verbose mode. Shows more information.


-no16 Specifies to not use any ports that use 16-bit l/O address decoding.
-excl list Specifies the list of I/O ports that will not be included from the automatic inspect.
-mask10 Specifies the port addresses will be masked to 10 bits. Used with -excl option.
-order list Specifies the chipset names that will be tested.

Page 158 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-noprobe list Specifies the chipset names that will not be be tested.
-bios base Specifies the base address to the graphic-hardware BIOS.
-no_bios Specifies to not read from video BIOS and assumes it is an EGA, VGA, or SVGA.
-no_dac Stops inspecting of RAMDAC type if an (S)VGA is identified.
-no_mem Stops inspecting the installed video memory.
-info Shows a list of cards that can be identified.

File Name: SuperProbe

Directory: /usr/X11 R6/bin/

Type: External

SuperProbe The most usual way of running SuperProbe, it will do much automatically.
SuperProbe -verbose -no_dac Enables verbose mode and doesn’t try to find any ramdac.

supfilesrv

UNIX Shell—All primary shells (csh, ksh, sh)

Function—The software upgrade protocol server to serve client upgrades.

Syntax—supfilesrv [options...]

-l Waits for a connection and handles it.


-q Quiet mode. Doesn’t show log messages.
-N Shows more information about the network communications.
-P Shows more information about the nonprivileged TCP port that is used.
-O directory Specifies a lock directory to use. IP addresses will be looked up in this directory. (Connections will be refused if there is no file na
-C maxrequests Specifies the amount of requests the server will respond to.

File Name: supfilesrv

Directory: /usr/sbin/

Type: External

supfilesrv -l Waits for a request from a client.


supfilesrv -C 5-1 Changes the number of clients to accept and waits for them.

supscan

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates a list of the files on the sup server. This speeds up the service if there is a large number of files.

Syntax—supscan [options...] {collection} {basedirectory}

-v Verbose mode. Shows more information while finding files.


-s Scans all the system collections.
collection Specifies what collection to create a list of.
basedirectory Specifies the base directory of the collection to create a list of.

File Name: supscan

Directory: /usr/sbin/

Type: External

Page 159 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

swapctl

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Controls the swap devices and files. Adds, removes, or prioritizes the swap.

Syntax—swapctl option [options...]

The following options can’t be combined:


-A Makes all the devices marked as an sw in /etc/fstabto swap devices.
-a path Specifies a path to be added to the kernel list of swap devices.
-c path Specifies what priority to set for the specified swap device or file.
-d path Removes the specified path from kernel list of swap devices or files.
-l Lists all the swap devices and files used now.
-s Shows one line of the current swap statistics.
The following options can be used with some of the above ones:
-p priority Specifies what priority to set for swap devices or files. Used with -A, -a, and -c.
-k Uses blocks of 1024 bytes instead of the default 512 bytes. Used with -I and -s.
-t Specifies what types of devices to add. Used only with -A.
blk Uses all block devices.
noblk Uses all nonblock devices.

File Name: swapctl

Directory: /sbin/

Type: External

swapctl -A Uses all swap devices.


swapctl -s Shows the statistics about the swap.

swapon

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Manages swap devices and files for the system.

Syntax—swapon -a [option], swapon path

-a Makes all the devices marked as an sw in/etc/fstab swap devices.


-t Specifies what types of devices to add. Used only with -A.
blk Uses all block devices.
noblk Uses all nonblock devices.
oath Specifies a oath to be added to the kernel list of swap devices.

File Name: swapon

Directory: /sbin/

Type: External

swapon -a Makes the swap devices going.

sysctl

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Retrieves and allows the configuring of kernel states.

Syntax sysctl [options...] {variable}

Page 160 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-n Disables showing the variable’s name when showing values.


The following options and variables can’t be combined:
-a Shows the currently available values.
-A Shows the currently available values in table form.
-w variable=value Changes the settings for the specified key to the specified value.
variable Specifies the variable to read from.

File Name: sysctl

Directory: /usr/sbin/

Type: External

sysctl kern.osrelease Retrieves the OS release information.


sysctl -w kern.maxproc=2000 Sets max processes to 2,000.

systat

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A statistics showing program, showing the current load and the programs consuming much CPU.

Syntax—systat [options...] {display} {refresh}

-M core Uses the specified core to extract values (default is /dev/kmem).


-N system Uses the specified system (default is /bsd).
-w seconds Specifies how many seconds there should be before a screen update.
display Specifies what to show statistics on. Can be one of the following:
pigs Shows the processes that are consuming the greatest amount of CPU.
iostat Shows the CPU and disk activity statistics.
swap Shows the swap statistics.
mbufs Shows how many mbufs are allocated for the different uses.
vmstat Shows statistics for memory, interrupts, disk, CPU usage, and process scheduling.
netstat Shows statistics for the network connections.
refresh Acts exactly like -w. Is used for compatibility reasons.

File Name: systat

Directory: /usr/bin/

Type: External

systat -w 1 iostat Shows input/output statistics with 1-second update rate.

tcopy

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Copies or scans a magnetic tape.

Syntax—tcopy [options...] {source} {destination}

-c Verifies the tapes after they have been copied.


-v Verifies the two tapes specified as source and destination.
-x Shows messages on STDERR.
-s size Sets the maximum block size.
source Specifies tape drive to use for input (default is /dev/rst0).
destination Specifies where to copy the tape. If not given, only a scan is performed.

Page 161 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: tcopy

Directory: /usr/bin/

Type: External

tcpd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Controls and logs incoming requests for Internet services. Use from inetd-like programs.

Syntax—tcpd

File Name: tcp

Directory: /usr/libexec/

Type: External

tcpdchk

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Checks your TCP wrapper configuration and reports all potential problems it can find.

Syntax—tcpdchk [options...]

-a Shows access control rules that permit access without an explicit ALLOW keyword.
-d Checks current directory for hosts.allow/hosts.deny and examines them.
-i filename If inetd.conf or tlid.conf can’t be found, specify path here.
-v Shows content of each access control rule (verbose mode).

File Name: tcpdchk

Directory: /usr/sbin/

Type: External

tcpdchk -v Shows all access control rules.

tcpdmatch

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Predicts how the tcpwrapper would handle a specific request for service.

Syntax—tcpdmatch [options...] daemon[@server] {username@}client

-d Examines host.allow and host.deny files in current directory.


-i filename Specifies where your inetd.conf file exists.
daemon Specifies a daemon process name.
server Specifies a hostname or network address.
username Specifies a user identifier (default is unknown).
client Specifies a hostname or network address.

File Name: tcpdmatch

Directory: /usr/sbin/

Type: External

Page 162 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

tcpdump

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows the headers of packets matching the specified expression, on a network interface.

Syntax—tcpdump [options...] {expressions...}

-a Converts network and broadcast addresses to names.


-c count Stops after receiving count packets.
-d Shows the compiled packet-matching code in a human-readable form and stops.
-dd Shows the compiled packet-matching code in C program fragment.
-ddd Shows the compiled packet-matching code in decimal numbers.
-e Shows the link-level header on each dump line.
-f Shows “foreign” Internet addresses numerically rather than symbolically.
-F filename Specifies a file to read filters from.
-i interface Specifies the interface to use.
-l Specifies that STDOUT should be line buffered.
-n Specifies that addresses should not be converted to names.
-N Specifies that domain name qualification of hostnames should not be shown.
-O Specifies the packet-matching code optimizer should not be used.
-p Specifies the interface should be put in promiscuous mode.
-q Specifies that less information about a protocol should be shown.
-r filename Specifies a file to read packages from.
-s number Specifies the number of bytes to snap from each packet (default is 68).
-T type Specifies packets selected by expression to be interpreted as specified type.
-S Shows absolute, rather than relative, numbers.
-t Specifies that a timestamp should not be shown on each dump line.
-tt Specifies that a timestamp should be shown on each dump line.
-v Verbose mode. Shows more information.
-vv Verbose mode. Shows more information than -v does.
-vvv Verbose mode. Shows more information than -vv does.
-w filename Specifies a file to write raw package data to.
-x Shows each package in hex format.
-X Same as -x, but dumps the packet in Emacs-hexl-like format.
expressions... The following are the expressions that can be used:
dst host host Shows packets headers going to host.
Shows packet headers going from host.
src host host
Shows packet headers from and to host.
host host
Shows packet headers going to MAC address host.
ether dst host
Shows packet headers coming from MAC address host.
ether src host Shows packet headers coming from and to MAC address host.
ether host host Shows packet headers if they were going to the gateway.
gateway gateway Shows packet headers going to network.
dst net network Shows packet headers coming from network.
src net network Shows packet headers coming from and to network.
net net Shows packet headers coming to port.
dst port port Shows packet headers coming from port.
src port port Shows packet headers coming from and to port. (Use tcp or udp as prependers to any port expression to match only TCP pack
port port Shows packet headers whose length is less than or equal to length. (Is equivalent to: len <= length.)
less length Shows packet headers whose length is greater than or equal to length. (Is equivalent to: len >= length)
greater length Shows packet headers that are an IP packet of type proto.
ip proto proto A protocol.
tcp A protocol.
udp A protocol.
icmp Sets true if the packet is an Ethernet broadcast packet.
ether broadcast Sets true if the packet is an IP broadcast packet.
ip broadcast Sets true if the packet is an Ethernet multicast packet.
ether multicast Sets true if the packet is an IP multicast packet.
ip multicast Sets true if the packet is the specified proto type.
ether proto proto Selects the IP proto type.
ip Selects the ARP proto type.
arp Selects the RARP proto type.
rarp Selects the DECNET proto type.
decnet Selects the lat proto type.

Page 163 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

lat Selects the moprc proto type.


moprc Selects the mopdl proto type.
mopdl Sets true if the DECNET source address matches the specified host.
decnet src host Sets true if the DECNET destination address matches the specified host.
decnet dst host Sets true if the DECNET source or destination address matches the specified host.
decnet host host

File Name: tcpdump

Direclory: /usr/sbin/

Type: External

tcpdumphost 192.168.1.1 Shows packets heading to or from 192.168.1.1.


tcpdump ip and not net localnet Shows IP packets passing your computer, but not packets on the local net.

tenletxr

UNIX Shell—Bourne shell (sh)

Function—Forwards X connections from your host to the specified host.

Syntax—tenletxr [options...] host {port}

-l user Logs in as the specified user.


-k Disables keep-alive.
host Specifies the host to connect to.
port Specifies the port to use.

File Name: tenletxr

Directory: /usr/X11R6/bin/

Type: Script

tenletxr pluto Logs in to the host pluto and shows the X-window on pluto.

texindex

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates an index for a TeX output file.

syntax—texindex [option] file

-k Specifies to keep the temporary files after the command is run.


--no-keep Deletes the temporary files after the command is run, which also is the default.
-o file Specifies a file to save the output in.
-h Shows help information.
--version Shows version information.
file Specifies the input file to use.

File Name: texindex

Directory: /usr/bin/

Type: External

tfmtodit

Page 164 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to create groff font files to be used with groff-Tdvi.

Syntax—tfmtodit [options..] tfmFile mapFile font

-s Specifies the font is special.


-v Shows version information.
-kNR Specifies the skew char is at position NR in this font.
-g file Specifies a gf file produced by metafont to use.
tfmFile The name of TeX metric font file.
mapFile The name of a map file giving groff names for characters.
font The name of the groff font file

File Name: tfmtodit

Directory: /usr/bin/

Type: External

tftp

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Sends files to and from a remote host using the Trivial File Transfer Protocol (TFTP)

Syntax—tftp {host}

host Specifies host to connect to.


Below are the commands you can use after starting tftp:
get filename... Takes file or files from the remote host.
verbose Verbose mode. Shows more information.
trace Toggles tracing of packet.
status Shows status.
rexmt Sets timeout in seconds for retransmission of per-packet.
timeout Sets timeout in seconds for total transmission.
ascii Is used to specify ASCII mode.
binary Is used to specify binary mode.
? Shows help information.
quit Quits the tftp session.
put filename... Sends a file or files to the remote host.

File Name: tftp

Directory: /usr/bin/

Type: External

tftp ucg_main Starts a tftp connection to ucg_main.

timed

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to synchronize local time with other hosts.

Syntax—timed [options...]

-M Host will become master server if no master already exists or if the master fails.
-t Traces the received messages in /var/log/timed, log.
-d Debug mode. Does not run the daemon in the background.
-i network Ignores the named network. All other networks are valid.

Page 165 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-n network The named network is valid. All other networks are ignored.
-F hosts... Specifies the trusted hosts.
-t Enables tracing of received messages and log to /var/log/timed.log.

File Name: timed

Directory: /usr/sbin/

Type: External

timed -M Runs as master server if needed.

timedc

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Administers the function of the timed program.

Syntax—timedc {command} {argument}

The following commands and their arguments are supported:


help | ? [commands...] Shows help information about all of the specified commands.
clockdiff host others Shows the differences between the clock on the specified host and other systems.
msite hosts... Shows the master time server for specified host or hosts.
trace on | off Toggles the trace log to /var/log/timed.log of incoming messages.
election host Tries to reset the target host’s election timers.
quit Exits the program.
command Specifies the command to run.
argument Specifies any arguments to the command.

File Name: timedc

Directory: /usr/sbin/

Type: External

tip

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Connects to a remote host.

Syntax—tip [options...] ACTION

-v Shows the execution of the commands from the file . tiprc as they are done.
-n Disables the escape ~ character.
-speed Specifies a baud rate to use for the connection other than the default.
ACTION Select one of the following two actions:
hostname Specifies the hostname or IP address of the server to connect to.
phonenumber Connects to a remote host using a phone number.
The following are internal commands that are executed inside the program:
~. Drops the connection from the remote system and exits.

Page 166 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

~c directory Specifies a name to a directory.


~! Moves you to an interactive shell on the local system.
~> Copies a file from a local system to a remote system.
~< Copies a file from a remote system to a local system.
~p from {to} Copies the local file specified to the remote file specified.
~t from {to} Copies the remote file specified to a local file.
~| Takes output from a remote command and uses it as input to a local command.
~C Connects a program to a remote system.
~D Drops connection and exits.
~$ Takes output from a local command to a host or an IP address on a remote system.
~# Sends a BREAK to the remote system.
~^Z Sets a variable for normal operations.
Stops tip when it runs under a shell that supports job control, such as C-shell.
~^Y
Stops tip only on your own system—the remote system continues.
~?
Shows a summary of tilde escape characters on the screen.

File Name: tip

Directory: /usr/bin/

Type: External

tn3270

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to remotely log in to IBM computers with full screen and full duplex. Emulates the IBM 3270 terminal.

Syntax—tn3270 [options...] {host [port}]

-d Enables socket-level tracing. Only for the superuser.


-nfile Specifies a file for network trace data output.
-tcommand Specifies a command to process received IBM 4994 transparent mode data.
host Specifies the remote system to connect to.
port Specifies the port to connect to (default is 23).

File Name: tn3270

Directory: /usr/bin/

Type: External

tn3270 Starts the command in interactive mode. Type ? for help information.
tn3270 biqcomputer Connects to the host biqcomputer.

top

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows and updates information about the top CPU processes.

Syntax—top [options...] {NR}

-S Shows also the system processes.


-b Runs the command in batch mode, ignoring all terminal commands except interrupt.
-i Runs the command in interactive mode.
-l Does not show idle processes.
-n Runs the command in noninteractive mode. This is the same as batch mode.
-q Runs the command as nice=20 so that it will run faster (only as root).
-u Shows only the user ID numbers, not the usernames.
-d NR Shows the result with the specified numbers of updates before exit.
-s time Specifies the delay between screen updates in seconds (default is 5).

Page 167 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-o field Shows the process area with the specified field as the primary key.
Supported fields are: cpu, size, res, time, and pri.
-U username Shows only the processes owned by the specified user.
The following commands are supported in interactive mode:
Ctrl+L Re-creates the screen.
h|? Shows help information.
q Quits the program.
d Changes the number of screen updates.
n|# Changes the number of processes to show.
s Changes the delay between screen updates.
k Sends a signal to processes (default is TERM).
r Changes the priority of processes.
u Shows only processes belonging to a specified user.
e Shows a list of any generated errors from the k or r action.
i|l Turns the display of idle processes on or off.
NR Shows information about the processes with the specified number.

File Name: top

Directory: /usr/bin/

Type: External

top -U root Shows only root’s processes.


top -d 2 Shows only first and second updates.

trpt

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows information about TCP trace records on a socket marked for debugging.

Syntax—trpt [options...]

-a Includes the source and destination addresses values for the recorded packages.
-f Shows the information of the trace as it occurs.
-i Shows only information about protocol control block addresses with trace records.
-p address Shows only information associated with the given hexadecimal address.
-s Includes a detailed description of the packet sequencing information.
-t Includes the time values for each point in the trace.
-M core Shows information associated with the name list in the specified core.
-N system Shows information associated with the name list in the specified system.

File Name: trpt

Directory: /usr/sbin/

Type: External

trsp

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows information about SPP trace records on a socket marked for debugging.

Syntax—trsp [options...]

-a Includes the source and destination addresses values for the recorded packages.
-i Shows only information about protocol control block addresses with trace records.
-p address Shows only information associated with the given hexadecimal address.
-s Includes a detailed description of the packet sequencing information.
-t Includes the time values for each point in the trace.

Page 168 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-z Empties the debugging buffers in the kernel.


-M core Shows information associated to the name list in the specified core.
-N system Shows information associated to the name list in the specified system.

File Name: trsp

Directory: /usr/sbin/

Type: External

ttyflags

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to set device-specific flags for terminals.

Syntax—ttyflags [options...] ttys...

-a Uses the file /etc/ttys and sets the flags for all terminals found in the file.
-p Shows only information about the flags without changing anything.
-v Verbose mode. Shows more information.
ttys... Specifies terminal to act on.

File Name: ttyflags

Directory: /sbin/

Type: External

tunefs

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Changes the dynamic parameters of an unmounted file system that exists in /etc/vfstab.

Syntax—tunefs [options...] filesystem

-a maxcontig Sets the max number of contiguous blocks to write before forcing a rotational delay.
-A All backups will be modified as well as the primary superblock. Use with caution.
-d rotdelay Specifies time in milliseconds for a transfer completion/initiation on the same disk.
-e maxbpg Sets maximum number of blocks a file can use in a cylinder group before using other cylinders.
-m minfree Sets the percent of space that isn’t available for normal users.
-o Specifies the file system’s optimization strategy.
{space} Optimizes the file system to conserve space.
{time} Optimizes the file system to minimize access time.
-p Shows a summary of the current tunable settings on the selected file system.
-s enable | disable Enables or disables soft updates on the file system.
filesystem Specifies the unmounted file system to modify.

File Name: tunefs

Directory: /sbin/

Type: External

unifdef

UNIX Shell—All primary shells (csh, ksh, sh)

Page 169 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Function—Identifies and removes lines containing an ifdef mark from a C program source.

Syntax—unifdef [options...] {file}

-c Retains lines that would be removed or blanked, and vice versa.


-l Replaces removed lines with blank lines instead of deleting them.
-t Disables parsing for C comments and quotes.
-Dsym | -Usym Specifies which symbols to define or undefine.
-iDsym | -iUsym Ignores ifdefs.
file Specifies the file to work upon. If no file is specified, STDIN will be used.

File Name: unifdef

Directory: /usr/bin/

Type: External

units

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Converts a unit quantity to another type—for example, from inch to centimeter.

Syntax—units {options...}

-f filename Specifies the unit file to load.


-q Suppresses prompting for units and the statistics about number of units loaded.
-v Shows the version number.
FROM unit The unit to convert from.
TO unit The unit to convert to.

File Name: units

Directory: /usr/bin/

Type: External

units Interactively asks for units to convert between and displays factors to and from.
units -q Same as above, but no prompts.
units mm inch Returns "* 0.039,/25.4".

unvis

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Alters the result of the command on a file back to nonvisible characters

Syntax—unvis file

file Specifies the changed file to alter back to original form

File Name: unvis

Directory: /usr/bin/

Type: External

uucico

UNIX Shell—All primary shells (csh, ksh, sh)

Page 170 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Function—Transfers files used by the uucp command to a specific location.

Syntax—uucico [options...]

-r1 Starts in master mode.


-r0 Starts in slave mode (is the default).
-s systemname Specifies the system to transfer files to.
-S systemname Calls the named system, ignoring any required wait.
-f Forces the execution even if the maximum number of uucicos are reached.
-l Prompts for login name and password.
-p port Specifies a port to call out on or to listen to.
-e Enters an endless loop of login and password prompts.
-w Enters an endless loop after calling out.
-q Disables start of the uuxqt daemon when finished.
-c Disables so no error message is shown.

File Name: uucico

Directory: /usr/libexec/uucp/

Type: External

uuconv

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to convert UUCP configuration files from one type to another.

Syntax—uuconv options... [options...]

The following two options are mandatory:


-i input Specifies one of three input types: taylor, v2, or hdb.
-o output Specifies one of three output types: taylor, v2, or hdb.
-p program Specifies the program that is converted—for example, uucp or cu.
-l file Specifies the Taylor UUCP configuration file that is used.
-v Shows version information and then exits.
--help Shows help information.

File Name: uuconv

Directory: /usr/libexec/uucp/

Type: External

uucp

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Copies files from one place to another inside UNIX (UNIX-to-UNIX copy).

Syntax—uucp [options...] sourcefile destinationfile

-c Specifies not to make a copy to the spool directory before the transfer of a file.
-C Specifies to make a copy to the spool directory before the transfer of a file.
-d Creates all directories that the file copy needs.
-f Specifies not to create intermediate directories for the file copy.
-ggrade Defines a service grade, single letter, number, or a string of alphanumeric characters.
-j Shows the uucp job identification string on STDOUT.
-l file Specifies a configuration file to use.
-m Reports back to the user that sent the files by mail when the copy is complete.

Page 171 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-nuser Reports to the remote system user that a file was sent.
-r Puts the file in queue without doing the transfer.
-R Copies recursively to the destination directory.
-t Calls by the uuto shell script.
-v Shows version information.
-W Disables pretend remote relative path names with the current directory.
-xlevel Shows debug information with a level from 0 to 9 (higher level=more information).
--help Shows help information.
sourcefile Specifies the files that you want to copy, uses the format: system-name! pathname.
destinationfile Specifies the destination of the copy, uses the format: system-name! pathname.

File Name: uucp

Directory: /usr/bin/

Type: External

uucpd

UNIX Shell—All primary shells (csh, ksh, sh)

Function—The server daemon for UUCP connections. Invoked by inetd at request.

Syntax—uucpd

File Name: uucpd

Directory: /usr/libexec/

Type: External

uulog

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows information from the transaction logs of uucp or uuxqt.

Syntax—uulog [options...]

-n number Shows given number of lines from end of log.


-s system Shows information about file transfers involving the specified system.
-f systems Shows the updates to the log information as it is created. Use Ctrl+C to exit.
-u user Shows entries for the specified user.
-F Follows entries for any system.
-S Shows statistics file.
-D Shows debugging file.
-X level Specifies the debugging level.
-l file Specifies a configuration file to use.
-v Shows version information.
--help Shows help information.

File Name: uulog

Directory: /usr/bin/

Type: External

uuname

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows a list of all the systems that are known to the uucp command.

Page 172 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Syntax uuname [options...]

-a Shows all aliases.


-l Shows the name of your local system.
-l file Specifies the config file to use.
-v Shows version information and exits.
--help Shows help and exits.

File Name: uuname

Directory: /usr/bin/

Type: External

uupick

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Searches for files sent from other systems and prompts interactively for action.

Syntax—uupick [options...]

-s system Works on files from the specified system.


-x level Shows debug information. Level indicates the debugging level.
-l file Specifies the configuration file to use.
-v Shows version information.
--help Shows help information.

File Name: uupick

Directory: /usr/bin/

Type: External

uustat

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows information about the UUCP jobs on a local or remote system.

Syntax—uustat [options...]

-a Shows all queued file transfer requests.


-e Shows all queued execution requests.
-s system Shows all jobs queued for the specified system.
-S system Shows all jobs not queued for the specified system.

Page 173 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-u user Shows status information about the UUCP requests from the specified user.
-U user Shows status information about the UUCP requests not from the specified user.
-c command Shows all jobs requesting the execution of the specified command.
-C command Shows all jobs not requesting the execution of the specified command.
-o hours Shows all queued jobs older than the specified number of hours.
-y hours Shows all queued jobs younger than the specified number of hours.
Kills the specified job.
-k jobid
Resets the specified job’s queue time.
-r jobid
Shows command, execution, and conversation status for all remote systems.
-q
Shows conversation status for all remote systems.
-m
Shows status on all processes holding UUCP locks on systems or ports.
-p
Does a prompt on all jobs whether to kill it or not.
-i
Kills all jobs.
-K
Resets all job’s queue times.
-R
Sends a mail to the UUCP administrator for each job in the system.
-M
Sends a mail for each job in the system to the user who requested the specified job.
-N
Specifies a comment to send with the mail when using -M and -N options.
-W comment Specifies the number of lines in the mail to read from STDIN for each job.
-B lines Quiet mode. Doesn’t show anything on STDOUT.
-Q Shows debug information. (Type can be abnormal, config, spooldir, or execute.)
-x type Specifies the configuration file to use.
-l file Shows version information.
-v Shows help information.
--help

File Name: uustat

Directory: /usr/bin/

Type: External

uux

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Executes a command on a remote UNIX-based system and still enables the user to work locally.

Syntax—uux [options...] commandstring

-a address Reports job status to the specified e-mail address.


-c Does not copy local files to the spool directory.
-C Copies local files to the spool directory.
-g grade Sets the grade of the file transfer command.
-l file Sets configuration file to use.
-j Shows job IDs on STDOUT.
-l Links local files into the spool directory.
-n Doesn’t send mail about the status of the job, even if it fails.
-r Doesn’t start the uucico daemon immediately.
-v Shows version information.
-x type Turns on particular debugging types.
-z Sends mail about the status of the job if an error occurs.
- Reads STDIN and uses it as the standard for commands input.
-p Same as option -.
commandstring Specifies what to do, where to do it, and where to send the result. (Quote all special shell characters or the whole command string

File Name: uux

Directory: /usr/bin/

Type: External

uuxqt

Page 174 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to execute remote requested jobs created with the uux command.

Syntax—uuxqt [options...]

-shostname Specifies the name of the remote system.


-xdebuglevel Shows debugging information with level 0-9. Higher level gives more information.
-c command Executes requests for the specified command.
-l file Specifies the configuration file to use.
-v Shows version information.
--help Shows help information.

File Name: uuxqt

Directory: /usr/libexec/uucp/

Type: External

uuxqt uuxqt-s192. 168.1.1


uuxqt -command rmail Executes all remote requests.
Executes requests from 192.168.1.1. Executes only requests to the proqram rmail.

vacation

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Replies to mail automatically. Useful when you are out of the office.

Syntax—vacation [options...] {login}

-a alias Specifies alias to also reply from.


-i Initializes the vacation database files.
-r days Sets the reply interval to days (default is one week).
login Specifies login.

File Name: vacation

Directory: /usr/bin/

Type: External

vgrind

UNIX Shell—C shell (csh)

Function—Formats the program source using troff.

Syntax—vgrind [options...] file

-d defsfile Specifies alternative language definition file.


-f Forces filter mode.
-h header Is used to specify a header to appear on every output page.

Page 175 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-llanguage Is used to specify the language to use. The following languages are valid:
-Ish Bourne shell
-Ic C
-Ic++ C++
-Icsh C-shell
-ImI Emacs MLisp
-If FORTRAN
-II Icon
-i ISP
-ILDL LDL
-Im Model
-Ip Pascal
-Ir RATFOR
-n Doesn’t make keywords boldface.
-sn Specifies the point size used on output.
-t Sends the formatted text to STDOUT.
-W Forces the output to wide printer instead of narrow.
-X Outputs the index file in a “pretty” format.
- Takes input from STDIN.
file Specifies the source file to be processed.

File Name: vgrind

Directory: /usr/bin/

Type: Script

viewres

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows a tree structure of the widget class hierarchy of the Athena Widget Set.

Syntax—viewres [options...]

-top name Shows the name of the highest widget in the hierarchy.
-variable Shows the widget variable names in nodes instead of the class name.
-vertical Shows the widget tree top to bottom instead of left to right.

File Name: viewres

Directory: /usr/X11R6/bin/

Type: External

viewres -vertical Shows tree from top to bottom.

vipw

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to edit the password file, /etc/passwd.

Syntax—vipw

File Name: vipw

Directory: /usr/bin/

Type: External

vis

Page 176 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Converts and shows nonprintable characters in visible format.

Syntax—vis [options...] file

-b Converts the file with a minimum of change to the original. Similar to cat -v.
-c Shows nonprintable characters with C-style backslash sequences.
-F foldwidth Folds the output in the specified width.
-f Same as -F.
-l Adds a \$ sign to all new lines.
-n Disables encoding.
-o Shows non-printable characters with octal numbers.
-s Converts only characters that are considered unsafe to send as they are to a terminal.
-t Converts tabs also.
-w Converts white spaces.
file Specifies a file containing non-printable characters.

File Name: vis

Directory: /usr/bin/

Type: External

visudo

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Checks and edits the /etc/sudoers file and makes sure that it is correct, without any errors

Syntax—visudo [options...]

-V Shows version information.


-s Enables strict checking of sudoers file.

File Name: visudo

Directory: /usr/sbin/

Type: External

Note Opens the editor of your choice, if you have specified it in your EDITOR variable.

vnconfig

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Allows a regular file to be used as if it is a disk. Use it as a swap file or mount it with a file system.

Syntax—vnconfig -c [-v] device file, vnconfig -u [-v] device

-c Associates the specified device with the specified file.


-u Takes away the association from the specified device.
-v Verbose mode. Shows more information.
device Specifies the special device.
file Specifies the regular file.

File Name: vnconfig

Directory: /usr/sbin/

Page 177 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Type: External

vos

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Administers AFS volumes in interactive mode.

Syntax—vos {command} {arguments...}

command Specifies the command that is applied to the AFS volume.


Any of the following commands are available in the interactive mode:
apropos Does an apropos.
create Creates a volume.
createentry Creates a vldb entry.
dump Dumps a volume.
endtrans Ends a transaction.
examine Shows information about a volume, same as volinfo.
volinfo Shows information about a volume, same as examine.
help Shows help information, same as ?.
? Shows help information, same as help.
listpart Shows partitions on a server.
listvldb Shows volumes in the volume-location-database.
listvol Shows volumes on a server.
partinfo Shows partition information on a server.
status Shows volume server transactions.
syncsite Shows the sync site.
quit Exits the interactive mode.
arguments... Applies any accompanying arguments to the specified commands.

File Name: vos

Directory: /usr/sbin/

Type: External

vt220keys

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Defines SHIFTED function keys on VT220 terminals.

Syntax—vt220keys [options...] {keyname keystring}

-c Clears all SHIFTED function keys before setting them to user-defined strings.
-i Reads the .vt220rc file in the user’s home directory for SHIFTED function keys.
-l Locks the function keys from further definition.
keyname Specifies the key to define.
keystring Specifies the function to bind to the specified key.

File Name: vt220keys

Directory: /usr/sbin/

Type: External

vttest

UNIX Shell—All primary shells (csh, ksh, sh)

Fuction—Is used to test the functionality of VT100 -type terminals, and is menu driven.

Page 178 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Syntax—vttest

File Name: vttest

Directory: /usr/sbin/

Type: External

what

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows version information of object modules.

Syntax—what file

file Specifies file to get information from.

File Name: what

Directory: /usr/bin/

Type: External

what/lib/libcrypt.so Gets version information about the file /lib/libcrypt.so.

whence

UNIX Shell—Kornshell (ksh)

Function—Shows how a command will be interpreted.

Syntax—whence [options...] names...

-p Searches the path even if the command is a function, a reserved word, or an alias.
-v Verbose mode. Shows more information.
names... Specifies the command name or names to interpret.

whence Is Searches the path even if the command is a function, a reserved word, or an alias.
whence -v ftp Shows where the FTP is.

wicontrol

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Configures and controls Wave LAN/IEEE wireless network devices using the wi driver.

Syntax—wicontrol interface [options...]

-e value Enables or disables Web encryption, 0=disable, 1=enable.


-k key Sets Web encryption keys, key can be 1 to 4.

Page 179 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-T value Specifies which key to use for packet transmission encryption, value can be 1 to 4.
-o Shows the statistic counters as opposed to the card settings.
-t rate Specifies the rate of transmission for the specified interface. Select one of these:
1 Sets fixed low rate (1 Mbps).
2 Sets fixed standard (2 Mbps).
3 Sets auto rate Selected (High) (is default).
4 Sets fixed medium rate (4 Mbps).
5 Sets fixed high rate (6 Mbps).
6 Sets auto rate Selected (Standard).
7 Sets auto rate Selected (Medium).
-n network Specifies the service set (IBSS) name that this station will join.
-s station Specifies the station name for the interface.
-c action Permits IBSS creation if a one (1) is used. Block creation with a zero (0).
-q SSID Sets the name for the IBSS or SSID that is created on the interface.
Specifies the port type for the specified interface.
-p port
Requires that a host relate with a IBSS that is controlled via an access point.
1
Communicates directly to any stations within direct radio range (is default).
3
Sets the access point density for the specified interface.
-a density
Sets low density.
1
Sets medium density.
2
Sets high density.
3
Specifies the MAC station address for the interface. Hexadecimal separated by colons.
-m MAC Sets the maximum transmit and receive frame size. Valid values are 350 to 2,304.
-d length Specifies the RTS/CTS threshold for the interface. Valid values are 0 to 2,047.
-r threshold Specifies the radio frequency of the specified interface in the form of a channel ID.
-f frequency Enables or disables interface power management — 0= off, 1=on (default is 0).
-P 0 or 1 Specifies the interface sleep interval in milliseconds (default is 100).
-S duration Specifies the WaveLAN/IEEE device that is used.
interface

File Name: wicontrol

Directory: /sbin/

Type: External

window

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Creates and starts windows on ASCII terminals.

Syntax—window [options...]

-t Starts terse mode.


-f Does a fast start without any startup action.
-d Creates the two default windows without caring about the .windowrc file.
-e character Uses the specified character as an escape character.
-c command Specifies a command to run before anything else is done.

Flie Name: window

Directory: /usr/bin/

Type: External

wm2

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A nonconfigurable window manager for X.

Syntax—wm2

Page 180 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: wm2

Directory: /usr/X11 R6/bin/

Type: External

Note The X server must support the shape extension or else the command will not work.

x11perf

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to measure the performance of an X server.

Syntax—x11perf [options...]

This is the same command as the one found in Linux. Please see x11perf in the Linux chapter for all the
options.

File Name: x11perf

Directory: /usr/X11R6/bin/

Type: External

x11perfcomp

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Compares and shows the difference between x11servers.

Syntax—x11perfcomp [options...] files...

-r Shows server performance relative to the first server also.


-ro Shows only performance to the first server.
-l file Specifies a label file containing tests. Please see the xllperf -label.
files... Specifies the files to qet the test results from on each server.

File Name: x11perfcomp

Directory: /usr/X11R6/bin/

Type: External

xautolock

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to either lock the X Window or start a program when a specified amount of time has expired.

Syntax—xautolock [options...]

-help Shows help information.


--version Shows version information.
-time interval Sets the timeout interval to the specified amount (default is 10 minutes).
-locker lock Specifies the type of lock to use. This may be a program.

Page 181 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-killtime interval Specifies the secondary timeout after the locker starts (default is 20 minutes).
-killer killaction Specifies the type of killer to use (default is none).
-notify margin Warns the user before locking. Specify the notification margin in seconds.
-notifier notice Specifies the type of notice to use.
-bell level Sets the loudness level for the notification (default is 40%).
Sets any special actions to be taken when the mouse enters one of the window corners.
-corners action
Sets the delay before an action, when the mouse enters a + corner.
-cornerdelay delay
Sets the delay before an action, when a lock exits before the mouse leaves a corner.
-cornerredelay delay
Sets the corner area pixel size (default is 10).
-cornersize pixels
Resets the X screen saver once the locker has been started.
-resetsaver
Runs secure mode, which ignores -enable, -disable, -toggle, and -exit (default is false).
-secure true | false Does not allow STDERR to close.
-nocloseerr Does not allow STDERR and STDOUT to close.
-nodose Disables any process that is active.
-disable
Enables any process that is active.
-enable
Toggles a process that is active between enable and disable.
-toggle Forces an exit from any process that is active.
-exit Forces a window lock while a process is active.
-locknow Unlocks a window lock while a process is active.
-unlocknow
Specifies the type of lock to use if the -unlocknow option is used.
-nowlocker lock

File Name: xautolock

Directory: /usr/X11 R6/bin/

Type: External

Tip When using locker, killer, and notifier, specify the PATH to use /bin/sh. This means that most ~ expansions won’t
work.

xautolock -killtime 30 Specifies the secondary timeout after the locker starts.
xautolock -cornerredelay 2 Sets the delay to 2 seconds before an action, when a lock exits before the mouse leaves a corner.
xautolock -exit Forces an exit from any process that is active.

xconsole

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows console messages with X.

Syntax—xconsole [options...]

-file file Specifies the device to monitor (default is /dev/console).


-notify Enables notification of new messages. Icon name will change so you will notice.
-nonotify Disables message notification. The icon won’t change when things happen.
-daemon Runs in the background, as a daemon.
-verbose Verbose mode. Shows more information.
-exitOnFail Exits if it is unable to retrieve output from the device.

File Name: xconsole

Directory: /usr/X11R6/bin/

Type: External

xconsole-daemon Used in Xinit scripts to run xconsole in the background.


xconsole -nonotify Runs xconsole and doesn’t change the icon if xconsole is iconified.

xf86config

Page 182 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A console-based application to configure the XF86Config file.

Syntax—xf86config

File Name: xf86config

Directory: /usr/X11R6/bin/

Type: External

XF86Setup

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Configures the XFree86 server in GUI mode.

Syntax—XF86Setup [options...] {file} [--arguments...] XF86Setup [options...] {file} {arguments...}

-sync Activates synchronization for X server communication.


-name application Specifies the application name to use for the window name.
The following options are only available when a file is specified:
-display display Specifies the display that is communicated with.
-geometry geomspec Specifies the starting geometry for the window.
-notk Specifies that no connection to the X server should be made.
-script Tries to find the specified file in the script’s directory.
The following option is only available when no file is specified:
-nodialog Prohibits the use of the dialog program.
file Specifies the file to be used and is interpreted as if it were a Tcl/TK script file.
arquments... Specifies argument to send to the script.

File Name: XF86Setup

Directory: /usr/X11R6/bin/

Type: External

xfwp

UNIX Shell—All primary shells (csh, ksh, sh)

Function—An X firewall proxy. Provides an application layer firewall for X traffic.

Syntax—xfwp [options...]

-pdt time Sets closing time for inactive proxy manager connections in seconds (default is 3600).
-clt time Sets closing time for inactive xfwp client listen ports in seconds (default is 86400).
-cdt time Sets closing time for inactive xfwp client connections in seconds (default is 604800).
-pmport port Sets port address for proxy manager connections (default is 4444).
-config filename Specifies the filename for the configuration file.
-verify Displays the configuration file rule matched for each service request.

File Name: xfwp

Directory: /usr/X11R6/bin/

Type: External

xkbevd

UNIX Shell—All primary shells (csh, ksh, sh)

Page 183 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Function—Monitors for XKB events and runs the requested commands when they occur.

Syntax—xkbevd [options...]

-cfg file Reads the specified configuration file or ~/.xkb/xkbevd.cf or $(LIBDIR)/xkb/xkbevd.cf. (The configuration file is a list of events/action
-sc cmd Uses the specified command to play sounds.
-sd directory Gets the soundfiles from the specified directory.
-display screen Specifies another screen to use if not the one in $DISPLAY.
-bg Forks the command and runs it in the background.
-synch Synchronizes all X requests.
-v Verbose mode. Shows more information. More -v’s gives more information.
-help Shows help information.

File Name: xkbevd

Directory: /usr/X11R6/bin/

Type: External

Note This is only a prototype program for developers—not intended for end users.

xkill

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Kills an X client. Useful for removing problematic programs.

Syntax—xkill [options...]

-display displayname Specifies the X server to contact.


-id resource Specifies the X identifier on resource to abort.
-button number Specifies the number of pointer buttons to use when you select a window to kill.
-frame Ignores standard conventions to find top-level client windows.
-all Kills all clients with top-level window on the screen.

File Name: xkill

Directory: /usr/X11R6/bin

Type: External

xkill Lets you select the window to kill by pointing at it.

xload

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to show a histogram over the average system load.

Syntax—xload [options...]

-scale integer Specifies the minimum tick marks to use in the histogram.
-update seconds Sets the interval to update the histogram.
-hl color Sets the color of the scale lines.
-highlight color Same as -hl.
-jumpscroll pixels Sets the number of pixels to move the scale line to the left when it reaches the end.
-label string Sets a label over the scale.
-nolabel Shows no labels.
-lights Use keyboard LEDs to show the current load average.

Page 184 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: xload

Directory: /usr/X11R6/bin

Type: External

xload -label myaverage Start xload using myaverage as the label above the load average.

xlock

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Locks the local X screen until the user enters a password.

Syntax—xlock [options...]

-display dsp Specifies the X display to lock.


-help Shows help information.
-name resource-name Specifies a resource to use instead of XLock.
-mode modename Specifies the animation mode. There are over 90 different modes.
-delay usecs This is used to set the speed of an animation. A lower value makes animation faster.
--version Shows version information.
-resources Shows default resource file on STDOUT.
-visual visual Specifies the screen’s visual. Use default to set the root window; otherwise use these: StaticGray, Grayscale, S
-name resource-name Specifies a resource to use instead of XLock.
-count num Specifies number of things to do per animation or batch.
If it is working, it is the same as count.
-batchcount num
Specifies the number of cycles for modename until it does a timeout.
-cycles num
Specifies the maximum size of an object in modename.
-size num
Specifies the maximum number of colors to use.
-ncolors num
Specifies saturation value (0 is grayscale and 1 is a very rich color).
-saturation value Specifies the name of the erase mode. There are different names.
-erasemode name Specifies the time in microseconds for steps of the erase mode.
-erasedelay time Manages the VT switching on an XFree86 system. Use one of these four options as the mode:
-vtlock modename Specifies no locking.
off Switches to Xlock VT when activated.
switch Switches to Xlock VT when activated, and switches back to previous VT when deactivated.
restore Specifies to do a VT switch locking only when Xlock VT is active.
noswitch Specifies the so-called system nicelevel of Xlock.
-nice nicelevel Specifies the time in seconds before the screen needs a password to be unlocked.
-lockdelay time Specifies when password screen will time out, in seconds.
-timeout seconds Specifies the font to use on the prompt.
-font fontname Specifies the font name to use for the text in the lower part of the password screen.
-planfont fontname Specifies foreground color for the password screen.
-fg color Specifies background color for the password screen.
-bg color Specifies a text string in front of the username.
-username textstring Specifies a password prompt string.
-password textstring Shows a “what to do” message.
-info textstring Specifies a message that shows when validating the password.
-validate textstring Specifies a text to show when password is invalid.
Specifies the size and offset of the lock window (use format 25×25). 
-invalid textstring
Specifies the size of the icons (default is 64×64). 
-geometry geom
Specifies the size of the screen in g1 mode.
-icongeometry geom
Specifies the space between the center of your two eyes for 3-D mode.
-glgeometry geom Specifies the color to use for empty size in 3-D mode.
-delta3d value Specifies the color to use for right eye in 3-D mode.
-none3d color Specifies the color to use for left eye in 3-D mode.
-right3d color Specifies the color to use for overlapping images for left and right eyes in 3-D mode.
-left3d color Specifies the program to use as the fortune generator (only in marquee and nose modes).
-both3d color Specifies the file to use as the fortune generator (only in marquee and nose modes).
-program programname Specifies the text to show in a mode (only in flag, marquee, and nose modes).
-messagesfile formatted-filename Specifies the font name to use in a mode (only in flag, marquee, and nose modes).
-message textstring Shows the xbm, xpm or ras file for flag, life(1d), maze, eyes, pacman, or puzzle mode.
-messagefont fontname Specifies the numbers of neighbors of a cell.
-bitmap filename When you use these options, use − minus to disable and + plus to enable:

Page 185 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-neighbors num Enables or disables the monochrome override.


Enables or disables the no password required mode.
mono Enables or disables the allow new client access.
nolock Enables or disables the remote host access.
allowaccess Enables or disables the running in a window.
remote Enables or disables the running in the root window.
inwindow
inroot

File Name: xlock

Directory: /usr/X11R6/bin/

Type: External

xlsatoms

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows the specified interned atoms on the server.

Syntax—xlsatoms [options...]

-display dpy Specifies the X server to contact.


-format string Specifies printf-style string of how to show each atom.
-range {low}-{high} Specifies the range of atoms to check. If low isn’t given, 1 is used. (If high isn’t given, xlsatoms continues until the first undefined
-name string Is used to specify an atom to show.

File Name: xlsatoms

Directory: /usr/X11R6/bin/

Type: External

xlsclients

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to show client applications that run on a screen.

Syntax—xlsclients [options...]

-display displayname Specifies the X server to contact.


-a Shows clients from all screens.
-l Shows a long listing.
-m maxcmdlen Specifies the maximum number of characters in a command to show (default is 10000).

File Name: xlsclients

Directory: /usr/X11R6/bin/

Type: External

xlsclients -display monza Shows the applications running on the screen monza.

xmag

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to enlarge parts of the screen.

Syntax—xmag [options...]
Page 186 / 195
Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Syntax—xmag [options...]

-mag factor Specifies the magnification to use (default is 5).


-source geom Specifies size and/or location of the source region on the screen.
-toolkitoptions... Specifies additional standard X Toolkit command-line options.

File Name: xmag

Directory: /usr/X11R6/bin/

Type: External

xman

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to show man pages in a browser when running X.

Syntax—xman [options...]

-helpfile file Uses help file other than the default.


-bothshown Shows both manual page and directory on the screen at the same time.
-notopbox Starts the browser without the top menu.
-geometry W*H+X+Y Specifies the size and location of the top menu.
-pagesize W*H+X+Y Specifies the size and location for the manual pages.

File Name: xman

Directory: /usr/X11R6/bin/

Type: External

xman xman Shows the man page for the command xman.

Xnest

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Opens a new window X server that will nest inside of the real X server.

Syntax—Xnest [options...]

-display display Specifies the display address to the real X server to connect to.
-sync Synchronizes the window and graphics operation with the real X server.
-full Generates the real X server objects and opens a new connection to the X server.
-class class Sets the visual class on the nested server.
-depth depth Sets the visual depth of the nested server.
-sss Activates the screen saver.
-geometry geometry Specifies where to place the top-level windows on the real X server. (Geometry is specified like width+height+x+y. Each value
-bw pixels Specifies the Xnest window border width in pixels.
-name name Specifies the Xnest window name.
-scrns number Creates the specified number of screens in the nested server.
-install Skips the real X server’s color map installation and uses its own.
-parent windowID Specifies the root window to use instead of creating a new window.

File Name: Xnest

Directory: /usr/X11R6/bin/

Type: External

Page 187 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Note One cool way of running two or more window managers at the same time.

Xnest -display :0 Starts a nested X server on the first X server on localhost.


Xnest -display workstation:0 Starts- a nested X server on the first X server on the workstation.

xon

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Executes the specified command on the specified remote host.

Syntax—xon host [options...] {commands...}

-access Adds the remote host to the access list in the local X server.
-debug Shows debug information.
-name name Sets a different window title and application name than the default xterm.
-nols Disables the use of the -ls option to the remote xterm.
-screen screen Specifies the screen number to the DISPLAY variable on remote command.
-user user Specifies alternate username or IP address.
host Specifies the remote server to start process on.
commands... Specifies command to run on remote computer.

File Name: xon

Directory: /usr/X11R6/bin/

Type: Script

xon monza Runs an xterm -ls on the host monza.


xon monza -access Adds monza to the access list in the local X server.

xrefresh

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to refresh all or part of an X screen.

Syntax—xrefresh [options...]

-white Uses white background.


-black Uses black background.
-solid color Specifies a color to create a background of.
-root Uses the root window background.
-none Refreshes all of the window (is the default).
-display displayname Specifies a server and screen to refresh.
-geometry Width*Height+X+Y Specifies the part of screen to refresh.

File Name: xrefresh

Directory: /usr/X11R6/bin

Type: External

xsetmode

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to set the mode for an input device under X-window.

Syntax—xsetmode device option

Page 188 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

ABSOLUTE Specifies absolute mode.


RELATIVE Specifies relative mode.
device Specifies an X input device.

File Name: xsetmode

Directory: /usr/X11R6/bin

Type: External

xsetpointer

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to set the main pointer for X-window.

Syntax—xsetpointer [-l] {device}

-l Lists all available devices.


device Specifies the X input device to use.

File Name: xsetpointer

Directory: /usr/X11 R6/bin/

Type: External

xsm

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Manages X sessions. Runs applications and lets them become part of the session.

Syntax—xsm [options...]

-display name Causes xsm to connect to the specified X display.


-session name Specifies a session to load.
-verbose Verbose mode. Shows more information.
The following are operations to use inside the session:
Load Session Loads the selected session.
Delete Session Deletes the selected session.
Default/Fail Safe Starts with a set of default applications.
Cancel Is used to cancel a delete operation or to exit the manager from the session.
The following are options to use in the main window:
Client List Shows a list of clients in the session in a new window and allows operations on them.
Session Log Shows log information about the session.
Checkpoint Saves the state of all applications that are running in the session.
Shutdown Saves the state and exits the session.

File Name: xsm

Directory: /usr/X11R6/bin/

Type: External

xstr

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Keeps a library of string from component parts in large programs that can be used as shared constant strings.

Page 189 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

Syntax—xstr {file} [options...]

- Makes xstr to read from the STDIN.


-c filename Specifies a file with C source text.
-l array Specifies a program reference array.
file Specifies the file to query.

File Name: xstr

Directory: /usr/bin/

Type: External

xstr -c ucgfile Extracts the strings from the C source ucgfile.

Xvfb

UNIX Shell—All primary shells (csh, ksh, sh)

Function—A virtual X server that uses virtual memory to emulate a frame buffer for X-window version 11.

Syntax—Xvfb [options...]

Supports all of the X server options along with the following ones:
-screen number WxHxD Creates a screen with the specified number and sets it to the given size.
-pixdepths list Specifies the pixel map depth list that is supported (valid values in the list 1-32).
-shmem Places the frame buffer into shared memory. Works only with System V shared memory.
-linebias value Adjusts the way thin lines are pixelized. The specified value is the bitmask size.
-blackpixel value Specifies the black pixel value that the server will use.
-whitepixel value Specifies the white pixel value that the server will use.

File Name: xvfb

Directory: /usr/X11R6/bin/

Type: External

xwininfo

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to show information about X-window.

Syntax—xwininfo [options...]

-help Shows help information.


-id id Specifies a target window ID.
-root Specifies that X root window is the target.
-name name Specifies the window named name as the target window.
-int Shows all X-window IDs as integer values.
-children Shows the root, children, and parent windows’ IDs.
-tree Shows all children recursively.
-stats Shows statistical information about the window.
-bits Shows bit information about the window.
-events Shows window event mask information.
-size Shows size information about the window.
-wm Shows the selected window’s window manager hints.
-shape Shows the window manager border shape information.
-frame Causes windows manager frames to look in when selecting windows.
-metric Shows metric information about the window.
-english Shows lengths in Anglo-Saxon units—for example, yards, miles, and feet.
-all Queries everything.

Page 190 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-display display Specifies the X server that you want to connect to.

File Name: xwininfo

Directory: /usr/X11R6/bin

Type: External

xwininfo -size Shows sizes of the selected window.


xwininfo -display localhost:1 Shows the information on the specified X server.
xwininfo -all Shows all available information about the windows.

yes

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Outputs a string or “y” forever.

Syntax—yes {string}

string You can enter a string instead of “y”

File Name: yes

Directory: /usr/bin/

Type: External

yes | rm -i ucg* Enters a “y” to every question from rm.


yes yes | rm -i ucg* Enters a “yes” to every question from rm.

yptest

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Checks a series of YP functions to see if the YP server is working properly.

Syntax—yptest

File Name: yptest

Directory: /usr/sbin/

Type: External

NIS: The following tests are run: YP match, YP first, YP next, YP master, YP order, YP maplist, and YP all.

yyfix

UNIX Shell—Bourne shell (sh)

Function—This script will extract tables from the yacc generated file y.tab.c.

Syntax—yyfix file {tables...}

file Specifies the file that is used to save the extracted tables into.
tables... Specifies the list of tables to be extracted from y.tab.c.

Page 191 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: yyfix

Directory: /usr/bin

Type: Script

zcmp

UNIX Shell—Bourne shell (sh)

Function—Compares two compressed files. Return status is 0 = identical, 1 = different, 1 < error.

Syntax—zcmp [options...] file1 {file2}

-l Shows the byte number (dec) and the byte value (oct) for each difference.
-s Shows nothing for differing files.
file1 Specifies the first file.
file2 Specifies the second file. If not given, use the uncompressed file with same name.

File Name: zcmp

Directory: /usr/bin

Type: Script

zcmp a.Z b.Z Compares a.Z and b.z; reports where b.Z differs from a.Z.
zcmp a.Z a.gz Compares compressed file a.Z with gzipped file a.gz.
zcmp-l a.Z a.gz Shows number and the differing byte values.

zdiff

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Compares compressed files. It uses the command diff to run the comparison.

Syntax—zdiff [options...] file1 {file2}

Please see the command diff for the options.

File Name: zdiff

Directory: /usr/bin/

Type: External

zdiff -y myzip2.Z myzip2.1.Z Compares the file myzip2.Z with myzip.gz and shows the differences side by side.

zdump

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Shows the current date and time for the time zones that you specify on the command line.

Syntax—zdump [options...] {timezones...}

-v Verbose mode. Shows more information.


-c cutoffyear Limits the verbose output to just before the year that you specify.
timezones... Specifies which time zone to dump. If a wrong time zone is given, GMT is shown.

Page 192 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

File Name: zdump

Directory: /usr/sbin/

Type: External

zdump -v Europe Shows European time in verbose mode.


zdump-v-c 1999 Doesn’t show years after 1999.

zforce

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Adds a .gz extension to a compressed (gzip) file.

Syntax—zforce {files...}

files... Specifies file to add the extension to.

File Name: zforce

Directory: /usr/bin/

Type: External

zforce RFC9999 If RFC9999 is a gzipped file, RFC9999 is renamed RFC9999.gz.

zgrep, zfgrep, zegrep

UNIX Shell—Bourne shell (sh)

Function—Is used to search for text strings inside compressed files.

Syntax—zgrep [options...] pattern files...

options... Specifies options from the grep, egrep, or fgrep command.


pattern Specifies pattern to search for.
files... Specifies one or more files to search in.

File Name: zgrep

Directory: /usr/bin/

Type: Script

zgrep ISDN rfc44444.gz Searches for string ISDN in the gzipped file rfc44444.gz.
zgrep -v ISDN rfc4444.Z Searches for lines not containing string ISDN in compressed file RFC4444.Z.

zic

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Is used to set time conversion.

Syntax—zic [options...] {files...}

-d directory Creates time conversion files in the specified directory.


-l localtime Uses the specified time zone as the local time.

Page 193 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

-p timerules Uses the rules from the specified time zone to manage posix time zone variables.
-L file Reads leap second information from the specified file.
-v Prompts if the year in the input file is out of range.
-s Limits time values stored in output files to values that are same.
-y yeartype Checks how years are to be written.
Reads time conversion information from STDIN.
files... Specifies a file with time conversion information.

File Name: zic

Directory: /usr/sbin/

Type: External

zmore

UNIX Shell—Bourne shell (sh)

Function—Shows compressed text files one screen at a time.

Syntax—zmore {files...}

files... Specifies one or more files to show.

File Name: zmore

Directory: /usr/bin/

Type: Script

zmore RFC1001.gz Shows the compressed file one page at the time.

znew

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Converts a .Z file to a .gz file.

Syntax—znew [options...] {filenames...}

-f Forces recompression even if the .gz file already exists.


-t Checks the new file before deleting the originals.
-v Verbose mode. Shows more information.
-9 Specifies to use the most powerful compression method.
-P Uses pipes to convert the file to reduce disk space usage.
-K Keeps the .Z file if it’s smaller than the .gz file.
filenames... Specifies the file to recompress.

File Name: znew

Directory: /usr/bin/

Type: External

znew ucg_secrets.Z Produces the gzipped ucg_secrets.gz.


znew -K ucg_secrets.Z Keeps ucg_secrets.Z if it is smaller than ucg_secrets.gz
znew -9 ucg_secrets.Z Uses the most powerful compression method.

zzz

Page 194 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited
Universal Command Guide for Operating Systems

UNIX Shell—All primary shells (csh, ksh, sh)

Function—Places the system into one of two modes of advanced power management (ARM) suspension.

Syntax—zzz [options...]

-S Suspends the system.


-z Places the system into stand-by.
-f socket Specifies the socket that is used to manage who has access to APM.

File Name: zzz

Directory: /usr/sbin/

Type: External

zzz Places the system directly into suspension.


zzz -z Places the system into stand-by.

Page 195 / 195


Reprinted for CTS/241725, Cognizant Technology Solutions John Wiley & Sons (US), Hungry Minds, Inc. (c) 2002, Copying Prohibited

You might also like