2.3. Alphabetical Summary of Solaris Commands

 < Day Day Up > 

cde

Common Desktop Environment

The Common Desktop Environment (CDE) is one of the graphical user interfaces (GUI) on Solaris systems. Solaris users may choose between CDE and GNOME.

Documenting CDE would require its own book and is beyond the scope of this one. Instead, listed here are some of the more useful individual CDE commands, which are kept in /usr/dt/bin. (Commands for the Desktop.) In addition, a number of OpenWindows commands are still useful. See the listing under openwin.

Useful CDE Programs

The following CDE and Sun Desktop commands may be of interest. Check the manpages for more information.

answerbook2

Sun hypertext documentation viewer.

dtaction

Invoke CDE actions from within shell scripts.

dtbuilder

CDE applications builder.

dtcalc

Onscreen scientific, logical, and financial calculator.

dtcm

Calendar manager.

dterror.ds

dtksh script for error notices and dialogues.

dtfile_error

dtksh script for error dialogues.

dticon

Icon editor.

dtksh

The "Desktop Korn shell," an early version of ksh93.

dtmail

Mail reader.

dtpad

Simple text editor.

dtprintinfo

Print job manager.

dtscreen

Screen savers.

dtterm

Terminal emulator.

fdl

Font downloader utility for PostScript printers.

sdtconvtool

GUI for iconv.

sdtfind

File finder.

sdtimage

Image viewer (PostScript, GIF, JPEG, etc.).

sdtperfmeter

System performance meter.

sdtprocess

Process manager.


cdrw

     cdrw [options] commands | files

Read and write CDs and DVDs. cdrw can write CD-RW, DVD-RW, and DVD+RW media for data, and read and write audio data for music CDs. Options let you specify devices and control the way in which data are written to writable media. Images for data CDs and DVDs are usually prepared using mkisofs.

Without -C, the default capacities for writable CD media are assumed to be 74 minutes for an audio CD, 681,984,000 bytes for a data CD, and 4.7 Gbytes for a DVD.

Options


-a

Create an audio CD. Audio CDs are limited to 99 tracks, so no more than 99 files may be provided. Audio files should be in one of the following formats:

AUR

.aur files with raw audio data in big-endian format

CDA

.cda files with raw audio data (16 bit PCM stereo at 44.1 KHz sample rate, in little-endian format)

RIFF

.wav files with data in Red Book CDDA format

Sun

.au files with data in Red Book CDDA format



-b blanktype

Blank (erase) CD-RW and DVD-RW media. The blanktype should be one of all, fast, or session. DVD+RW media does not support blanking but can be rewritten without it.


-c

Copy a CD. By default cdrw uses the CD writer as the CD reader, and stores the data temporarily on the local hard disk. Use -s to specify a different source device.


-C

Use the amount of space reported by the drive as the capacity of the media. Useful when appending to a multisession CD.


-d device

Use device as the CD or DVD writer.


-h

Print a usage message.


-i file

Use file as the image to write to the media. For best results, the file should be available on a local hard disk, not mounted via NFS.


-l

List all CD or DVD writers available on the system.


-L

Close the disk. This prevents any further writing. Applies only to CD-RW media.


-m dir

Use dir for storing temporary files while copying a CD or DVD, instead of the default temporary directory.


-M

Report the media status: blank or not, table of contents, last session start address, and next writable address if the disk is open.


-O

Keep the disk open. The session is closed but the disk is left open for addition of another session later, creating a multisession disk.


-p speed

Set the writing speed of the drive. Usually cdrw uses the drive's default speed. With this option, cdrw attempts to change the speed, but there is no guarantee as to the actual speed used.


-s device

Use device as the source for data when copying a CD or DVD.


-S

Simulate writing. The drive's laser is turned off; use this option to verify that the system can move data quickly enough.


-T type

Specify the type of audio data. It should be one of aur, cda, wav, or sun. (See the -a option.)


-v

Be verbose.


-x

Extract audio data from an audio track.

Examples

Extract the second song from an audio CD:

     cdrw -x 2 three_blind_mice.cda

Create a data CD, at speed 40X:

     cdrw -i -p 40 /bigdisk/tmp/whizprog-dist.iso

chkey

     chkey [options]

Prompt for login password and use it to encrypt a new key. See also keylogin and keylogout.

Options


-m mechanism

