home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / ym_utils / cd_copy.doc < prev    next >
Text File  |  1994-02-03  |  4KB  |  107 lines

  1. The cd_copy Program
  2.  
  3.  
  4.     The cd_copy program, copies files/directories stored on a
  5. CD-ROM created by Makedisc, the CD-ROM formatting software from
  6. Young Minds, Inc., to a specified target directory on hard disk.
  7. What makes this program more useful than a standard copy utility
  8. is that it will recover the original UNIX file/directory names off
  9. the CD-ROM disc and, in essence, restore the original UNIX file
  10. system.  The program uses a 'cdrom_directory' to search for a
  11. translation file (for example, 'YMTRANS.TBL').  If found the program
  12. uses the file to convert the ISO 9660 names back to the original
  13. UNIX names and copies the specified files and directories to a
  14. specified destination.
  15.  
  16.     Usage for cd_copy is as follows:
  17.  
  18. cd_copy [-rR] cdrom_directory
  19.  
  20.     The -r option will recursively descend the subdirectory
  21. rooted at cdrom_directory copying the directory tree at each level.
  22.  
  23.     The -R option is for use with a Rock Ridge driver and will
  24. copy an image with Rock Ridge extensions.
  25.  
  26. NOTE:  For those with Rock Ridge drivers, we recommed using this
  27. utility instead of cp because cp may have difficulty with some of
  28. the file types as well as being somewhat slower.
  29.  
  30.     The following example demonstrates how to recreate the
  31. directory tree for 'gnuplot' in the directory ~my_account/gnuplot
  32. (where the CD-ROM image has been mounted as /cd-rom_disc):
  33.  
  34. cd ~my_account
  35.     
  36. Move to the ~my_account directory.
  37.  
  38.  
  39.     In order to support as many end users of CD-ROM as
  40. possible, (some of which are probably unanticipated) the
  41. cd_copy utility is provided in source form.  So, if binaries
  42. are not present on your platform, you can create them by
  43. compiling the source code with a standard ANSI C compiler
  44. (available on most UNIX platforms).
  45.  
  46.     First, copy the source to your current directory:
  47.  
  48. cp /cd-rom/ym_utils/"cd_copy.c;1" cd_copy.c
  49.  
  50.     The quotes around the cd_copy.c;1 are necessary to prevent
  51. the shell from interferring with the operation.  Next, enter:
  52.  
  53. cc -o cd_copy cd_copy.c
  54.  
  55.     This will create an executable called cd_copy.  On some
  56. platforms it may be necessary to link in a BSD compatibility
  57. library.  Check with your system administrator or operating
  58. system documentation to see if this is the case for your machine.
  59. If so, to get cd_copy to compile you should enter the following
  60. command:
  61.  
  62. cc -o cd_copy cd_copy.c /usr/lib/libBSD.a
  63.  
  64.     When your UNIX prompt reappears, enter the following commands:
  65.  
  66. mkdir gnuplot
  67.  
  68.     Create the gnuplot directory to use in recreating the
  69. directory tree.
  70.  
  71. cd gnuplot
  72.  
  73.     Move to the gnuplot directory.
  74.  
  75. ../cd_copy -r /cd-rom_disc/x11r2/gnuplot
  76.  
  77. or, if you want to direct output to the gnuplot directory from
  78. elsewhere, try:
  79.  
  80. cd_copy -r /cd-rom_disc/x11r5/gnuplot <PATH>/gnuplot
  81.  
  82. where <PATH> is the path to the gnuplot directory.
  83.  
  84.  
  85.     It will take a little while, but once it's finished,
  86. listing the contents of your gnuplot directory will now show the
  87. files in the gnuplot directory on the CD-ROM, except that the
  88. original UNIX filenames will appear instead of the actual,
  89. translated filenames on the CD-ROM.  If you want to see how they
  90. are different, you save the listings of both your gnuplot
  91. directory and the one on the CD-ROM to files and apply the
  92. 'diff' utility.
  93.  
  94. NOTE:  While all filenames on CD-ROM discs from Young Minds, Inc.
  95. are stored using uppercase letters, some CD-ROM file system
  96. drivers will automatically convert the filename characters to
  97. lowercase.
  98.  
  99.     Once you have successfully created the executable, you
  100. may wish to store it in some commonly accessible location like
  101. '/usr/local/bin'.
  102.     Also, while the current version of Makedisc generates
  103. translation table entries for block device nodes, character device
  104. nodes, pipes and sockets (denoted as B, C, P, and S), the current
  105. version of cd_copy ignores these entries since there is as yet no
  106. well-defined, machine-independant mapping for these entries.
  107.