Dunno if this was handled yet, but: Karl Sinn wrote:
sounds like the perfect occasion for using some scripting language like perl: - read the file - find the first occasion of "!BDN" - write all the rest in a new file
I'm not an expert with perl, but this should be an easy thing.
Pretty much: #!/usr/bin/perl use warnings;use strict; # while (@ARGV) { my $fname= shift @ARGV; my $outname=$fname.".out"; my $sig="!BDN\n"; my $file; open(my $h, "<:raw", $fname) or die "cannot open $fname:$!"; $/=undef; $file=<$h>; $file =~ s/^.*!BDN\n//s; close $h; open(my $ho, ">:raw", $outname) or die "cannot open $outname for out:$!"; print $ho $file; close $ho; } ---- name it something, then in your dir of junk: rmjnk *.PST It will put the uncorrupted stuff in <file>.PST.out 1 file for each input file. for a 186M file:
time /tmp/c junkryo.mkv 1.21sec 1.01usr 0.20sys (99.96% cpu)
cmp is happy:
cmp ryo.mkv junkryo.mkv.out
created: printf "!BDN\n" >bdn cat ../palemoon-loginfail-trace.txt bdn ryo.mkv >junkryo.mkv It assumes you have enough memory to hold a file for processing. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org