From owner-freebsd-questions Fri Dec 13 5:11:21 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E6DB37B401 for ; Fri, 13 Dec 2002 05:11:20 -0800 (PST) Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C5E543EA9 for ; Fri, 13 Dec 2002 05:11:18 -0800 (PST) (envelope-from andre.albsmeier@mchp.siemens.de) Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by goliath.siemens.de (8.11.6/8.11.6) with ESMTP id gBDDBBw25603 for ; Fri, 13 Dec 2002 14:11:11 +0100 (MET) Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.42.7]) by mail2.siemens.de (8.11.6/8.11.6) with ESMTP id gBDDBAf11116 for ; Fri, 13 Dec 2002 14:11:11 +0100 (MET) Received: (from localhost) by curry.mchp.siemens.de (8.12.6/8.12.6) id gBDDBAUY080532 for freebsd-questions@freebsd.org; Fri, 13 Dec 2002 14:11:10 +0100 (CET) Date: Fri, 13 Dec 2002 14:11:10 +0100 From: Andre Albsmeier To: freebsd-questions@freebsd.org Subject: How to truncate a file in the beginning Message-ID: <20021213141110.A99587@curry.mchp.siemens.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i X-Echelon: anarchy, IRA, SWAT, MI5, ISS Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Are there any special features in FreeBSD that I can use to truncate a file in the beginning? Let's assume I have a 50GB file. Only the last 10GB are interesting for me and I have to free the first 40GB for some reason. Of course, I could seek to the appropriate position and copy the 10GB to a new file and unlink the old one. The problem is that I don't have a lot of time to do this so I am looking for something like ftruncate() but for the beginning... Any ideas? Thanks, -Andre To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message