• Aucun résultat trouvé

The remove command, especially when executed with the

Dans le document SYSTEM 4400 SERIES (Page 133-138)

"k" option, is an extremely powerful but potentially destructive command.

ERROR MESSAGES

Cannot delete the root directory: / The user tried to delete the root directory.

Directory <dir_name> is not empty.

The remove command cannot delete a nonempty directory unless the user specifies the 'k' option.

Error deleting <file_name>: <reason>

The operating system returned an error when remove tried to delete <file_name>. This message is followed by an interpretation of the error returned by the operating system.

Error deleting "." in <dir_name>: <reason>

The operating system returned an error when remove tried to delete the "." entry in <dir_name>.

This message is followed by an interpretation of the error returned by the operating system.

Error getting status for <file_name>: <reason>

The operating system returned an error when remove tried to read the fdn for <file name>. This message is followed by an interpretation of the error returned by the operating system.

Error removing <file_name>: <reason>

The operating system returned an error when remove tried to remove <file name>. This message is followed by an interpretation of the error returned by the operating system.

Invalid option: <char>

The option specified by <char> is not a valid option to the remove command.

Syntax: remove <file_name_list> [+dklpw]

The remove command expects at least one argument. This message indicates that the argument is wrong.

You do not own <file name>.

The user may not delete a file that is owned by someone else.

SEE ALSO

deluser

rename

Changes the name of the specified file.

SYNTAX

rename <file name 1> <file name 2>

DESCRIPTION

The rename command changes the name of the specified file. If a file named <file_name _2>

already exists, it is deleted without warning.

ARGUMENTS

<file name I>

-

- The name of an existing file.

<file name 2> -

-

The new name for <file name

-

-1>.

EXAMPLES

rename test oldtest

Changes the name of the file test in the working directory to oldtest. If a file named oldtest already exists, it is deleted without warning.

rename test /elaine/oldtest

Changes the name of the file test in the working directory to lelaineloldtest, if the user has write permissions in the directory elaine.

ERROR MESSAGES

Error renaming <file_name_1>: <reason>

The operating system returned an error when rename tried to change the name of <file_name _1 >.

This message is followed by an interpretation of the error returned by the operating system.

Error renaming to <file_name_2>: <reason>

The operating system returned an error when rename tried to assign the new file name. This message is followed by an interpretation of the error returned by the operating system.

Error unlinking <file_name_1>: <reason>

The operating system returned an error when rename tried to unlink: <file_name _1> from the new file. This message is followed by an interpretation of the error returned by the operating system.

USER COMMANDS rename

File <file name 1> does not exist! -

-The first name on the command line must be the name of an existing file.

Syntax: rename <file_name_1> <file_name_2>

The rename command expects exactly two arguments. This message indicates that the argument count is wrong.

SEE ALSO

move

restore

Retrieves and examines backup copies of files and directories.

SYNTAX

restore [+bBCdlLnNOprT] [+S=<buffers>] [+T[=<length>]]

[<file_name_list>] [<dir_name_list>]

DESCRIPTION

The restore command is used to copy backup files from the backup device onto the file system.

Although the program is named restore, it can operate in two distinct modes, selected by options:

catalog mode and restore mode. Catalog mode lists the contents of the backup device in much the same format as that used by the dir command. Restore mode retrieves files or directories from the backup device.

The restore command retrieves backup files and directories from /dev/floppy or Idev/tape. You should not attempt to mount a backup device; the only way to read devices written by backup is to use the restore command. The only other command that you should use on a backup device is devcheck.

List of files to restore.

List of directories to restore.

Print files sizes in bytes, instead of blocks.

Do not restore files that end in .bak.

Print a catalog of the backup volume. If you specify

"e"

all of the names in the <file _name_list> are ignored.

Restore entire directory structure.

List file names as they are restored.

Do not unlink files before restoring.

Only restore files for which the backup copy is newer than any existing copy.

Do not prompt for the initial volume.

Do not restore files which end in .r.

Prompt before any action.

Retension streaming tape cartridge before any action.

USER COMMANDS restore

T Restore from streaming tape instead of floppy.

T[ =<length>] Restore from streaming tape instead of floppy. The default parameter for the tape length is 450 feet, for example (+T=300 for a 300 foot tape).

NOTE

The" +d" option to restore entire directories creates subdirectories only if the original backup command specified "1" or "." as the directory to back up. Absolute sub-directories will not be created, although the files contained within them will be restored if the subdirectory already exists. That is, the command

backup +dl

saves all subdirectories under the current working directory, and the command

restore +dl

restores these subdirectories and their contents. However, the command

backup +dl Idirllsubdir2

while it saves the subdirectory Idirllsubdir2 and its contents (including subsequent subdirectories) in absolute format, the command

restore +dl

will fail if any of the directories or subdirectories do not exist. The error messages are specific enough to allow you to manually create the directory structure necessary for restore to work. For an example of how this is used to control directory structures, see the script file fete/restoreOS on the SYSINSTALL diskette.

EXAMPLES

restore +1

Restores all of the files, excluding subdirectories and their contents, from the backup diskettes you are prompted to insert in the flexible disk drive.

restore +In fi1el dir2

RestoreS the file filel from the backup if the backup copy is newer than any existing copy. It then restores the files contained in dir2 on the backup, creating the directory dir2 if necessary. Only files newer than existing copies are restored, and these are listed as they are restored. This example does not restore any subdirectories in dir2 or any files or directories contained in subdirectories in dir2.

restore +C >cata1og

Catalogs the files on the backup set and stores it in a file called catalog. The ">" redirects stdout to the file catalog, but the prompts are written to stderr so the user can respond appropriately.

NOTES

• In restore mode, file names or directory names on the command line are used to select the files or directories to be restored. The program searches the entire backup for each argument specified. If multiple files satisfy the restoration criteria, the program restores them all, replacing the older version as the new one is restored. Thus, to ensure proper restoration, you must provide all backup volumes (in order) for each argument.

• When files are restored, they are generally restored to the same directory location as specified when they were backed up. As files are backed up, backup makes an indication of the path name for each file. When files are restored, restore uses the path name to place the file in its proper directory location. If the path name is relative (i.e., does not begin with "1"), the path name of the restored directory is also relative. Thus, files backed up with a relative path name may be restored to a directory location different from the one in which they were created.

An example should make this clear. If the working directory is backed up, either by specifying no source files or by using the directory name ".", the files are backed up with a relative path of ".". When these files are restored, they are placed in the directory ".", which might not be the same directory they originally came from. This feature allows the manipulation of entire file systems in a general fashion. To specify a unique directory location for a file, you should specify its entire unique path name, starting with

.,!".

• It is possible to restore backed up data onto the device currently being used as the root device or system disk. A problem may arise if the shell program or the device ttyOO is restored over the current shell or ttyOO. This operation leaves unreferenced files in the file system. Unreferenced files may be recovered with the diskrepair command. It is a good idea to run diskrepair on the root device after restoring backed-up data to it.

Dans le document SYSTEM 4400 SERIES (Page 133-138)