• Aucun résultat trouvé

Last change: 2 October 1989 Sun Release 4.1

Dans le document Reference sun® (Page 84-93)

COLCRT( 1)

USER COMMANDS

COLCRT(I)

NAME

colcrt - filter nroff output for a terminal lacking overstrike capability SYNOPSIS

colcrt [ - ] [ -2]

[filename ... ]

DESCRIPTION

colcrt provides virtual half and reverse LINEFEED sequences for terminals without such capability, and on which overstriking is destructive. Half LINEFEED characters and underlining (changed to dashing '-') are placed on new lines in between the normal output lines.

OPTIONS

Suppress all underlining - especially useful for previewing

aI/boxed

tables from thl(I).

-2 Print all half LINEFEED characters, effectively double spacing the output. Normally, a minimal space output fonnat is used which suppresses empty lines. colcrt never suppresses two consecu-tive empty lines, however. The -2 option is useful for sending output to the line printer when the output contains superscripts and subscripts which would otherwise be invisible.

EXAMPLE

A typical use of colcrt would be

example% thl exum2.n

I

nroff -ms

I

colcrt -

I

more SEE ALSO

BUGS

col(1 V), more(l), nrofT(1), tbl(1), troff(l), ul(l) Cannot back tip more than 102 lines.

General overstriking is lost; as a special case '

I '

overstruck with ' - ' or underline becomes ' + '.

Lines are trimmed to 132 characters.

Some provision should be made for processing superscripts and subscripts in documents which are already double-spaced.

Sun Release 4.1 Last change: 9 September 1987 81

COLOREDIT ( 1 )

USER

COMMANDS COLOREDIT ( 1 )

NAME

coloredit - alter color map segment SYNOPSIS

coloredit A V AIL ABILITY

Available only on Sun 386i systems running a SunOS

4.0.x

release or earlier. Not a SunOS 4.1 release feature.

DESCRIPTION

coloredit is a SunView application for altering the colors of objects (windows) selected with the cursor.

These colors may be manipulated in three ways:

• select color name from a list

• specify the hue/saturation/value for a color

• specify the red/green/blue levels for a color USAGE

Window

The coloredit window consists of four sections.

colorlist

colorbars

palette

logo

An interactive window that lists the available colors for selection. This list can be scrolled up and down with a scrollbar, and comprises the contents of the .rgb file. Select a color and the corresponding RGB and HSV value appears in the colorbar section. coloredit first searches the working directory for .rgb, your home directory, and finally, lusr/lib this file.

An interactive window with two sets of three sliding bars. One set is for defining the hue saturation value of the color desired. The second set is for defining the red-green-blue ratios. The color can be specified using either set of sliding bars.

A display subwindow divided horizontally into two equal parts. The top part shows the background color; the bottom, the foreground color.

If

the object has more than 2 colors, all . the colors are shown. The background color is color Index #0. The color with the highest

Index Number is the foreground color.

A display subwindow containing the Sun logo in the currently-selected color.

Command Buttons

FILES

The set of command buttons in the colorbars subwindow is as follows.

Grab The next object selected will have its color map segment colors displayed in the

coloredit

win-dow. These colors may then be manipulated.

Release

Disassociates the colonnap segment and the last object with which those colors were associated.

The window returns to its default state.

Undo Returns the colormap segment to the original colors that the object being colored had when color-ing began. Returns the object to its original colors.

J.rgb -I.rgb lusr/lib/.rgb SEE ALSO

sunview(l)

82 Last change: 19 February 1988 Sun Release 4.1

COLRM(I) USER COMMANDS

NAME

colrm - remove characters from specified columns within each line SYNOPSIS

colrm [

starteol [ endeol ] ]

DESCRIPTION

COLRM(l)

colrm removes selected columns from a text file. The text is taken from standard input and copied to the standard output with the specified columns removed.

If only

starteol

is specified, the columns of each line are removed starting with

starteol

and extending to the end of the line. If both

startcol

and

endeol

are specified, all columns between

starteol

and

endeol,

inclusive, are removed.

Column numbering starts with column 1.

SEE ALSO

expand(l)

Sun Release 4.1 Last change: 9 September 1987 83

COMM(l) USER COMMANDS

NAME

comm - display lines in common, and lines not in common, between two sorted lists SYNOPSIS

comm [ -11-21 -31-121-131-23 ] filenamel filename2 DESCRIPTION

COMM(I)

comm reads filenamel andfilename2, which should be ordered in Asen collating sequence (see sort(1 V)).

and produces three-column output when no options are specified:

• Column 1 contains lines that occur only infilenamel.

• Column 2 contains lines only infilename2.