Change or reencrypt the secret key for the specified mechanism. (Mechanisms are those allowed by nisauthconf (1).)


-p

Reencrypt the existing secret key with the user's login password.


-s database

Update the given database, which is one of files, ldap, nis, or nisplus.

decrypt

     decrypt [options] [-i infile] [-o outfile]

Decrypt files encrypted with encrypt. encrypt and decrypt are hard links to each other and accept the same options. See encrypt for a full description.

digest

     digest [-v] -a algorithm [file ...]     digest -l

Compute a PKCS#11 message digest of the given files. The second form lists the available digest algorithms. See also decrypt, encrypt, and mac.

Options


-a algorithm

Use algorithm to compute the digest. This option is required. Values for algorithm are sha1 and md5.


-l

Used by itself to list available digest computation algorithms.


-v

Verbose; include algorithm name in the output.

Examples

Calculate MD5 checksums on some start-up files:

     $ digest -a md5 .profile .login                 Regular results     (.profile) = 74c0f9c28d37f985c3f160efe992e078     (.login) = 05d1f072534b75188bdaba2747d8edaa     $ digest -v -a md5 .profile .login              Verbose     md5 (.profile) = 74c0f9c28d37f985c3f160efe992e078     md5 (.login) = 05d1f072534b75188bdaba2747d8edaa

dircmp

     dircmp [options] dir1 dir2

Compare the contents of dir1 and dir2. See also diff and cmp.

Options


-d

Execute diff on files that differ.


-s

Don't report files that are identical.


-w n

Change the output line length to n (default is 72).

dis

     dis [options] files

Disassemble the object or archive files. See also as.

Options


-C

Display demangled C++ symbol names.


-d section

Disassemble only the specified section of data, printing its offset.


-D section

Same as -d, but print the data's actual address.


-F func

Disassemble only the specified function; reuse -F for additional functions.


-l string

Disassemble only the library file string (e.g., string would be malloc for libmalloc.a).


-L

Look for C source labels in files containing debug information (e.g., files compiled with cc -g).


-o

Print octal output (default is hexadecimal).


-t section

Same as -d, but print text output.


-V

Print version information on standard error.

encrypt

     encrypt [options] [-i infile] [-o outfile]

Encrypt files using a PKCS#11 algorithm. Files are decrypted with decrypt. encrypt and decrypt are hard links to each other and accept the same options. Both programs read and write standard input and standard output by default. See also decrypt, digest, and mac.

These programs are not related to the original Unix crypt command. That program's encryption algorithm is considered weak by today's standards, and it should not be used.


Options


-a algorithm

Use algorithm to encrypt the file. Possible values for algorithm are aes, arcfour, des, and 3des.


-i file

Read input data from file, instead of from standard input.


-k keyfile

Read the encryption/decryption key from keyfile, instead of prompting for it.


-l

List available encryption algorithms. This option should be used by itself.


-o file

Write output data to file, instead of to standard output.


-v

Be verbose. This prints a progress bar.

Examples

Display available algorithms:

     $ encrypt -l     Algorithm       Keysize:  Min   Max (bits)     ------------------------------------------     aes                       128   128     arcfour                     8   128     des                        64    64     3des                      192   192

Encrypt a trade secret document, then decrypt it and compare the result to the original:

     $ encrypt -a aes -i designdoc.txt -o designdoc.txt.aes   Encrypt     Enter key:                                      Key is not echoed     $ file design*                                   Check results     designdoc.txt:     ASCII text     designdoc.txt.aes: data     $ decrypt -a aes -i designdoc.txt.aes -o designdoc.txt.out  Decrypt     Enter key:                                      Enter same key     $ cmp designdoc.txt designdoc.txt.out            Results are identical     $

enhance

     enhance command [argument ...]

Provide command-line editing facilities for programs that don't have it, such as ftp. enhance runs the given command and arguments behind a pseudo-terminal, reading user input, performing editing, and sending final input lines to command. enhance uses the tecla library; see tecla(5) for the details.

filesync

     filesync [options] [-r dir ...]     filesync [options] -s srcdir -d dstdir filename ...

Synchronize files and directories (including symbolic links and device files) between two different computer systems. This command is intended for keeping nomadic computers, such as laptops or notebook systems, synchronized with server systems. By default, changes are propagated two ways: from both the source system to the destination system, and vice versa. (Typically the server is the source system and the nomadic system is the destination.) Access to the server file tree is via NFS mount on the client, typically managed via the automounter. (Contrast this to the rsync command [see rsync in the earlier section "Alphabetical Summary of Common Commands"], where the name of the remote host is provided explicitly.)

