home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / question / 14657 < prev    next >
Encoding:
Text File  |  1992-12-14  |  2.0 KB  |  63 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!UB.com!quack!dfox
  3. From: dfox@quack.sac.ca.us (David Fox)
  4. Subject: Re: counterpart of 'cat' ?
  5. Message-ID: <fWzXcWS@quack.sac.ca.us>
  6. Keywords: cat
  7. Organization: The Duck Pond public unix: +1 408 249 9630, log in as 'guest'.
  8. References: <1fvo7jINN27p@iraul1.ira.uka.de>
  9. Date: 14 Dec 1992 04:55:59 UTC
  10. Lines: 51
  11.  
  12. In article <1fvo7jINN27p@iraul1.ira.uka.de> voss@i43s6.ira.uka.de (Stefan Voss) writes:
  13. >Hi folks,
  14. >
  15. >I'm not sure if this is a FAQ though I read the FAQ-index. I haven't
  16. >found it there, so I ask
  17. >
  18. >What is the Unix counterpart of 'cat' ?
  19. >
  20. >I want to cut a large file into several pieces, put these pieces on
  21. >several disks and finally append them (using 'cat') to get the original
  22. >file (probably on a hard disk).
  23.  
  24. Depends how large the file is.  There is a command called 'split' that
  25. will output a file into pieces and you can control either the size of
  26. each split in terms of bytes or lines.  That's useful for smaller files,
  27. that are (usually) in ascii form, such as when you want to mail a 
  28. uuencoded binary to someone.
  29.  
  30. If you have a large file - large in the sense that it won't fit on
  31. a single floppy - then IMHO the appropriate command to use is 'dd'.
  32. dd has a 'skip' parameter, and you can fairly easily take a large
  33. file and split it across a series of floppies by incrementing the
  34. skip parameter by the size of the floppy.  In fact I did this not
  35. too long ago when I wanted a huge tar.Z archive (8 megs) from
  36. another system put on a series of floppies.
  37.  
  38. Use something like:
  39.  
  40. dd if=file.thats.really.big of=/dev/floppy bs=1440K  (first)
  41. dd if=file.thats.really.big of=/dev/floppy bs=1440K skip=1440K (rest)
  42.  
  43. Increment 'skip' by 1440K (so the third would be 2880K, etc.) for
  44. each subsequent floppy.
  45.  
  46. (This assumes the output is a 1.44 meg floppy, and substitute
  47. /dev/floppy with the proper device entry for your system.)
  48.  
  49. >Hope this question is not too stupid.
  50.  
  51. There is no such thing as a stupid question - except for the one
  52. that remains unasked. :)
  53.  
  54.  
  55. >Stefan Voss
  56. >voss@ira.uka.de
  57. --
  58. David Fox
  59. dfox@quack.sac.ca.us
  60.  
  61.  
  62.  
  63.