Andrew Lentvorski wrote:
Is there a quick way to remove the last 10 bytes from a big honking file?

I asked this same question a while ago and the answer is no. Just about every solution you get involves making a copy somewhat along the lines of using dd to copy everything but the last few bytes. My application was to trim the last block off a ISO image obtained by doing a dd of a CDROM/DVD.

The problem arises because of the virtualization of file systems. It takes direct intimate relations with the underlying file system to be able to manipulate the file size indicators and to move the last pointer /extent/branch/whatever-they-use-for-the-filesystem.

I've seen a reference to a utility for use on ext2 file systems, but I can't remember what I did with it. I think fat and fat32 file systems have simple utilities for trimming files left over from the DOS days that may be "good enough" depending on what you are doing.

Gus


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to