Date: Sun, 20 Aug 2006 11:17:43 -0700 From: Tim Kientzle <kientzle@freebsd.org> To: Steven Hartland <killing@multiplay.co.uk> Cc: freebsd-hackers@freebsd.org Subject: Re: Adding remove file option to BSD tar? Message-ID: <44E8A747.2050807@freebsd.org> In-Reply-To: <44D94C69.1030901@freebsd.org> References: <020701c6bb0d$68ae7330$b3db87d4@multiplay.co.uk> <44D94C69.1030901@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
>> What do people think about adding an equivalent to >> gtars --remove-files? > > Shouldn't be too tricky. If you think you know > how to implement it, send me the diffs. > > Doing this "safely" is nearly impossible, of > course. In the compressed case, the compression > pipeline buffers a LOT of data ... Actually, this might not be as hard as I first thought. Just keep a FIFO of files added to the archive, and a running count of the total size of those files. When the count exceeds some limit, delete the oldest file in the queue and update the size. If you keep the limit pretty high (2MB? 10MB?), then you can be pretty confident that files will not get deleted before they have been safely added to the archive. Tim Kientzle
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44E8A747.2050807>