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