.\" @(#)cd_link.1 1.00 91/04/05 Copyright 1990, 1991 By Young Minds, Incorporated .nh .TH CD_LINK 1 "5 April 1991" .SH NAME cd_link \- make symbolic links to CD-ROM files .SH SYNOPSIS .B cd_link [ .B \-rR ] .IB cdrom_directory [ .IB target_directory ] .SH DESCRIPTION .B cd_link creates a set of symbolic links in the .IB target_directory to the files/directories stored on a CD-ROM created by Young Minds' CD-ROM Publishing Software. The program uses the .IB cdrom_directory to search for a translation file (normally .BR YMTRANS.TBL). If found, the program uses the file to build a set of symbolic links in the .IB target_directory to the files (and directories, if the .B -r option is given) in the .IB cdrom_directory. If the .IB target_directory is not specified on the command line, the symbolic links are built in the current working directory. The names given to the links in the .IB target_directory are the original UNIX\(dg names that the files on the CD-ROM had before they were formatted to conform to the .B ISO9660 specification. This gives you the ability to use the files on the CD-ROM as they were originally intended to be used under a UNIX\(dg filesystem. For example, if you had a source distribution on CD-ROM, you could use .B cd_link to build the original UNIX\(dg names in a writable partition in order to make the executables. Since it is often desirable to have the original UNIX\(dg names in a writable partition, .B cd_link will also build links for a .B Rock Ridge disc. .SH OPTIONS .TP .B \-r Recursively descend the subdirectory rooted at .IB cdrom_directory. .TP .B \-R Make links to a disc mounted with a .B Rock Ridge filesystem driver. .SH EXAMPLE The example below shows how to create the symbolic links necessary to recreate the directory tree for gnuplot in the directory /cd-rom_disc) : .nf .RS my_prompt% cd ~my_account my_prompt% mkdir gnuplot my_prompt% cd_link -r /cd-rom_disc/x11r2/gnuplot gnuplot .RE .fi .SH MAKING AN EXECUTABLE CD_LINK Because we wish our CD-ROM publications to be usefull on as many platforms as possible, .B cd_link is distributed in source form. To make the executables you will need a .B C compiler (which is a standard part of most UNIX systems). First, copy .B cd_link.c from the CD-ROM onto a hard disk. On most systems this will look somehthing like this: .nf .RS % cp /cd-rom/ym_utils/"cd_link.c;1" cd_link.c .RE .fi The quotes around .B cd_link.c;1 above are necessary to prevent the shell from interfering with the operation. Note that on some platforms the ";1" will not be needed because the CD-ROM filesystem driver may automatically strip it off. After you have a copy of .B cd_link.c on your hard disk, you need to compile it. Type: .nf .RS % cc -o cd_link cd_link.c .RE .fi This will create an executable file named .B cd_link. On some platforms it may be necessary to link in a BSD compatibility library. HP-UX machines are in this catagory. In this case you should instead type: .nf .RS % cc -o cd_link cd_link.c /usr/lib/libBSD.a .RE .fi Once you have successfully created the executable you may want to install it in a commonly accessible location like /usr/local/bin. .SH NOTES While all filenames on CD-ROM discs from Young Minds are stored using upper case letters, the CD-ROM filesystem driver for the Sun workstation automatically translates all upper case filename characters to lower case. .B cd_link automatically detects several types of translations that are commonly performed by CD-ROM filesystem drivers, so this should cause no problems. .LP The directory .IB cdrom_directory need not reside on a CD-ROM disc, as long as it contains a copy of all files from a directory on a CD-ROM disc (and that directory's sub-directories, if you wish to use the .B -r option). .LP While the current version of Young Minds' CD-ROM Publishing Software generates translation tables entries for block device nodes, character device nodes, pipes, and sockets (denoted B, C, P, and S), the current version of .B cd_link ignores these entries as there is not yet a well defined, machine independent mapping for these entries. .SH ALSO SEE .BR YMTRANS.TBL (5), .SH BUGS While there is no reason why the program could not be useful in making directory trees of symbolic links to arbitrary directories, the required translation file only allows the program to be used on directory (or directory trees) that contain correct translation files. .LP \(dg \s-1UNIX\s0 is a trademark of Bell Laboratories.