From: David Masover Date: 2008-06-04T06:01:51+09:00 Subject: Re: deleting first line from a file On Tuesday 03 June 2008 14:59:17 suresh wrote: > Hi > > I have a HUGE data file multiple lines of data. I want to delete just > the first line from it. How to do it efficiently? Depends what you mean by "efficiently". Removing data from the end of a file takes close to no time at all, if you do it right -- it just requires truncating the file. Removing data from the beginning of a file, or the middle of a file, isn't something most filesystems will let you do. As Chris said, you're going to have to read the entire file in (minus the line you want removed) and output it to another file. (Or rather, that's what his tail command does.) So, if we're talking about a multi-gigabyte file, it's going to take a few minutes.