× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I might have read your email too quickly. If you want to clear the contents
of a file before writing back to it then use the open option i suggested.
If you want to keep the contents up to a particular size then use ftruncate.
On Mar 12, 2015 2:40 PM, "Tim Bronski" <tim.bronski@xxxxxxxxx> wrote:

If you're using open() then you should have O_TRUNC or'ed as a flag.

On 3/12/2015 2:32 PM, MichaelQuigley@xxxxxxxxxx wrote:

I'm writing a utility to remove some filler data from an IFS file. I'm
using the The utility works great except that when I write the data back
to the IFS, there is original data past where I want the new EOF to be. I
can't for the life of me figure out how to shorten the file and set a new
(shorter) end of file.

Any help would be greatly appreciated.

Thanks,
Michael Quigley
Computer Services
The Way International
www.TheWay.org


--
Need secure FTP? Download your native sFTP solution here:
www.arpeggiosoftware.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.