Remove x number of lines from beginning of file

Michael L Torrie torriem at chem.byu.edu
Fri Oct 26 12:59:10 MDT 2007


Nicholas Leippe [+1 no top post!] wrote:
> If what you really want to do is alter the file, then there really is no way 
> around moving all the data with current file systems--but you can do so with 
> a choice of methods, some slower, some faster.  Unless, you rewrote the 
> filesystem to be a rope container, then it could be very trivial operation to 
> slice off any subset of a file.  Maybe not a bad idea for some applications 
> (databases come to mind).

There were file systems back in the day that actually allowed truncating
a file in constant time from either end, or even prepend data.  I don't
think any of the current, popular file systems do, because that corner
case just isn't worth optimizing for.



More information about the PLUG mailing list