filesync synchronizes only the files listed in the $HOME/.packingrules file. See packingrules(4) for a description of the file format. The file allows specification of files to be ignored, wildcard patterns, and more. It lists the files and directories that are to be synchronized. Users may edit this file with any text editor in order to adjust filesync's operation. The file $HOME/.filesync-base keeps track of which files are subject to synchronization, and their states when last synchronized. Users should not edit this file. Both files should be kept on the nomadic system, which should also be the one where filesync is run, in order to avoid problems with multiple nomadic systems synchronizing from a single server.

The first command-line syntax synchronizes files as described by the .filesync-base and .packingrules files. The -r option may be used to restrict synchronization to just the given directory. The second syntax adds new directories to the list of files to be synchronized. This syntax is cumulative; once added, files and directories stay in the synchronization list until explicitly removed (by editing the .packingrules file). Specifying a directory copies the directory and the entire file hierarchy under it.

By default filesync reports its actions in the form of Unix commands: mv, cp, etc.

Options


-a

Check, and if possible, reconcile Access Control Lists (ACLs) for files being synchronized.


-d dstdir

Use dstdir as the destination directory into which new files should be synchronized. Use together with -s and a filename operand.


-e

Report all differences, such as ownership and permissions. filesync normally ignores differences it cannot synchronize, such as changing ownership to the original file's owner if not run as a privileged user.


-f favorite

Favor the system specified by favorite when reconciling conflicts between the source and the destination system. Possible values for favorite are:

src

Favor the source system.

dst

Favor the destination system.

old

Favor the older version of the file.

new

Favor the newer version of the file.


You can use -f and -o together if they both specify the same preference (src or dst). If they conflict, -f is ignored.


-h

Quit (halt) upon encountering an error. Normally filesync continues after errors and attempts to synchronize as many files as possible.


-m

Make sure that both copies of the file have the same modification time.


-n

Dry run option. Do not change any files and do not update the .packingrules file.


-o origin

One way change. Changes are propagated only from the system specified by origin, which is either src or dst, to the other system.

You can use -n and -o together on a disconnected nomadic system to see what changes have been made since the last time files were synchronized.


-q

Quiet operation. Suppress the normal report of actions that are being taken.


-r dir

Synchronize only the files in directory dir. Repeat this option to synchronize multiple directories.


-s srcdir

Use srcdir as the source directory from which new files should be synchronized. Use together with -d and a filename operand.


-v

Verbose; display additional information about each file comparison.


-y

Assume a "yes" answer to any safety checks, effectively bypassing the checks. Useful if the server has changed to a different mount point and you're sure you know what you're doing when you synchronize; see the filesync(1) manpage for more information.

gpatch

     gpatch [options] [original [patchfile]]

This is Sun's version of GNU patch. On Solaris, /usr/bin/patch is a much older version of Larry Wall's original patch program. The GNU version is more functional and is generally recommended. For backwards compatibility, the original patch is left in place, and this version is provided for those who want it. For more information, see patch in the earlier section "Alphabetical Summary of Common Commands."

keylogin

     keylogin [-r]

Prompt user for a password, then use it to decrypt the person's secret key. This key is used by secure network services (e.g., Secure NFS, NIS+). keylogin is needed only if the user isn't prompted for a password when logging in. The -r option updates /etc/.rootkey. Only a privileged user may use this option. See also chkey and keylogout.

keylogout

     keylogout [-f]

Revoke access to (delete) the secret key used by secure network services (e.g., Secure NFS, NIS+). See also chkey and keylogin.

Option


-f

Forget the root key. If specified on a server, NFS security is broken. Use with care.

line

     line

Read the next line from standard input and write it to standard output. Exit status is 1 upon EOF. Typically used in csh scripts to read from the terminal.

Example

Print the first two lines of output from who :

     who | ( line ; line )

listusers

     listusers [options]

List all users, optionally just by group, or by specific users.

Options


-g grouplist

List all users in the comma-separated list of groups grouplist.


-l users

List just the named users, sorted by login. A comma-separated list may also be provided.

mac

     mac [-v] -a algorithm [file ...]     mac -l

