Sponsored Content
Top Forums Shell Programming and Scripting Matching 10 Million file records with 10 Million in other file Post 302654731 by vguleria on Tuesday 12th of June 2012 08:25:37 AM
Old 06-12-2012
Matching 10 Million file records with 10 Million in other file

Dear All,

I have two files both containing 10 Million records each separated by comma(csv fmt).
One file is input.txt other is status.txt.

Input.txt-> contains fields with one unique id field (primary key we can say)
Status.txt -> contains two fields only:1. unique id and 2. status

problem: match id from input.txt to id from status.txt and update/log the status accordingly in output file.

requirement: need efficient algo for getting the solution in minimal time. tried perl, but system hangs during processing. Pls suggest if there's a workable way to do the same. Is it doable in perl or c/c++/java ?

Thanks.
 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extract data from large file 80+ million records

Hello, I have got one file with more than 120+ million records(35 GB in size). I have to extract some relevant data from file based on some parameter and generate other output file. What will be the besat and fastest way to extract the ne file. sample file format :--... (2 Replies)
Discussion started by: learner16s
2 Replies

2. Shell Programming and Scripting

sort a file which has 3.7 million records

hi, I'm trying to sort a file which has 3.7 million records an gettign the following error...any help is appreciated... sort: Write error while merging. Thanks (6 Replies)
Discussion started by: greenworld
6 Replies

3. What is on Your Mind?

Pick a Number Between 0 and 20 for 1 Million Bits

Here is an easy game! I wrote a number between 0 and 20 (that can include 0 and 20) on a piece of paper. I am staring at it now, imagining the number so you can read my mind ;) Reply once, and only once, with a number from 0 to 20 and the first person to guess it wins 1,000,000 Bits. ... (24 Replies)
Discussion started by: Neo
24 Replies

4. Shell Programming and Scripting

Tail 86000 lines from 1.2 million line file?

I have a log file that is about 1.2 million lines long and about 300MB. we need a way to clean up this file and only keep the last few thousand lines. if i use tail command we run our of memory as the file is too big. I do have a key word to match on. example, we want to keep every line... (8 Replies)
Discussion started by: robsonde
8 Replies

5. UNIX for Dummies Questions & Answers

Pls. help with script to remove million files

Hi, one of the server, log directory was never cleaned up. We have so many files. I want to remove all the files that starts with dfr* but I get error message when I use the *. rm qfr* bash: /usr/bin/rm: Arg list too long I am trying to write this script but not working. ... (4 Replies)
Discussion started by: samnyc
4 Replies

6. UNIX for Dummies Questions & Answers

Deleting a million of files ..

Hi, Which way is faster rm -rf /path/ or find / -name -exec rm {} \; and why? (7 Replies)
Discussion started by: cain82
7 Replies

7. UNIX for Dummies Questions & Answers

Add 1 million columns

Hi, here is my problem: I've got a file with 6 columns (file1): a b c d e f a b c d e f a b c d e f a b c d e f I need to add 1 million columns to this file, each column needs to be a zero. Here is how the result file (file2) should look like (for the sake of the example, I've only... (7 Replies)
Discussion started by: zajtat
7 Replies
ldns-gen-zone(1)					      General Commands Manual						  ldns-gen-zone(1)

NAME
ldns-gen-zone - read a zonefile and print it while adding DS records and extra RR's SYNOPSIS
ldns-gen-zone ZONEFILE DESCRIPTION
ldns-gen-zone reads a DNS zone file and prints it. It is build for speed, not for a nice formatting. The output has one resource record per line and no pretty-printing makeup. DNSSEC data (NSEC, NSEC3, RRSIG or DNSKEY) is not stripped. You may want to use ldns-read-zone for that. Existing DS records are also not stripped. The idea is to use this tool for quickly generating a representative artificial zonefile from a real zonefile, to use it for testing pur- poses. OPTIONS
-a NUM Adds NUM extra artificial NS RRSets to the output. The RRSets owner names start with 'xn--' in an attempt to ensure uniqueness (nl.-zone does not support IDN's - and this tool was written with that knowledge in mind). An artificial NS RRSet has two NS records; ns1.example.com and ns2.example.com. -p NUM Add NUM% of DS RRSets to the NS RRSets (anywhere between 1-4 DS records per RRSet). -o ORIGIN Sets an $ORIGIN, which can be handy if the one in the zonefile is set to '@' for example. If there is an $ORIGIN in the zonefile, this option will silently be ignored. -s This is the recommended way of processing large zones that are already sorted and canonicalized (ie lowercase). It skips the sorting and canonicalization step that is required for properly grouping RRSets together (before adding any DS records to them. Skipping this step will speed things up. It is not recommended to use this option if you want to add DS records to unsorted, non-canonicalized zones. -h Show usage and exit. -v Show version and exit. EXAMPLES
ldns-gen-zone -a 100000 -p 10 -s ./zonefile.txt Read a zonefile, add 100.000 artificial NS RRSets and 10% of DS records, print it to standard output. Don't sort (will only work well if the input zonefile is already sorted and canonicalized). ldns-gen-zone -p 10 -s -o nl zonefile.txt | named-compilezone -s relative -i none -o zonefile_10.txt nl /dev/stdin This creates a nicely formatted zone file with the help of named-compilezone. It adds 10% DS records to the .nl zone, reformats it and saves it as zonefile_10.txt. AUTHOR
Initially written by Marco Davids, several modifications added by Miek Gieben, both from SIDN. REPORTING BUGS
Report bugs to <ldns-team@nlnetlabs.nl>. BUGS
Only undiscovered ones. CAVEATS
May require a machine with a considerable amount of memory for large zone files. Fake DS records hashes are generated as digest type SHA-256 (RFC4509). Be aware not to change the DIGESTTYPE #define in the source code in anything else but 2 if you want to keep things realistic. Despite a number of efforts, this program is still not the fastest in the world. COPYRIGHT
Copyright (C) 2010 SIDN. This is free software. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 June 2010 ldns-gen-zone(1)
All times are GMT -4. The time now is 02:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy