James G. Sack (jim) wrote:
> James G. Sack (jim) wrote:
>> ..
>>.. (B=big; dd if=$B bs=$(echo `stat -c"%s" $B` -10 |bc) count=1 of=little)
>>
>> Above tests ok.
> 
> Well it tests ok for a 500 MB file.
> 
> I believe stat and dd work above 2GB, but haven't tested.
> 
> OK, just tested on a 3.4GB DVD iso. (3447975936-10)
> 
> ==> dd quits at 2147479552 bytes.
> 
> Seems like maybe bs has a 2GB limit?
> 
> ..and all the io does impact the X interface latency!

perl comes through fine on my 3447975936 Byte (3.3GiB) file

shorten-10bytes.pl
"""
#!/usr/bin/perl -w
use strict;
use warnings;

my $f=$ARGV[0];
my $l=-s $f;
print "file '$f' ($l bytes)\n";

$l -= 10;
my $h;
######################################################################
#read perldoc -f open, wrong opt would pre-trunc to 0
open $h,"+<",$f;
######################################################################
truncate $h,$l;
close $h;
my $s=-s $f;
print "file '$f' now $s bytes\n";
"""


Regards,
..jim


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

Reply via email to