From owner-freebsd-questions@FreeBSD.ORG Mon Dec 8 20:06:50 2003 Return-Path: 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 9C29316A4CE for ; Mon, 8 Dec 2003 20:06:50 -0800 (PST) Received: from ns1.tiadon.com (SMTP.tiadon.com [69.27.132.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E12D43D20 for ; Mon, 8 Dec 2003 20:06:49 -0800 (PST) (envelope-from kdk@daleco.biz) Received: from daleco.biz ([69.27.131.0]) by ns1.tiadon.com with Microsoft SMTPSVC(6.0.3790.0); Mon, 8 Dec 2003 22:09:51 -0600 Message-ID: <3FD54A37.8050503@daleco.biz> Date: Mon, 08 Dec 2003 22:06:15 -0600 From: "Kevin D. Kinsey, DaleCo, S.P." User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031124 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Harald Schmalzbauer References: <20031209015125.74977.qmail@web14806.mail.yahoo.com> <200312090259.23677@harrymail> In-Reply-To: <200312090259.23677@harrymail> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 09 Dec 2003 04:09:51.0625 (UTC) FILETIME=[4B262F90:01C3BE0A] cc: homeyra g cc: freebsd-questions@freebsd.org Subject: Re: a technical how to X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2003 04:06:50 -0000 Harald Schmalzbauer wrote: >On Tuesday 09 December 2003 02:51, homeyra g wrote: > > >>So, I hope this is the right address for this type of >>question. If not would you please forward this and/or >>let me know the correct address. >> >>Thanks, >> >>Here is the question: How to truncate a file from the >>begining to a certain point in the file? >> >> > >Have a look at sed. Sorry can't help with syntax and I'm sure one can also do >the same with perl or awk or whatever. But for the first, man (1) sed will >help with 'cat yourfile | sed -youroptions' e.g. > >You can also use vi (if it's a regular textfile with less than hundreds of >megs), find your endpoint with e.g "/YourEndKeyWord" and do in instruction >mode a "dG", after that save. > >-Harry > > And if you use PHP, you could do a fairly easy script also, via the CLI. Lots of shell scripting stuff out there, isn't there? KDK