Compute a PKCS#11 message authentication code (MAC) of the given files. The second form lists the available MAC algorithms. See also decrypt, digest, and encrypt.

Options


-a algorithm

Use algorithm to compute the MAC. This option is required. Values for algorithm are des_mac, sha1_hmac, and md5_hmac.


-k keyfile

Read the encryption key from keyfile, instead of prompting for it.


-l

Used by itself to list available MAC computation algorithms.


-v

Be verbose.

Examples

Show available MAC algorithms:

     $ mac -l     Algorithm       Keysize:  Min   Max (bits)     ------------------------------------------     des_mac                    64    64     sha1_hmac                   8   512     md5_hmac                    8   512

Generate a MAC for an encrypted version of a trade-secret document:

     $ mac -a md5_hmac designdoc.txt.aes     Enter key:     277f71848afe07ccbd78bee3bfdf11b8

mount

     mount [options] mount_spec ...

System administration command. Mount a filesystem on a directory. Solaris understands several different kinds of local (hard disk) filesystem structures, as well as supporting network mounts of NFS filesystems and SMB shares. Filesystems and the directories on which to mount them are listed in /etc/vfstab, along with options for each mount. The file /etc/mnttab records which filesystems are actually mounted.

Along with general options, each filesystem may have options specific to it. When run with no options, mount prints the list of currently mounted filesystems.

The mount_spec may be either a special file (block device) or mount point listed in /etc/vfstab, in which case it's mounted. Otherwise, you must supply both the device name and the directory on which to mount it. See the Examples.

Options


-a

Mount all filesystems of the given type. With no type or mount points, attempt to mount every filesystem in /etc/vfstab with yes in the "mount at boot" field.


-F type

The filesystem is of type type. Useful types are ufs for the native Unix filesystem format, pcfs for FAT-32 filesystems, cifs for SMB shares, hsfs (High Sierra filesystem) for ISO 9660 CD-ROMs, and nfs for Sun's Network Filesystem.


-g

Mount the filesystem globally, across all clusters. No effect on nonclustered systems.


-m

Mount the filesystem without making an entry in /etc/mnttab.


-o options

Supply options for the mount. Multiple options should be comma separated. Following is a list of options supported directly by mount. Each filesystem may have additional options.


devices, nodevices

Allow (disallow) the use of device special files on this filesystem.


exec, noexec

Allow (disallow) the execution of programs on the filesystem. The default is exec.


nbmand, nonmbmand

Allow (disallow) nonblocking mandatory locking. The default is to disallow it. Enabling this option may cause surprising behavior from applications not expecting non-blocking semantics. Do not use for /, /usr, and /var. Mutually exclusive with -g.


ro, rw

Mount the filesystem read-only (read-write). The default is read-write. Use ro for read-only media such as CD-ROMs or DVD-ROMs.


setuid, nosetuid

Allow (disallow) execution of setuid and setgid executables.


suid, nosuid

The nosuid option is equivalent to nosetuid,nodevices, and is highly recommended for NFS filesystems mounted with the root= option. suid is thus equivalent to setuid,devices.


-O

Overlay mount. This allows mounting one filesystem on the pre-existing mount point of another filesystem. The pre-existing mount point's files then become inaccessable. Without -O, such a mount is an error.


-p

Print the list of mounted filesystems in the same format as /etc/vfstab. Must be used by itself.


-r

Mount the filesystem read-only.


-v

Print the list of mounted filesystems in verbose format. Must be used by itself.


-V

Verify. mount prints out what it would do, without actually attempting the mount. This may include the invocation of subsidiary, filesystem-specific mount commands.

Examples

Mounting is usually restricted to privileged users. Here, # is the prompt for the root, the superuser.

Mount a local filesystem. The type is assumed to be ufs:

     # mount /dev/dsk/c0d0s4 /opt

Mount a FAT-32 filesystem:

     # mount -F pcfs /dev/dsk/c0d1s2 /pcfs

Mount a remote NFS filesystem. The host:file format of the device indicates that the filesystem is of type NFS:

     # mount server.example.com:/bigdisk /bigdisk

nawk

     nawk [options] ['program'] [files] [variable=value]

New version of awk, with additional capabilities. nawk is a pattern-matching language useful for manipulating data. /usr/xpg4/bin/awk should be used in preference to /usr/bin/nawk. See Chapter 11 for more information on the awk language.

