Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!mp.cs.niu.edu!ux1.cso.uiuc.edu!osiris.cso.uiuc.edu!gordon From: gordon@osiris.cso.uiuc.edu (John Gordon) Newsgroups: comp.unix.questions Subject: Re: need help on unix Message-ID: <1991Jun11.234140.7242@ux1.cso.uiuc.edu> Date: 11 Jun 91 23:41:40 GMT References: <1991Jun11.004109.21966@unixg.ubc.ca> Sender: usenet@ux1.cso.uiuc.edu (News) Distribution: na Organization: University of Illinois at Urbana Lines: 24 wangf@unixg.ubc.ca (Frank Wang) writes: >Does anyone out there know how to delete the first few lines or the last >few lines from a file without evoke a editor? The reason is the file is >too large to be edited. Well, these may not be the most efficient ways, but they should work: (Assuming we are working with "bigfile", which is 99999 lines long) % head -99989 bigfile > bigfile2 (The above command makes a copy of bigfile, minus the last 10 lines) % tail +10 bigfile > bigfile3 (The above command makes a copy of bigfile, minus the first 10 lines) --- John Gordon Internet: gordon@osiris.cso.uiuc.edu #include gordon@cerl.cecer.army.mil #include