06-12-2012
What Operating System and version are you running?
How big are the files?
Are either or both of the files in sorted order?
Do the records in each file match one-for-one?
Does the output order matter?
Can you post sample input and matching output?
Is this an extract from a database where it might be easier to work on the data while it is still in the database?
7 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
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?
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
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
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
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
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
LEARN ABOUT FREEBSD
services_mkdb
SERVICES_MKDB(8) BSD System Manager's Manual SERVICES_MKDB(8)
NAME
services_mkdb -- generate the services database
SYNOPSIS
services_mkdb [-b | -l] [-q] [-o database] [file]
services_mkdb -u [file]
DESCRIPTION
The services_mkdb utility creates a db(3) database for the specified file. If no file is specified, then /etc/services is used. The data-
base is installed into /var/db/services.db. The file must be in the correct format (see services(5)).
The options are as follows:
-b Use big-endian byte order for database metadata.
-l Use little-endian byte order for database metadata.
-o database
Put the output databases in the named file.
-q Do not warn about duplicate services.
-u Print the services file to stdout, omitting duplicate entries and comments.
The databases are used by the C library services routines (see
The -b and -l flags are mutually exclusive. The default byte ordering is the current host order. getservent(3)).
FILES
/var/db/services.db The current services database.
/var/db/services.db.tmp A temporary file.
/etc/services The current services file.
EXIT STATUS
The services_mkdb utility exits 0 on success, and >0 if an error occurs.
SEE ALSO
db(3), getservent(3), services(5)
BUGS
Because services_mkdb guarantees not to install a partial destination file it must build a temporary file in the same file system and if suc-
cessful use rename(2) to install over the destination file.
If services_mkdb fails it will leave the previous version of the destination file intact.
BSD
April 4, 2010 BSD