openwin

     /usr/openwin/bin/*

Programs from the OpenWindows graphical user interface environment. This environment is obsolete; the preferred environments are CDE (the Common Desktop Environment) and GNOME, and you can no longer run OpenWindows directly. However, for compatibility, many OpenWindows programs continue to be shipped with Solaris . The user level programs such as cmdtool and shelltool are no longer present, although a number of standard X11 programs are to be found in this directory. See also cde.

Useful OpenWindows Commands

The following OpenWindows commands may be of interest. Look at the manpages for more information:

oclock

A round clock

xbiff

Graphical mail arrival watchdog program

xcalc

Simple on-screen calculator

xditview

Device-independent troff output viewer

xedit

Simple text editor

xhost

Controls permissions for who can connect to display

xload

System load monitor

xlock

Screen saver/locker

xmag

Magnifies portions of the display

xman

Viewer for manpages

xterm

Standard X Window system terminal emulator


page

     page [options] [files]

Same as more.

ps

     ps [options]

Report on active processes. In options, list arguments should either be separated by commas or put in double quotes. In comparing the amount of output produced, note that -e > -d > -a and -l > -f. In the BSD version (/usr/ucb/ps), options work much differently; you can also display data for a single process.

Options


-a

List all processes except group leaders and processes not associated with a terminal.


-A

Same as -e.


-c

List scheduler data set by priocntl (an administrative command).


-d

List all processes except session leaders.


-e

List all processes.


-f

Produce a full listing.


-g list

List data only for specified list of group leader ID numbers (i.e., processes with same ID and group ID).


-G list

Show information for processes whose real group ID is found in list.


-j

Print the process group ID and session ID.


-l

Produce a long listing.


-L

Print information about lightweight processes.


-n file

Use the alternate file for the list of function names in the running kernel (default is /unix). Accepted for compatibility, but ignored.


-o format

Customize information according to format. Rarely used.


-p list

List data only for process IDs in list.


-P

Print the processor number on which the process or lightweight process is bound.


-s list

List data only for session leader IDs in list.


-t list

List data only for terminals in list (e.g., tty1).


-u list

List data only for usernames in list.


-U uidlist

Show information for processes whose real user ID is found in list.


-y

With -l, omit the F and ADDR columns and use kilobytes instead of pages for the RSS and SZ columns.


-z zonelist

List only processes in the zones in zonelist. Zones may be given using either the zone name or the zone ID. This option is useful only if ps is run in the global zone.


-Z

Add an additional ZONE output column showing the zone for each process.

rksh

     rksh [options] [arguments]

Restricted version of ksh (the Korn shell), used in secure environments. rksh prevents you from changing out of the directory or from redirecting output. See Chapter 4.

setpgrp

     setpgrp command [argument ...]

Become a session leader by setting the process group ID and the session ID to the current process ID, and then using exec(2) to run the named command and arguments.

sotruss

     sotruss [options] program [args ...]

Shared object library version of truss. sotruss executes program, passing it args, if any. It then traces calls into and/or out of shared object libraries that are loaded dynamically. See also truss and whocalls.

Options


-f

Follow children created by fork(2) and print output for each child. Each output line contains the process's process ID.


-F fromlist

Only trace calls from the libraries named in fromlist, which is a colon-separated list of libraries. The default is to trace only calls from the main executable.


-o file

Send output to file. If used with -f, the process ID of the running program is appended to the filename.


-T tolist

Only trace calls to routines in the libraries named in tolist, which is a colon-separated list of libraries. The default is to trace all calls.

timex

     timex [options] command [arguments]

Execute a command with optional arguments and print information similar to the time command. Report process data with various options.

Options


-o

Show total number of blocks and characters used.


-p suboptions

Show process accounting data with possible suboptions.


-s

Show total system activity.

Suboptions for -p


-f

Include fork/exec flag and system exit status.


-h

Show "hog" factor (fraction of CPU time used) instead of mean memory size.


-k

Show total kcore-minutes instead of memory size.


-m

Show mean core size (this is the default behavior).


-r

Show CPU use percentage (user time / (system time + user time)).


-t

Show user and system CPU times.

truss

     truss [options] arguments

Trace system calls, signals, and machine faults while executing arguments. arguments is either a Unix command to run or, if -p is specified, a list of process IDs representing the already running processes to trace. The options -m, -r, -s, -t, -v, -w, and -x accept a comma-separated list of arguments. A ! reverses the sense of the list, telling truss to ignore those elements of the list during the trace. (In the C shell, use a backslash before !.) The keyword all can include/exclude all possible elements for the list. The optional ! and corresponding description are shown in brackets. truss also provides tracing of user-level function calls in dynamically loaded shared libraries. See also sotruss and whocalls.

This command is particularly useful for finding missing files when a third-party application fails. By watching the access and open system calls, you can find where, and which, files the application program expected to find, but did not.

Many systems have similar programs named trace or strace. These programs are worth learning how to use.

Options


-a

Display parameters passed by each exec(2) call.


-c

Count the traced items and print a summary rather than listing them as they happen.


-d

Print a timestamp in the output, of the form seconds.fraction, indicating the time relative to the start of the trace. Times are when the system call completes, not starts.


-D

Print a delta timestamp in the output, of the form seconds.fraction, indicating the time between events (i.e., the time not inside system calls).


-e

Display values of environment variables passed by each exec (2) call.


-E

Print a delta timestamp in the output, of the form seconds.fraction, indicating the time between the beginning and end of a system call. This is the opposite of the -D option.


-f

Follow child processes. Useful for tracing shell scripts.


-i

List sleeping system calls only once, upon completion.


-l

Show the lightweight process ID for a multithreaded process.


-m[! ]faults

Trace [exclude from trace] the list of machine faults. faults are names or numbers, as listed in <sys/fault.h> (default is -mall -m!fltpage).


-M[! ]faults

When the traced process receives one of the named faults, truss leaves the process in a stopped state and detaches from it (default is -M!all). The process can subsequently be attached to with a debugger, or with another invocation of truss using different options.


-o outfile

Send trace output to outfile, not standard error.


-p pidlist

Trace one or more running processes instead of a command. Use pid/lwp to trace a lightweight process (thread).


-r[! ]file_descriptors

Display [don't display] the full I/O buffer of read system calls for file_descriptors (default is -r!all).


-s[! ]signals

Trace [exclude from trace] the list of signals. signals are names or numbers, as listed in <sys/signal.h> (default is -sall).


-S[! ]signals

When the traced process receives one of the named signals, truss leaves the process in a stopped state and detaches from it (see -M; default is -S!all).


-t[! ]system_calls

Trace [exclude from trace] the list of system_calls. system_calls are names or numbers, as listed in Section 2, "System Calls," of the UNIX Programmer's Reference Manual (see intro(2)); default is -tall.


-T[! ]system_calls

When the traced process executes one of the named system calls, truss leaves the process in a stopped state and detaches from it (see -M; default is -T!all).


-u[! ]lib,...:[: ][! ]func,...

Trace user-level function calls, not just system calls. lib is a comma-separated list of dynamic library names, without the .so.n suffix. func is a comma-separated list of names. Shell wildcard syntax may be used to specify many names. (Such use should be quoted to protect it from expansion by the shell.) The leading ! indicates libraries and/or functions to exclude. With :, only calls into the library from outside it are traced; with ::, all calls are traced.


-U[! ]lib,...:[: ][! ]func,...

When the traced process executes one of the named user-level functions, truss leaves the process in a stopped state and detaches from it (see -M).


-v[! ]system_calls

Verbose mode. Same as -t, but also list the contents of any structures passed to system_calls (default is -v!all).


-w[! ]file_descriptors

Display [don't display] the full I/O buffer of write system calls for file_descriptors (default is -w!all).


-x[! ]system_calls

Same as -t, but display the system call arguments as raw code (hexadecimal; default is -x!all).

Examples

Trace system calls access( ), open( ), and close( ) for the lp command:

     truss -t access,open,close lp files 2> truss.out

Trace the make command, including its child processes, and store the output in make.trace :

     truss -f -o make.trace make target

umount

     umount [options] device | mount_point

System administration command. Unmount a mounted filesystem. device is a device name or other string indicating what is mounted. A mount_point is the name of a directory on which a device or other special object is mounted. See also mount.

Options


-a

May be used with multiple arguments to cause umount to attempt to do the unmounts in parallel.


-f

Force the unmounting of the filesystem. This option can be dangerous, use with caution.


-o options

Provide filesystem-specific options in options. This is unusual when unmounting a filesystem. See mount for a list of options.


-V

Verify. umount prints out what it would do, without actually attempting the unmount. This may include the invocation of subsidiary, filesystem-specific unmount commands.

vacation

     vacation     vacation [options] [user]

Automatically return a mail message to the sender announcing that you are on vacation.

Use vacation with no options to initialize the vacation mechanism. The process entails several steps.

  1. Create a .forward file in your home directory. The .forward file contains:

             \user, "|/usr/bin/vacation user"

  2. user is your login name. The action of this file is to actually deliver the mail to user (i.e., you), and to run the incoming mail through vacation. Add any appropriate options to the vacation command line.

  3. Create the .vacation.pag and .vacation.dir files. These files keep track of who has sent you messages, so that they only receive one "I'm on vacation" message from you per week.

  4. Start an editor to edit the contents of .vacation.msg. The contents of this file are mailed back to whoever sends you mail. Within its body, $SUBJECT is replaced with the contents of the incoming message's Subject: line. You should include at least a Subject: header line of your own, such as:

             Subject: I am out of the office until next Wednesday

Remove or rename the .forward file to disable vacation processing.

You may also create a .vacation.filter file that specifies email addresses and/or domains to which vacation will send messages. Addresses that don't match will not receive a vacation message. Case is ignored in the .vacation.filter file, as are empty lines and lines beginning with #.

Options

The -a, -e, -f, -j, -m, -s, and -t options are used within a .forward file; see the Example.


-a alias

Mail addressed to alias is actually mail for the user and should produce an automatic reply.


-e file

Use file as the filter file, instead of .vacation.filter.


-f file

Use file as the base name for the database files (.pag and .dir) instead of .vacation.


-I

Reinitialize the .vacation.pag and .vacation.dir files. Use this right before leaving for your next vacation.


-j

Do not verify that user appears in the To: or Cc: headers.


-m file

Use file in $HOME as the text of the automatic reply, instead of ~/.vacation.msg.


-s sender

Send replies to sender instead of to the address listed in the Unix "From" line of the incoming mail.


-t interval

By default, no more than one message per week is sent to any sender. This option changes that interval. interval is a number with a trailing s, m, h, d, or w indicating seconds, minutes, hours, days, or weeks, respectively.

Example

Send no more than one reply every three weeks to any given sender:

     $ cd     $ vacation -I     $ cat .forward     \jp, "|/usr/bin/vacation -t3w jp"     $ cat .vacation.msg     From: jp@wizard-corp.com (J. Programmer, via vacation)     Subject: I'm out of the office ...     Hi. I'm off on a well-deserved vacation after finishing     up whizprog 2.0. I will read and reply to your mail     regarding "$SUBJECT" when I return.     Have a nice day,     JP

volcheck

     volcheck [options] [pathnames]

Check one or more devices named by pathnames to see if removable media has been inserted. The default is to check every device being managed by volume management. Most often used with floppies; volume management usually notices when CD-ROMs or DVD-ROMs have been inserted.

Note: use of the -i and -t options, particularly with short intervals, is not recommended for floppy-disk drives.

Options


-i nsec

Check the device(s) every nsec seconds. The default is every two seconds.


-t nsecs

Keep checking over the next nsecs seconds. Maximum nsecs is 28,800 (eight hours).


-v

Be verbose.

whocalls

     whocalls [options] function program [arguments ...]

Run program with the given arguments. Using facilities of the dynamic loader show which functions call the named function. See also sotruss and truss.

Options


-l wholib

Use wholib instead of the standard who.so Link-Auditing library.


-s

Use the .symtab symbol table in the ELF file for local symbol tables instead of the default .dynsym symbol table. This is more expensive but can provide more detailed stack tracing information.

Example

Show use of write(2) system call:

     $ cat dontpanic.c                         Show program code     #include <unistd.h>     int main(void)     {             (void) write(1, "Don't panic!\n", 13);             return 0;     }     $ cc dontpanic.c -O -o dontpanic         Compile program     $ whocalls write dontpanic               Run with whocalls     write(0x1, 0x80506cc, 0xd)              Output from whocalls             /export/u/guest/arnold/dontpanic:main+0x14             /export/u/guest/arnold/dontpanic:_start+0x7a     Don't panic!                            Output from dontpanic

     < Day Day Up > 


    Unix in a Nutshell
    Unix in a Nutshell, Fourth Edition
    ISBN: 0596100299
    EAN: 2147483647
    Year: 2005
    Pages: 201

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net