It is not much clearer to me WHAT you really need in the end, but Don Cragun's analysis proves right when seeing your second sample input file.
You might want to safeguard your script by adding some tests for applicability (or justification) of the modifications:
Adding some or all of your "damage producers" is not a problem once it is known which should be included
Hello, I'm absolutely new to this world... but I've a problem with a terminal connected via PuTTY (or Termlite) to an AIX 5.1 application.
The problem: I need to paste from clipboard a text containing both input text strings and special keys as ESC, Arrows and so on, to execute in the AIX... (1 Reply)
Hello,
Can anybody please tell me how we can copy and paste text from a word document into a text file that we are editing in vi? Is it possible to do that while we are editing the text file in vi in insert mode?
Thanks, (3 Replies)
Hi
Guys , I am new to this and Hi to all ,Need your help
I am trying to copy Files which are inside file.txt
The files inside file.txt are inthe below order
file1.log
file2.log
file3.log
.......
I want to copy these files to an output Directory ,
Please help (1 Reply)
Hi
Guys , I am new to this and Hi to all ,Need your help
I am trying to copy Files which are inside file.txt
The files inside file.txt are inthe below order
file1.log
file2.log
file3.log
.......
I want to copy these files to an output Directory ,
Please help (1 Reply)
I have a text file which contains lines in this format - it contains 105 lines in total, but I'm just putting 4 here to keep it short:
58571,east_ppl_ppla_por
58788,east_pcy_hd_por
58704,east_pcy_ga_por
58697,east_pcy_pcybs_por
It's called id_key.txt
I have a sample folder called... (9 Replies)
I have this text file with a very large number of columns (10,000+) and I want to move the first column to the position of the six column so that the text file looks like this:
Before cutting and pasting
ID Family Mother Father Trait Phenotype
aaa bbb ... (5 Replies)
Hi All,
I want to change the name as SEQ_13
ie., <Property Name="Name">SEQ_13</Property>
when the Stage Type is PxSequentialFile
ie., <Property Name="StageType">PxSequentialFile</Property> :wall:
Input.XML
<Main>
<Record Identifier="V0S13" Type="CustomStage" Readonly="0">... (3 Replies)
Hi I have a text file with lines beginning with 71303, 71403, 71602,
I need to copy the 10 digit text at position 30 on lines beginning with 71303 (5500011446) to position 99 on every line beginning with 71602 (see example below),
There may be many 71303 lines but I need the text copying to... (2 Replies)
Hello Team,
I have 2 files.one contains english text and another contains Japanese. so i have to read english text and replace the text with Japanesh text in third file.
Basically, I need a help to write japanese language in text/xml file.I heard wstring does this.Not sure how do i write... (2 Replies)
Discussion started by: SA_Palani
2 Replies
LEARN ABOUT DEBIAN
bup-damage
bup-damage(1) General Commands Manual bup-damage(1)NAME
bup-damage - randomly destroy blocks of a file
SYNOPSIS
bup damage [-n count] [-s maxsize] [--percent pct] [-S seed] [--equal]
DESCRIPTION
Use bup damage to deliberately destroy blocks in a .pack or .idx file (from .bup/objects/pack) to test the recovery features of bup-fsck(1)
or other programs.
THIS PROGRAM IS EXTREMELY DANGEROUS AND WILL DESTROY YOUR DATA
bup damage is primarily useful for automated or manual tests of data recovery tools, to reassure yourself that the tools actually work.
OPTIONS -n, --num=numblocks
the number of separate blocks to damage in each file (default 10). Note that it's possible for more than one damaged segment to
fall in the same bup-fsck(1) recovery block, so you might not damage as many recovery blocks as you expect. If this is a problem,
use --equal.
-s, --size=maxblocksize
the maximum size, in bytes, of each damaged block (default 1 unless --percent is specified). Note that because of the way bup-
fsck(1) works, a multi-byte block could fall on the boundary between two recovery blocks, and thus damaging two separate recovery
blocks. In small files, it's also possible for a damaged block to be larger than a recovery block. If these issues might be a
problem, you should use the default damage size of one byte.
--percent=maxblockpercent
the maximum size, in percent of the original file, of each damaged block. If both --size and --percent are given, the maximum block
size is the minimum of the two restrictions. You can use this to ensure that a given block will never damage more than one or two
git-fsck(1) recovery blocks.
-S, --seed=randomseed
seed the random number generator with the given value. If you use this option, your tests will be repeatable, since the damaged
block offsets, sizes, and contents will be the same every time. By default, the random numbers are different every time (so you can
run tests in a loop and repeatedly test with different damage each time).
--equal
instead of choosing random offsets for each damaged block, space the blocks equally throughout the file, starting at offset 0. If
you also choose a correct maximum block size, this can guarantee that any given damage block never damages more than one git-fsck(1)
recovery block. (This is also guaranteed if you use -s 1.)
EXAMPLE
# make a backup in case things go horribly wrong
cp -a ~/.bup/objects/pack ~/bup-packs.bak
# generate recovery blocks for all packs
bup fsck -g
# deliberately damage the packs
bup damage -n 10 -s 1 -S 0 ~/.bup/objects/pack/*.{pack,idx}
# recover from the damage
bup fsck -r
SEE ALSO bup-fsck(1), par2(1)BUP
Part of the bup(1) suite.
AUTHORS
Avery Pennarun <apenwarr@gmail.com>.
Bup unknown-bup-damage(1)