The -ml option applies to list macros in the mm macro package.
Therefore, if this option is given, the -mm option is also turned on.
Though multiple -m options may be given, the last one given is the one that sets the macro package being used.
SEE ALSO
neqn(l), nroff(l), tbl(l).
2
163 REV MAR 1985
DF(1)
COMMAND REFERENCEDF(1)
NAME
df - disk free SYNOPSIS
df [ - i ] [ filesystem ... ][filename ... ]
DESCRIPTION
Of prints out the amount of free disk space available on the specified filesystem, e.g. "/dev/rpOa", or on the filesystem in which the specified file, e.g. "$HOME", is contained. If no file system is specified, the free space on all of the normally mounted file systems is printed. The reported numbers are in kilobytes.
There are two output formats. The following columns are listed normally:
Filesystem kbytes used avail capacity Mounted on The Filesystem column lists the name of the device for the filesystem, such as ldevlhpOa. The kbytes column lists the number of kilobytes on the device. The used column lists the number of kilobytes allocated to files. The avail column lists the number of kilobytes still available for files.
The capacity column lists the percentage of the filesystem space that is allocated. The Mounted on column lists the name of the root of the filesystem, such as I.
When the - i option is given, the following columns are also given:
iused ifree %iused
The iused column lists the number of inodes allocated. The ifree column lists the number of inodes still available. The %iused column lists the percentage of the total number of inodes that are allocated.
OPTIONS
- i Causes df to also report the number of inodes used and free.
EXAMPLES
FILES
The following example prints a report of the free and used disk space and inodes in the file system /tmp.
df -i /tmp
letclfstab letclmtab
File containing the list of normally mounted filesystems.
File containing the mounted filesystem table.
REV MAR 1985 164
DF(1)
COMMAND REFERENCEDF(1)
RETURN VALUE
[NO_ERRS] Command completed without error.
[USAGE] Incorrect command line syntax. Execution terminated.
[NP _WARN] An error warranting a warning message occurred.
Execution continues.
[P _WARN] A system error occurred. Execution continues. See intro(2) for more information on system errors.
[P _ERR] A system error occurred. Execution terminated. See intro(2) for more information on system errors.
CAVEATS
The capacity of a file system can be reported as more than 100%
because swap space may be being used. The swap space is not normally included in the statistics.
SEE ALSO
fstab(5), mtab(5), icheck(8), quot(8).
2
165 REV MAR 1985
DIFF(1) COMMAND REFERENCE DIFF(1)
NAME
diff - differential file and directory comparator SYNOPSIS directories by name, and then runs the regular file diff algorithm (described below) on text files which are different. Binary files which differ, common subdirectories, and files which appear in only one directory are listed.
In the second and third forms, and when comparing text files which differ during directory comparison, diff tells what lines must be changed in the files to bring them into agreement. Except in rare circumstances, diff finds a smallest sufficient set of file differences. If neither filel nor file2 is a directory, then either may be given as '-', in which case the standard input is used. If filel is a directory, then a file in that directory whose file-name is the same as the file-name of file2 is used (and vice versa).
There are several options for output format; the default output format contains lines of these forms:
nl a n3,n4 nl,n2 d n3 nl,n2 c n3,n4
These lines resemble ed commands to convert file I into file2. The numbers after the letters pertain to file2. In fact, by exchanging 'a' for 'd' and reading backward one may ascertain equally how to convert file2 into filel. As in ed, identical pairs where nl = n2 or n3 = n4 are abbreviated
Options when comparing directories are:
-1 Long output format; each text file diff is piped through pr(1) to paginate it, other differences are remembered and summarized after all text file differences are reported.
-r Causes application of diff recursively to common subdirectories encountered.
-s
Causes diff to report files which are the same, which are otherwise not mentioned.-Sfilename
Starts a directory diff in the middle beginning with filename.
REV MAR 1985 166
DIFF(1)
COMMAND REFERENCEDIFF(1)
output format is modified slightly: the output beginning with identification of the files involved and their creation dates and then each change is separated by a line with a dozen *'s. The lines ancestral file ($1) and a chain of version-to-version ed scripts ($2,$3, ... ) made by diff need be on hand. A 'latest version' appears on the standard output.\V'-1p' (shift; cat$*; echo '1,$p')
I
ed -$1Extra commands are added to the output when comparing directories with -e, so that the result is a sh(lsh) script for converting text files standard output, with C preprocessor controls included so that a compilation of the result without defining string is equivalent to compiling file I, while defining string will yield file2.
The following invocation performs the difference function on the files pgm.version1 and pgm.version2. The results are written on standard output.
diff pgm.versionl pgm.version2
2
167 REV MAR 1985
DIFF(1)
COMMAND REFERENCEDIFF(1)
FILES
ltmpld?????
lusrllibldiffh
Temporary files
half-hearted (-h) diff function RETURN VALUE
Incorrect command line syntax. Execution terminated.
An error warranting a warning message occurred.
Execution continues.
An error occurred that was not a system error. Execution terminated.
A system error occurred. Execution continues. See intro(2) for more information on system errors.
A system error occurred. Execution terminated. See intro(2) for more information on system errors.
An unexpected error occurred. Execution was
terminated. Record the message and save the core file for analysis. Contact service personnel at your Tektronix field office.
Editing scripts produced under the -e or - f option are naive about creating lines consisting of a single '. '.
When comparing directories with the -b option specified, diff first compares the files ala cmp(l), and then decides to run the diff algorithm
DIFF3(1)
COMMAND REFERENCEDIFF3(1)
NAME
diff3 - 3-way differential file comparison SYNOPSIS
diff3 [ -{e,x,3} ] filel file2 file3 DESCRIPTION
Diff3 compares three versions of a file, and publishes disagreeing ranges of text flagged with these codes:
all three files differ
= = = = 1
file 1 is different
= = = =2
file2 is different
= = = =3
file3 is different
The type of change suffered in converting a given range of a given file to some other is indicated in one of these ways:
f:
nl aText is to be appended after line number nl in file f, where
f
= 1, 2, or 3.f:
nl , n2 cText is to be changed in the range line nl to line n2. If nl = 112, the range may be abbreviated to n 1.
The original contents of the range follows immediately after a c indication.
When the contents of two files are identical, the contents of the lower-numbered file is suppressed.
OPTIONS
The following options are mutually exclusive:
-e Publishes a script for the editor ed that will incorporate into file I all changes between file2 and file3, i.e. the changes that normally would be flagged = = = = and = = = = 3.
-x Produces a script to incorporate only changes flagged =
= = = .
Thefollowing command will apply the resulting script to file 1.
(cat script; echo '1,$p') I ed - filel
-3 Same as -x except that it works on changes flagged =
= = =
3.EXAMPLES
The following example will print on standard out a script for ed that will incorporate into verl all the changes flagged
= =
==.
diffJ -x verl ver2 verJ
169 REV MAR 1985
DIFF3(1)
FILES
ltmpld3?????
/usrllibldiff3 RETURN VALUE
[NO_ERRS]
[USAGE]
[P _ERR]
[INTERNAL]
CAVEATS
COMMAND REFERENCE
Temporary data file.
Output formatter.
Command completed without error.
DIFF3(1)
Incorrect command line syntax. Execution terminated.
A system error occurred. Execution terminated. See intro(2) for more information on system errors.
An unexpected error occurred. Execution was
terminated. Record the message and save the core file for analysis. Contact service personnel at your Tektronix field office.
Text lines that consist of a single '.' will defeat -e.
SEE ALSO
diff(J), rcsdiff(lrcs).
2
REV MAR 1985 170
DIFFMK(1)
COMMAND REFERENCEDIFFMK(1)
NAME
diffmk - mark differences between files SYNOPSIS
diffmk namel name2 [ name3 ]
DESCRIPTION
Diffmk compares two versions of a file and creates a third file that includes "change mark" commands for nroff. Namel and name2 are the old and new versions of the file. name2 may be given as '-', which will cause diffmk to read from the standard input. namel may not be
specified as '-'. Diffmk generates name3, if it exists, which contains the lines of name2 plus inserted formatter "change mark" (.me) requests. If name3 was not specified the result is placed on standard out. When name3 is formatted, changed or inserted text is shown by
I
at the right margin of each line. The position of deleted text is shown by a single *.If anyone is so inclined, diffmk can be used to produce listings of C (or other) programs with changes marked. A typical command line for such use is:
diffmk old.c new.c ) diff .nr nroff macs diff.nr
where the file macs contains:
.pl 1 .11 77 .nf .eo .nc
The .II request might specify a different line length, depending on the nature of the program being printed. The .eo and .nc requests are probably needed only for C programs.
If the characters I and
*
are inappropriate, a copy of diffmk can be edited to change them (diffmk is a shell procedure).EXAMPLES
The following example generates a file changes which contains the differences between source.nr and newsource.nr marked with change bars.
diffmk source.nr newsource.nr diff .nr nroff diff.nr ) changes
171 REV MAR 1985
DIFFMK(1)
COMMAND REFERENCEDIFFMK(1)
RETURN VALUE
[NO_ERRS] Command completed without error.
[USAGE] Incorrect command line syntax. Execution terminated.
[NP _ERR] An error occurred that was not a system error. Execution terminated.
CAVEATS
The input files are expected to be nroff(l) input. Other types of input, including formatted text, require special macros similar to those required for C source.
Incorrect output may be generated when diffmk is used at the beginning of a pipe. It is therefore recommended that the output from diffmk be put in a file before formatting.
Aesthetic considerations may dictate manual adjustment of some output.
File differences involving only formatting requests may produce undesirable output, i.e., replacing .sp by .sp 2 will produce a "change mark" on the preceding or following line of output.
SEE ALSO
diff(l), nroff(l).
2
REV MAR 1985 172
DIRCMP(1)
COMMAND REFERENCEDIRCMP(1)
NAME
dircmp - directory comparison SYNOPSIS
dircmp [ -d ] [ -s ] dir I dir2 DESCRIPTION
Dircmp examines dirl and dir2 and generates various tabulated
information about the contents of the directories. Listings of files that are unique to each directory are generated for all the options. If no option is entered, a list is output indicating whether the filenames common to both directories have the same contents.
-d Compare the contents of files with the same name in both directories and output a list telling what must be changed in the two files to bring them into agreement. The list format is described in diff(1 ).
-s Suppress messages about identical files.
SEE ALSO
cmp(l), diff(l).
173 REV MAR 1985
DIRNAME(1)
COMMAND REFERENCEDIRNAME(1)
NAME
dirname - deliver directory portion of path name SYNOPSIS
dirname path DESCRIPTION
Dirname delivers all but the last level of the path name in path.
EXAMPLES
The following example will set the shell variable NAME to the name of the directory which contains the command 'sh'.
NAME='dirname \'pathof sh\
Note the use of pathof to get the full pathname of the command, and the use of escaped backquotes to allow two levels of command substitution.
CAVEATS
The dirname of a file name with no slashes is considered to be '. '. For example,
dirname f oo prints'.'.
SEE ALSO
basename(l), pathof(l), sh(lsh).
REV MAR 1985
174
DIRS(1 CSH)
COMMAND REFERENCEDIRS(1CSH)
Csh maintains the name current directory and a directory stack which can be used to keep up with all of the places the user has been and may wish to go back to. With this, the user does not have to remember where to go back to when sidetracked.
The command cd, and its synonym chdir, change the current working directory of the shell. If no argument is given, the directory is changed to the user's home directory. If dirname begins with '/', './', or' . ./', an attempt is made to change to that directory. Otherwise, the directory dirname is searched for in the current directory and in each element of number (beginning at 0), the n'th element of the directory stack is moved from that position to the top of the stack. The contents of the directory stack is always printed upon completion.
The command pushd is used to add directory names to the directory stack, and to edit the stack, as well as change the current directory. With no arguments, pushd exchanges the top two elements of the directory stack. With a directory name argument, the directory is changed, and the name of the new current directory is pushed on to the stack. With the argument +n, where n is a number (beginning at 0), the n'th element of the directory stack is moved from that position to the top of the stack.
The contents of the directory stack is always printed upon completion.
REV SEP 1985
175
DIRS(1CSH)
COMMAND REFERENCEDIRS(1 CSH)
The command popd is used to remove elements from the directory stack.
With no arguments, the top element of the stack is removed, resulting in changing the current working directory. With the argument +n, where n is a number (numbers begin at 0, but '+ O' is not valid}, the n'th element of the directory stack is removed. In the latter use, the current directory is unchanged. The contents of the directory stack is always printed upon completion.
The command dirs prints the contents of the directory stack in order.
The top element (which is the current directory) is printed first.
The variable cdpath contains a list of directories to search if the directory name given is not a subdirectory of the current directory. This variable is maintained along with the environment variable CDPATH, which is used by the sh(lsh) cd command, but these variables are not the same. In of directory to get the current directory path by calling getwd(3c), which will give the correct path. This makes directory changes somewhat slower. An alternate method is to use the command pwd(l) to get the correct current directory path when needed.
EXAMPLES
This example shows a use of the directory name variable.
set default=/
set cdpath=( - -/*
cd default
In this case, if there is no directory named 'default' in the current directory, the user's home directory, and any subdirectories of the user's home directory, the current directory will become '/'.
The following example shows some of the features of manipulation of the directory stack. Here, the character '%' represents the csh prompt.
DIRS(1CSH)
VARIABLES
%
pushd /etc /etc /bin-%
cd /usr%
dirs /usr /bin%
pushd +2 - /usr /bin%
popd +2 - /usr%
popd /usrCOMMAND REFERENCE
CDPATH The directory change search path.
RETURN VALUE
[NO_ERRS] Command completed without error.
DIRS(1 CSH)
[1] An error of the type described in the error message occurred.
CAVEATS
Shell scripts should never change to a subdirectory and attempt to go back by executing cd .. , since the directory changed to may be a symbolic link to another directory whose parent directory is different from where the last cd was executed. At the very least, the cwd variable's value should be saved and used to go back.
SEE ALSO
@(lcsh), alias(lcsh), bg(lcsh), break(lcsh), cd(lsh), chdir(lsh), continue(lcsh), csh(lcsh), echo(Jcsh), eval(lcsh), exec(Jcsh), exit(lcsh), fg(l csh), glob(l csh), goto(l csh), hashstat(l csh), history(l csh), jobs(l csh), kill(lcsh), limit(lcsh), logout(Jcsh), nice(lcsh), nohup(lcsh), notify(lcsh), onintr(lcsh), rehash(lcsh), repeat(lcsh), set(lcsh), setenv(lcsh), sh(lsh), shift(l csh), source(l csh), stop(l csh), suspend(l csh), time(l csh), umask(l csh), unhash(lcsh), unalias(lcsh), unlimit(lcsh), unset(lcsh), unsetenv(lcsh), wait(lcsh), which(lcsh), chdir(2).
REV SEP 1985 3
177
DIST(1 MH)
COMMAND REFERENCEDIST(1 MH)
NAME
dist - redistribute a message to additional addresses SYNOPSIS original address list. The file !Mailldistcomps, or a standard form, or the file specified by the option -form formfile is used as the blank
components file and prepended to the message. The standard form has the components Resent-to: and Resent-cc:. When the message is sent, the components Resent-Date: date and Resent-From: name are also prepended to the message. If you specify the -msgid option to send , the component Resent-msgid: is prepended to the message.
Dist uses the following components from the user's mh_profile file:
Path: determines the user's MH directory
Editor: overrides the use of lbinled as the default editor
lasteditor-next: defines editor to be used after exit from lasteditor
OPTIONS
Annotation is done in place to preserve links to the annotated message.
-editor editor
Specifies an editor other than the default editor.
+folder folder
Folder becomes the current folder, and the current message is set to the message you are redistributing.
DEFAULTS
FILES
+folder defaults to the current folder msg defaults to cur
DIST(1 MH)
COMMAND REFERENCEDIST(1 MH)
$HOME/mh_profile The user profile
(mh-dir)ldraft The default message file CAVEATS
Only those addresses in Resent-To: , Resent-cc: , and Resent-Bee:
are sent. Also, the folder specified in the component Resent-Fee: folder is not honored.
Send recognizes a message as a redistribution message by the existence of the field Resent-To: , so do not try to redistribute a message with only a Resent-cc: component.
SEE ALSO mh(5mh).
2
179 REV MAR 1985
DTOC(1G)
COMMAND REFERENCEDTOC(1G)
NAME
dtoc - directory table of contents SYNOPSIS
dtoc [ directory ] DESCRIPTION
Output is a list of all readable subdirectories beginning at directory. If no directory is given, the list begins at the current directory.
The output is in the form of a textual table of contents readable by vtoc(lg). Each line of the output represents a single directory. Each line has three fields: level number, directory name, and the number of ordinary readable files in the directory.
EXAMPLES
The following example makes a visual display on a Tektronix terminal of all the readable directories under the user's home directory.
dtoc $HOME
l
vtoc : td SEE ALSOabs(lg), af(lg), bar(lg), bel(lg), bucket(lg), ceil(lg), cor(lg), cusum(lg), cvrtopt(lg), erase(lg), exp(Jg), find(l), floor(lg), gamma(lg), gas(lg), gd(lg), ged(lg), graphics(lg), gtop(lg), hardcopy(Jg), hilo(lg), hist(lg), hpd(J g), intro(l g), label(l g), list(l g), log(l g), lreg(l g), mean(l g), mod(l g), pair(lg), pd(lg), pie(lg), plot(lg), point(lg), power(lg), prime(lg), prod(Jg), ptog(lg), qsort(lg), quit(lg), rand(lg), rank(lg), remcom(lg), root(lg),
round(I g), siline(I g), sin(I g), subset(l g), td(l g), tekset(l g), title(l g), total(lg), ttoc(lg), var(lg), vtoc(lg), whatis(lg), yoo(lg), and gps(5g).
180
DU(1)
COMMAND REFERENCEDU(1)
NAME
du - summarize disk usage SYNOPSIS
du [ -a ] [ - r ] [ -s ] [filename .. . ] DESCRIPTION
Du gives the number of kilobytes contained in all files and (recursively) directories within each specified filename, if filename is a directory. If a filename argument is a regular file, the size of the file will be given only if one or more options is given. The count includes the indirect blocks of the file. If filename is missing, '.' is used.
Absence of an option causes an entry to be generated for each directory only.
OPTIONS
-a
Causes an entry to be generated for each file.- r Messages will be generated when directories cannot be read, files cannot be opened, etc.
-s Causes only the grand total to be given.
EXAMPLES
The following invocation gives the total disk usage for the directory ltmp.
du -s /tmp RETURN VALUE
[NO_ERRS] Command completed without error.
[USAGE] Incorrect command line syntax. Execution terminated.
[P _WARN] A system error occurred. Execution continues. See intro(2) for more information on system errors.
[P _ERR] A system error occurred. Execution terminated. See intro(2) for more information on system errors.
CAVEATS
Non-directories given as arguments (not under -a option) are not listed.
A file with two or more links is only counted once unless there are greater than 1024 distinctly linked files. The 1025th linked file encountered and all subsequent linked files are counted multiply.
Files with holes in them will get an incorrect block count.
SEE ALSO
df(J), lseek(2), quot(B).
REV SEP 1985
181
E ( 1 )
COMMAND REFERENCE E(1) superset of ed, with the most notable extension being a display editing facility. Display based editing is the focus of vi.If you have not used ed, or are a casual user, you will find that the editor edit is convenient for you. It avoids some of the complexities of ex used mostly by systems programmers and persons very familiar with ed.
If you have a CRT terminal, you may wish to use a display based editor; in this case see vi(1), which is a command which focuses on the display
If you have a CRT terminal, you may wish to use a display based editor; in this case see vi(1), which is a command which focuses on the display