10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am looking for help in processing of those options: '-n' or '-p'
I understand what they do and how to use them.
But, I would like to use them with more than one file (and without any shell-loop; loading the 'perl' once.)
I did try it and -n works on 2 files.
- is it possible to... (6 Replies)
Discussion started by: alex_5161
2. Shell Programming and Scripting
here is what i want to achieve.. i have a file with below contents
blah blah blah
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
more blah blah blah
--dport 3306... (14 Replies)
Discussion started by: vivek d r
3. UNIX for Dummies Questions & Answers
I've a requirement to modify an existing line which is common to multiple files. I need to replace that existing line with a new line. I've almost 900 ksh files to edit in the similar fashion in the same directory.
Existing Line: . $HOME/.eff.env (notice the "." at the... (3 Replies)
Discussion started by: kaleem.adil
4. Shell Programming and Scripting
I have spent half a day trying to create a shell script which reads a configuration file on a line by line basis.
The idea of the file is that each will contain server information, such as IP address and various port numbers. The line could also be blank (The file is user created). Here... (1 Reply)
Discussion started by: haggismn
5. UNIX for Dummies Questions & Answers
I'm trying extract a number of filename fields from a log file and copy them out as separate rows in a text file so i can load them into a table. I'm able to get the filenames but the all appear on one line. I tried using the cut command with the -d (delimiter) option but cant seem to make it... (1 Reply)
Discussion started by: Sinbad-66
6. Shell Programming and Scripting
I would perfer to use cut and paste to do this but I can't find a GUI to do this with. What I want to do is to find a multiple line block of code like
then replace it with
Basically it is just an insert, but I may want to... (8 Replies)
Discussion started by: Randem
7. Shell Programming and Scripting
I have two files that I need to compare and print out the line from file2 that has the first 6 fields matching the first 6 fields in file1. Complicating this are the following restrictions
1. file1 is only a few thousand lines at most and file2 is greater than 2 million
2. I need to... (7 Replies)
Discussion started by: gillesc_mac
8. Shell Programming and Scripting
I'm struggling to write a script to do the following,
-will go through each line in the file
-in a specific character positions, changes
the value to a new value
-These character positions are fixed througout the file
e.g.: file1.sh will have the following 3... (4 Replies)
Discussion started by: vini99
9. Shell Programming and Scripting
Hi All i have a file that is to big for vi and is a multiple line record
4|00:00:0C:07:AC:06|655016000575511|05||3C65|0D029C1D|||00644B5A|||||||||||inter... (5 Replies)
Discussion started by: gseptember
10. Shell Programming and Scripting
good day. i jsut wanted to know what is the best script or the best way changing a lot of Ip's in all servers. Do you have any idea? im using awk to change IP,what if, you have lots of servers. You need to change it one by one? It will take time to change it manually. (2 Replies)
Discussion started by: kenshinhimura
bup-margin(1) General Commands Manual bup-margin(1)
bup-margin - figure out your deduplication safety margin
bup margin [options...]
bup margin iterates through all objects in your bup repository, calculating the largest number of prefix bits shared between any two
entries. This number, n, identifies the longest subset of SHA-1 you could use and still encounter a collision between your object ids.
For example, one system that was tested had a collection of 11 million objects (70 GB), and bup margin returned 45. That means a 46-bit
hash would be sufficient to avoid all collisions among that set of objects; each object in that repository could be uniquely identified by
its first 46 bits.
The number of bits needed seems to increase by about 1 or 2 for every doubling of the number of objects. Since SHA-1 hashes have 160 bits,
that leaves 115 bits of margin. Of course, because SHA-1 hashes are essentially random, it's theoretically possible to use many more bits
with far fewer objects.
If you're paranoid about the possibility of SHA-1 collisions, you can monitor your repository by running bup margin occasionally to see if
you're getting dangerously close to 160 bits.
Guess the offset into each index file where a particular object will appear, and report the maximum deviation of the correct answer
from the guess. This is potentially useful for tuning an interpolation search algorithm.
don't use .midx files, use only .idx files. This is only really useful when used with --predict.
$ bup margin
Reading indexes: 100.00% (1612581/1612581), done.
40 matching prefix bits
1.94 bits per doubling
120 bits (61.86 doublings) remaining
4.19338e+18 times larger is possible
Everyone on earth could have 625878182 data sets
like yours, all in one repository, and we would
expect 1 object collision.
$ bup margin --predict
PackIdxList: using 1 index.
Reading indexes: 100.00% (1612581/1612581), done.
915 of 1612581 (0.057%)
Part of the bup(1) suite.
Avery Pennarun <firstname.lastname@example.org>.
Bup unknown- bup-margin(1)