Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.bsu.edu (Rahul Dhesi) Newsgroups: comp.unix.wizards Subject: Extending a file backwards Summary: was Re: Releasing blocks from a file Keywords: extending files backwards at beginning Message-ID: <7344@bsu-cs.bsu.edu> Date: 20 May 89 20:20:33 GMT References: <461@anvil.oz> <508@chudich.co.rmit.oz> Reply-To: dhesi@bsu-cs.bsu.edu (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 20 While we are on the subject (sort of), here is another idea. I want to be able to say lseek (fd, (long) -count, 1); write (fd, buf, count); and have it work even if the file pointer is at the beginning of the file. This will not be easy to implement. It will require the filesystem to add a block to the beginning of the file (easy), and remember where within that block the file actually starts (harder). But it could be very useful. Many programs (e.g. sendmail) spend a lot of time manipulating headers in a message without touching the body. My repl command adds a Replied: header as the first line in each message to which I reply. Currently these manipulations involve making a new copy of the message. -- Rahul Dhesi UUCP: ...!{iuvax,pur-ee}!bsu-cs!dhesi