in reply to Re^2: Fastest way of changing the beginning of a txt file.. -- oneliner
in thread Fastest way of changing the beginning of a txt file..
i just want move the filesystem pointer from the actual "begginning of file" to a "new beginning of file"...
No filesystem (AFAIK) provides that facility.
In theory, it could be done (after a fashion) using low-level IO primitives, but only to the nearest block boundary -- which might be modulus 512, 4096 or some other power of 2 depending upon the device the file is located on -- which isn't very useful.
It is possible to truncate the end of a file on most file systems; and again in theory, it might be somewhat quicker to copy the rest of the file over the removed portion in situ, then truncate the end. But it is easy to get this wrong and there is no guarentee it will be quicker on any given device or day.