• Keine Ergebnisse gefunden

2-18 @ 4404 Reference ManQal

copy

Copy a file or directory to the specified file or directory, or copy one or more files to the specified directory.

SYNTAX

copy <file name 1> <file name 2> [+dbncotBplLDP]

copy <file-name-list> <dTr name> [+dbncotBplLDP]

copy <dir_name_T> <dir_name_2> [+dbncotBplLDP]

DESCRIPTION

Three forms of the "copy" command exist. The first form makes a copy of a file and gives it the specified name. The second form makes one copy of each specified file and places all copies in the specified directory. The last component of each file name is preserved in the new directory. The third form copies the

contents of one directory to another.

In any case, if no file exists which has the same name as the name specified for the new copy, the "copy" command creates one.

If a file with that name does already exist, it is deleted and recreated before copying takes place. Thus, the contents of the file are lost and replaced by the contents of the file being copied. In addition, any links to that file are broken.

The new file has the same permissions as the original file. The owner of the new file is always the user who executes the

command. The user must have execute permission in the directory in which copies are to be made. He or she must also have write permission for the file being copied to and, unless the '0' option is specified, in the directory that is to contain the new copy.

Arguments

<file name 1> The name of the file to copy.

<file name 2> The name of the new copy of the original file.

<file name list> A list of the names of the files to copy to the specified directory.

<dir name> The name of the directory in which to place all copies.

4404 Reference Manual @ 2-19

Options Available

d Copy directory structure for all named directories.

b Do not copy a file unless it already exists in the destination directory.

n Copy a file if it is newer than the copy in the

destination directory. If no copy exists, perform the copy.

c Do not copy a file if it already exists in the destination directory. Cannot be used with "n."

o Retain original file ownership.

t Don't create top level directories at destination.

B Don't copy files ending in ".bak".

p Prompt for permission to copy files.

1 List the name of each file as it is copied and the name of the new copy.

L Don't unlink the destination file.

P Preserve the modification time of the source file.

EXAMPLES

1. copy parts parts.bak

2. copy letter /mark/letter +p

3. copy test_1 test_2 memo /mark +los

The first example copies the file named "parts" to a file named

"parts.bak". If a file named "parts.bak" already exists, it is deleted and recreated before copying takes place.

The second example copies the file "letter" in the working directory to the file "/mark/letter". If a file named

"/mark/letter" already exists, the "copy" command prompts for permission to alter its contents before proceeding. If the user denies permission, no copy is made. For the command to succeed the user must have both write and execute permission in the directory "/mark" as well as write permission for the file

"/mark/letter".

2-20 @ 4404 Reference Manual

The third example copies the files "test 1", "test 2", and "memo"

to the directory "/mark". The last component of each file name is preserved in the new directory. ThQs, the file specifications of the new files are "lmark/test 1",

"/mark/test 2", and "/mark/memo". If a file with one of

these names-already exists, the "copy" command overwrites its contents withoQt warning (the Qser does not need write permission in the directory "/mark"). The name of each file and the

name of the new copy are listed as copying takes place. The command aborts immediately if it encoQnters an error (e.g., one of the files listed does not exist).

Each copy created by these commands has the same permissions as the original file. The owner of all copied files is the Qser execQting the command.

ERROR MESSAGES

Entry does not exist: <file name>

The Qser asked for a copy of a nonexistent file.

file name 1> and <file name 2> are the same file

A file may not be copied onto itself. Both <file name 1> and

<file name 2> refer to the same file. (If their names-are not the same, they are links to the same file.)

May not copy a directory: <dir name>

The Qser asked for a copy of a directory. Directories may not be copied.

May not copy a special file: <file_name>

The Qser asked for a copy of a block or character file. SQch files may not be copied.

MQst be a directory: <file name>

The form of the "copy" command being Qsed reqQires the last argQffient to be an existing directory; <file name> is not an existing directory.

Path cannot be followed: <file name>

One or more of the directories which make QP the name of the file do not exist.

Permissions deny access to file: <file name>

4404 Reference ManQal @ 2-21

The permissions associated with <file name> or with the path leading to <file_name> prevent the user from accessing the file.

Read error on file: <file name>

A physical read error occurred while reading <file_name>.

Syntax: copy <file name 1> <file name 2> [+lops]

copy <file=name=list> <dTr_name> [+lops]

The "copy" command expects at least two argwnents. This ~essage

indicates that the argument count is wrong.

Write error on file: <file name>

A physical write error occurred while writing to <file name>.

SEE ALSO

2-22

link move rename

@ 4404 Reference Manual

Create a directory.

SYNTAX

crdir <dir name list) DESCRIPTION

crdir

The "crdir" command creates a directory for each name listed as an argwnent to the command. The Qser mQst have write

permission in the parent directory (the directory in which the new directory is created) of each directory created. Each new directory_contains the entry".", which represents the directory itself, and the entry" .. ", which represents its parent

directory.

By default, "crdir" creates a directory with "rwxrwx"

permissions. However, any defaQlt permissions set by the

"dperm" command override these permissions. The owner may, of COQrse, change the permissions at any time by using the "perms"

command.

Arguments

dir name list) A list of the names of directories to create.

All directories used in the name, except the last component of the name, must already exist.

EXAMPLES

1. crdir book

2. crdir /sarah/book

The first example creates the directory "book" in the working directory.

The second example creates the directory "book" in the directory

"/sarah". If the directory "/sarah" does not already exist, the command fails.

4404 Reference ManQal @ 2-23

ERROR MESSAGES

Error creating "<dir name>": <reason>

The operating system returned an error when "crdir" tried to create the specified directory. This message is followed by an interpretation of the error returned by the operating system.

Error linking "<dir_name>If to its If." file": <reason>

The operating system returned an error when "crdir" tried to link the "." entry to the directory itself. This message is followed by an interpretation of the error returned by the operating system.

Error linking " .. " to parent of "<dir_name>": <reason>

The operating system returned an error when "crdir" tried to link the newly created directory to its parent. This message is

followed by an interpretation of the error returned by the operating system.

Error setting owner for "<dir_name>If: <reason>

Initially, the "crdir" command creates the new directory with the owner "system". It then changes the owner to the user who

executed the command. In this case, the operating system

returned an error when "crdir" tried to change the owner of the directory. This message is followed by an interpretation of the error returned by the operating system.

Syntax: crdir <dir_name_list>

The "crdir" command expects at least one argument. This message indicates that the argument count is wrong.

SEE ALSO

2-24

dperm perms remove

@ 4404 Reference Manual

create

Create an empty file for each file name on the command line.

SYNTAX

create <file name list>

DESCRIPTION

The "create" command creates an empty file for each name

specified on the command line. If the file does not exist, it is created with "rw-rw-" permissions, and the owner is the user who executes the command. If the file already exists, the owner and permissions remain intact. However, the file is truncated to a length of

o.

Arguments

<file name> The name of the file to create. The last component of a file name may not contain more than fourteen characters. The "create"

command ignores any additional characters.

EXAMPLES

1. create test

2. create /julie/test

The first example creates the file "test" in the user's working directory.

The second example creates the file "test" in the directory

" / j ul i e" .

ERROR MESSAGES

Error creating "<file name>": <reason>

The operating system returned an error when "create" tried to create <file name>. This message is followed by an

interpretation of the error returned by the operating system.

Syntax: create <file_name_list>

The "create" command requires at least one argument. This message indicates that the argument count is wrong.

SEE ALSO