CDCOPY(L) CSDS Commands CDCOPY(L) NAME cdcopy - copy the CSDS from CDROM SYNOPSIS cdcopy [ -from cdrom_directory ] -to new_directory [ - level n ] [ -machine machine_name ] [ -[u][v][d] ] [ -force ] [ - mosaic ] [ -source ] [ -list file_of_files ] DESCRIPTION cdcopy copies sections of the Cambridge Structural Database System from a mounted CD-ROM to another writable directory performing any name translation specified and setting file permissions. Four levels of transfer can be specified: -level 0 Transfer of binary executable files, if any, for the specified machine type, ascii help files and a few aux- illary files. This level is necessary if you want to recompile the source code. -level 1 A level 0 transfer plus the protein databank database files and the master database pointer file. This should speed up the loading and executing of the CSDS programs and also, to a degree, database access. It will have minimal impact on disk storage (about 20Mb per machine type). -level 2 A level 1 transfer plus the transfer of the master database mask file. High screen-out searches will be speeded up significantly. Requires 60Mb on top of a level 1 transfer. -level 3 Equivalent to a level 2 transfer plus the master data- base main file. Will add approximately 300Mb over and above a level 2 transfer. OPTIONS -from cdrom_directory The directory on which the cdrom is mounted. The value defaults to the environment variable CSDHOME. -to target_directory The root directory to which the copy is to be made. This directory must be specified. -machine machine The target machine. Defaults to the environment vari- able CSDMACHINE. (see the ENVIRONMENT section below). CSD System Last change: $Date: 1998/01/14 09:56:02 $ 1 CDCOPY(L) CSDS Commands CDCOPY(L) -level n The level to copy. n is an integer between 0 and 3 inclusive. -[u][v][d] The CD-ROM filenames appear in uppercase (u), have version-numbers (v) and/or end with a dot when no other dot appears in their name (d). Some Unix systems mount the CD-ROM filesystem to display uppercase filenames (all CSDS directory names and filenames are lowercase) and/or version numbers. This script will take care of these cases. (More complicated cases can be dealt with by using the CSD_CDROM_FILENAMES environment variable, see below.) -force Force the transfer of files. If a file already exists on the target disk, then it will be deleted before the CD-ROM version is copied, otherwise, existing files will not be replaced. -source Copy the compressed and tar'ed source file tsource.Z. -mosaic Copy the compressed and tar'ed mosaic file tmosaic.Z. -list file_of_files Copy over files and directories named in the file file_of_files. This option overrides the -level option. file_of_files should contain a newline separated list of files and directories to be copied. They should appear as the target file and directory names (the CD- ROM names are found from them by applying translations specified by the -[u][v][d] flag or by CSD_CDROM_FILENAMES environment variable.) Directory names must end with the '/' character and appear before the names of any files or directories contained within them. A line containing a number is taken to be a chmod file permission number and all subsequent files transferred will have their permissions set to this value. ENVIRONMENT cdcopy recognises the environment variables CSDHOME and CSDMACHINE both of which can be overridden on the command line. For more complicated file/directory name translation you can set the environment variable CSD_CDROM_FILENAMES. If defined, CSD_CDROM_FILENAMES should be a script or the name of and executable script/program that reads file/directory names from standard input and writes the equivalent CD-ROM names to standard output. For example if the filenames in CSD System Last change: $Date: 1998/01/14 09:56:02 $ 2 CDCOPY(L) CSDS Commands CDCOPY(L) the cdrom appear as uppercase with version numbers then (in the Bourne shell) type: CSD_CDROM_FILENAMES="eval tr '[a-z]' '[A-Z]' | sed -e '/[^/]$/s/$/;1/'" export CSD_CDROM_FILENAMES This will translate names such as csds/ and csds/version.txt to CSDS/ and CSDS/VERSION.TXT;1 respectively. This example is equivalent to the -uv option. EXAMPLE Suppose the top directory /cdrom of the CD-ROM appears thus for a listing ls. BIN CSDASCII MAKEFILE.;1 READ.ME;1 TMOSAIC.Z;1 CBIN CSDS MAN SOURCE;1 TSOURCE.Z;1 CONFIG.SH;1 DOC MOSAIC TEST VER- SION.508;1 CSD RC TEST_DB (Note the dot appended after the file MAKEFILE.) To transfer files from this CD-ROM use the command: /cdrom/BIN/CDCOPY\;1 -from /cdrom -to -level n - uvd SEE ALSO The "Unix Installation Notes", CCDC. CSD System Last change: $Date: 1998/01/14 09:56:02 $ 3