home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.11 / text0078.txt < prev    next >
Encoding:
Internet Message Format  |  1987-07-18  |  1005 b 

  1. From: henry@utzoo.UUCP (Henry Spencer)
  2.  
  3. As a counterpoint to Kenneth Almquist's example of tar fouling up links,
  4. try the following:
  5.  
  6.     echo hi >one
  7.     ln one two
  8.     ls one two | cpio -o >/tmp/foo
  9.     rm one two
  10.     cpio -i one </tmp/foo
  11.     cpio -i two </tmp/foo
  12.  
  13. Now we have cpio creating two files where there was supposed to be only one
  14. with two links.  Note that tar would get this one right!  (Although you would
  15. have to be careful to get the order right, admittedly a wart.)
  16.  
  17. The moral of the story is that it is very hard to handle links properly in
  18. a format like tar or cpio, and *neither* of the existing formats is bullet-
  19. proof in the presence of links.  This is not a valid argument for or against
  20. either format; they merely screw up in different ways.  One can argue about
  21. the relative probabilities of the different screwup types causing trouble,
  22. but I think the point is made.
  23.  
  24.                 Henry Spencer @ U of Toronto Zoology
  25.                 {allegra,ihnp4,decvax,pyramid}!utzoo!henry
  26.  
  27. Volume-Number: Volume 11, Number 79
  28.  
  29.