I forgot to stop a TV recording, which resulted in a giant file taking up all remaining free space on disk.
Now I want to keep only the first 12GB from this file.
The disk is so full I can't free 12GB on it, to be able to use the "head" command.
I know I can (and will) use something like "head --bytes=12000m FILE | ssh remoteuser@remotehost 'cat >TAIL-FILE'". But…
I'd like to know how I can truncate a file to its first bytes when neither the network nor extra disk space is available.
Yves.