• Column 3 contains lines common to both files.

The filename '-' means the standard input.

OPTIONS

The following options can be used to suppress the indicated columns from display. You can specify '-123' , but doing so suppresses all output.

-1 Suppress column 1; omit lines only infilenamel.

-2 Suppress column 2; omit lines only infilename2.

-3 Suppress column 3; omit lines common to both files.

-12 Suppress columns 1 and 2; only show lines common to both files.

-13 Suppress columns 1 and 3; only show lines infilename2.

-23 Suppress columns 2 and 3; only show lines infilenamel . SEE ALSO

cmp(1), ditT(l), sort(lV), uniq(l) BUGS

The options suppress, rather than select the columns you indicate.

84

Last change: 9 September 1987 Sun Release 4.1

COMPRESS ( 1 ) USER COMMANDS COMPRESS ( 1 )

NAME

compress, uncompress, zcat - compress or expand files, display expanded contents SYNOPSIS

compress [ -cfv ] [ -b bits] [filename . .. ] uncompress [ -cv ] [filename... ]

zeat [filename. .. ] DESCRIPTION

compress reduces the size of the named files using adaptive Lempel-Ziv coding. Whenever possible, each file is replaced by one with the extension .Z, while keeping the same ownership modes, as well as access and modification times. If no files are specified, the standard input is compressed to the standard output.

The amount of compression obtained depends on the size of the input, the number of bits per code, and the distribution of common substrings. Typically, text such as source code or English is reduced by 50-60%.

Compression is generally much better than that achieved by Huffman coding (as used in sys-unconfig(8)), or adaptive Huffman coding (old-eompaet(l)), and takes less time to compute. The bits parameter specified during compression is encoded within the compressed file, along with a magic number to ensure that neither decompression of random data nor recompression of compressed data is subsequently allowed.

Compressed files can be restored to their original form using uncompress.

zeat produces uncompressed output on the standard output, but leaves the compressed . Z file intact OPTIONS

-e Write to the standard output; no files

are

changed. The nondestructive behavior of zeat is identi-cal to that of 'uncompress -e'.

-f Force compression. even if the file does not actually shrink, or the corresponding . Z file already exists. Except when running in the background (under sh(I)), if -f is not given. prompt to verify whether an existing. Z file should be overwritten.

-v Verbose. Display the percentage reduction for each file compressed.

-b bits Set the upper limit (in bits) for common substring codes. bits must be between 9 and 16 (16 is the default).

SEE ALSO

In(l V), old-eompact(I). sh(l), sys-uneonfig(8)

A Technique for High Performance Data Compression, Terry A. Welch. computer, vol. 17, no. 6 (June 1984), pp. 8-19.

DIAGNOSTICS

Exit status is normally O. If the last file was not compressed because it became larger, the status is 2. If an error occurs. exit status is 1.

Usage: compress [-fve] [-b maxbits] (filename ... J

Invalid options were specified on the command line.

Missing maxbits

Maxbits must follow -b . filename: not in compressed format

The file specified to uncompress has not been compressed.

filename: compressed with xxbits, can only handle yybits

filename was compressed by a program that could deal with more bits than the compress code on this machine. Recompress the file with smaller bits.

Sun Release 4.1 Last change: 9 September 1987

85

COMPRESS ( 1 ) USER COMMANDS COMPRESS ( 1 )

BUGS

86

filename:

already has. Z suffix -- no change

The file is assumed to be already compressed. Rename the file and try again.

filename:

already exists; do you wish to overwrite (y or n)?

Respond y if you want the output file to be replaced; 0 if not.

uocompress: corrupt input

A SIGSEGV violation was detected, which usually means that the input file is corrupted.

Compression:

xx.xx

%

Percentage of the input saved by compression. (Relevant only for -v.) - - oot

a

regular file: unchanged

When the input file is not a regular file, (such as a directory), it is left unaltered.

- - has xx other links: unchanged

The input file has links; it is left unchanged. See In(1 V) for more infonnation.

- - file unchanged

No savings are achieved by compression. The input remains uncompressed.

Although compressed files are compatible between machines with large memory, -b12 should be used for file transfer to architectures with a small process data space (64KB or less),

compress should be more flexible about the existence of the . Z suffix.

Last change: 9 September 1987 Sun Release 4.1

CP( 1) USER COMMANDS CP(l)

NAME

cp - copy files SYNOPSIS

cp [ -ip ] filename] filename2 cp -rR [ -ip ] directory1 directory2 cp [ -ipr R ] filename . .. directory DESCRIPTION

cp copies the contents of filename! onto filename2. The mode and owner of filename2 are preserved if it already existed; the mode of the source file is used otherwise. If filenamel is a symbolic link, or a dupli-cate hard link, the contents of the file that the link refers to are copied; links are not preserved.

