From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Benjamin Riefenstahl Newsgroups: gmane.emacs.help Subject: Re: Reading portions of large files Date: 20 Jan 2003 13:46:53 +0100 Organization: None Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1043068280 26559 80.91.224.249 (20 Jan 2003 13:11:20 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 20 Jan 2003 13:11:20 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18abht-0006tu-00 for ; Mon, 20 Jan 2003 14:11:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18abhG-0000ux-0A for gnu-help-gnu-emacs@m.gmane.org; Mon, 20 Jan 2003 08:10:38 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-post-01!supernews.com!news.supernews.com!cicero.benny.turtle-trading.net!nobody Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-X-Complaints-To: abuse@supernews.com Original-Lines: 37 Original-Xref: shelby.stanford.edu gnu.emacs.help:109229 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:5753 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5753 Hi, > [attribution cut off] > >> head -c2000 bigfile > header-to-be-edited > >> tail -c+2001 bigfile > the-rest > >> [...] > >>>>> "Benjamin" == Benjamin Riefenstahl > writes: > Benjamin> This assumes a) Unix, b) that you have the space and > Benjamin> time ;-) to deal with the large temporary files. Lee Sau Dan writes: > (b) is assumed even if you use other method. With something like the dd method I don't ever have to copy the whole file. Makes a difference when your file is a CD image of 600 MB and all you want to do is patch the partition table. > Time? It doesn't take much time to 'split' and 'cat'. It takes several minutes on my machine with the mentioned file. > Why not 'split'? I didn't think of that one before. But it also copies the whole file. > There are hex editors which doesn't need to load the whole file into > memory. I'm not aware of a commonly used hex editor on Unix. Do you have a recommendation? so long, benny