Not much point in seeking twice is there? The latter seek, seeks to 2048 bytes from the end - no reason to first seek to the end. And for readability (and portability) reasons, I would use seek FILE, -2048, SEEK_END;, importing the constant from Fcntl.seek FILE,0, 2; #go to EOF seek FILE,-2048,2; #get last 2k bytes
In reply to Re^2: truncate a file from top
by Anonymous Monk
in thread truncate a file from top
by SiLiK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |