home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / next / misc / 18027 < prev    next >
Encoding:
Internet Message Format  |  1992-07-21  |  1.2 KB

  1. Path: sparky!uunet!olivea!hal.com!decwrl!bu.edu!wang!news
  2. From: Lyle_Seaman@transarc.com
  3. Newsgroups: comp.sys.next.misc
  4. Subject: Re: Swapfile Question
  5. Message-ID: <EeP8uu70BwwbQ_4zQC@transarc.com>
  6. Date: 21 Jul 92 22:24:58 GMT
  7. References: <9kuyNB2w165w@midiline.la.ca.us> <1992Jul16.195458.8181@kakwa.ucs.ualberta.ca> <1992Jul21.110720.3224@investor.pgh.pa.us>
  8. Sender: news@wang.com
  9. Organization: Mail to News Gateway at Wang Labs
  10. Lines: 19
  11.  
  12. rbp@investor.pgh.pa.us (Bob Peirce #305) writes:
  13. > Also, at the risk of finding out the NeXT can do this, no Unix I have
  14. > seen can shrink a file.  You can truncate them to zero, but as
  15. > desirable as it would be, you can't seem to free part of a file.  On the
  16. > surface this would seem to be a simple thing to do so maybe somebody
  17. > does it, but I haven't seen it.
  18.  
  19.      ftruncate(fd, length)
  20.      int fd, length;
  21.  
  22.    Description
  23.      The truncate system call causes the file named by path or referenced by
  24.      fd to be truncated to, at most, length bytes in size.  If the file pre-
  25.      viously was larger than this size, the extra data is lost.  With ftrun-
  26.      cate, the file must be open for writing.
  27.  
  28.  
  29. Lyle        Transarc        707 Grant Street
  30. 412 338 4474    The Gulf Tower        Pittsburgh 15219
  31.