In the second form, cp recursively copies directoryl, along with its contents and subdirectories, to direc-tory2. If directory2 does not exist, cp creates it and duplicates the files and subdirectories of directory!

within it If directory2 does exist, cp makes a copy of the directory1 directory within directory2 (as a sub-directory), along with its files and subdirectories.

In the third form, each filename is copied to the indicated directory; the basename of the copy corresponds

to that of the original. The destination directory must already exist for the copy to succeed.

cp refuses to copy a file onto itself.

OPTIONS

-i Interactive. Prompt for confirmation whenever the copy would overwrite an existing file. A y in answer confirms that the copy should proceed. Any other answer prevents cp from overwriting the file.

-p Preserve. Duplicate not only the contents of the original file or directory, but also the modification time and pennission modes.

-r

-R Recursive. If any of the source files are directories, copy the directory along with its files (includ-ing any subdirectories and their files); the destination must be a directory.

EXAMPLES

To copy a file:

example% cp goodies goodies.old example% Is goodies*

goodies goodies.old

To copy a directory, first to a new. and then to an existing destination directory:

example% Is ~/bkup

lusr/example/fredlbkup not found example% cp -r ~/src -/bkup example% Is -R ~/bkup

x.c

y.e

z.sh

example% cp -r

-/src

-/bkup example% Is -R -/bkup src x.c y.c z.sh

src:

x.c y.e z.sh

To copy a list of files to a destination directory:

example% cp

-/srd*

Itmp . SEE ALSO

cat(lV), In(1 V), mv(l), pr(1 V), rcp(1C), tar(1)

Sun Release 4.1 Last change: 9 September 1987 87

CP( 1) USER COMMANDS CP(I)

WARNINGS

BUGS

88

Beware

of a recursive copy like this:

exampJe% cp -r

-/src

-/src/bkup

which keeps copying files until it fills the entire file system.

cp copies the contents of files pointed to by symbolic links. It does

not

copy the symbolic link itself. This can lead to inconsistencies when directory hierarchies are replicated. Filenames that were linked in the ori-ginal hierarchy are no longer linked in the replica. This is also true for files with multiple hard links. See In(IV) for details about symbolic links and hard links. You can preserve links in replicated hierarchies by using tar(1) to copy them.

Last change: 9 September 1987 Sun Release 4.1

CPIO( 1) USER COMMANDS CPIO( 1)

NAME

cpio - copy file archives in and out SYNOPSIS

cpio -0 [ aBcv ]

cpio -i [ bBcdfmrsStuv6 ]

[patterns]

cpio -p [adlmuv]

directory

DESCRIPTION

cpio copies files in to and out from a cpio copy archive. The archive (built by 'cpio -0') contains path-name and status infonnation, along with the contents of one or more archived files.

OPTIONS

-0 Copy out an archive. Read the standard input for a list of pathnames, then copy the named files to

the standard output in archive fonn - including path name and status infonnation.

a

Reset the access times of input files after they have been copied.

B

Output is to be blocked at

5120

bytes to the record. This does not apply to the

pass

option. This option is only meaningful with data directed to raw magnetic devices, such as '/dev/rmt?'.

c Write

header

infonnation in

Ascn

character form for portability.

v Verbose. A list of filenames is displayed. When used with the t option, the table of con-tents looks like the output of an 'Is -I' command (see Is(1 V)).

-i Copy in an archive. Read in an archive from the standard input and extract files with names matching filename substitution

patterns,

supplied

as

arguments.

patterns

are similar to those in sh(l) or csh(1), save that within cpio, the metacharacters '?', '.' and '[ ...

J'

also match the '/' (slash) character. If no

patterns

are specified, the default is • (select all files).

b Swap both bytes and half-words after reading in data.

B

Input is to be blocked at

5120

bytes to the record. This does not apply to the

pass

option.

This option is only meaningful with data received from raw magnetic devices, such

as

'/dev/rmt?' .

d Create directories

as

needed.

f Copy in all files except those matching

patterns.

m Retain previous file modification time. This option is ineffective on directories that are being copied.

r Interactively rename files. If the user types a null line, the file is skipped. May not be used with the -p option.

s Swap bytes after reading in data.

S Swap halfwords after reading in data.

t Print a table of contents of the input archive. No files are created.

u

Copy unconditionally. Nonnally,

an

older file will not replace a newer file with the same name.

6 Process UNIX Version-6 files.

-p One pass. Copy in and out in a single operation. Destination path names are inteIpreted relative to

Dans le document Reference sun® (Page 84-93)