home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.30 / text0064.txt < prev    next >
Encoding:
Text File  |  1993-03-11  |  1.4 KB  |  47 lines

  1. Submitted-by: clive@x.co.uk (Clive Feather)
  2.  
  3. In article <1luic5INNqhk@ftp.UU.NET> karish@pangea.Stanford.EDU (Chuck Karish) writes:
  4. >There's no specific requirement that subsequent files in
  5. >the archive that are links to a previous file be treated
  6. >specially with regard to file size.  This says to me that
  7. >the specification would expect the data in a file with
  8. >multiple links to be repeated in the archive, but not on
  9. >disk after the files are extracted from the archive.
  10.  
  11. This behaviour is in cpio so that it is possible to extract any file
  12. without special handling. Suppose you create an archive containing three
  13. links:
  14.  
  15.     mkdir newdir
  16.     cd newdir
  17.     cp /some/random/file a
  18.     ln a b
  19.     ln a c
  20.     ls ? | cpio -oc >archive
  21.  
  22. Then it is possible to extract the file under any of its names
  23.  
  24.     cpio <archive -ic a
  25.  
  26. or
  27.  
  28.     cpio <archive -ic b
  29.  
  30. or
  31.  
  32.     cpio <archive -ic c
  33.  
  34. If you handle links specially in the archive, then the first of these
  35. works, but the other two don't, unless cpio can back up through standard
  36. input, or saves all files with >1 links just in case another name
  37. matches the pattern.
  38.  
  39. -- 
  40. Clive D.W. Feather     | IXI Limited         | If you lie to the compiler,
  41. clive@x.co.uk          | Vision Park         | it will get its revenge.
  42. Phone: +44 223 236 555 | Cambridge   CB4 4RZ |   - Henry Spencer
  43. Fax:   +44 223 236 550 | United Kingdom      |
  44.  
  45. Volume-Number: Volume 30, Number 67
  46.  
  47.