(logo)
(navigation image)
Home Wayback Machine | Blog | Researcher Access | FreeCache | Community Wireless | Petabox | Heritrix | Open Source Media | BookMobile

Search: Advanced Search

UploadAnonymous User (login or join us) 
 Reference Links
Researcher access is currently not available pending redesign. This material has been retained for reference and was current information as of late 2002.

Data Available
Tools Available
Example Projects
Tool Documentation
Example Code
av_sort
USAGE : av_sort files...

av_sort works just like regular sort, but much faster. Supports these additional command line options :

-v N
Verbosity level. 1 for some information, 2 for lots.
-p N
use N processors. Specifically, have N simultaneous threads doing in-memory sort
-N N
NMERGE. Maximum number of files to merge at once. default=1024
-R MB
approximate RAM (in MB) that sort should try to not exceed. The default is 3/4 of the physical RAM.
-T DIR
-T DIR1,DIR2
If two temp directories are specified, both are used.
else if one is specified, it is used.
else if the environment variable $TMPDIR is specified, that is used.
else /var/tmp is used.
-U ChunkSize
Size of text buffers, or temporary files. Probably only useful for testing.
-V Chunks
Number of temporary files. Probably only useful for testing.
-Z KB
mergealloc -- in kilobytes default=32K
The complete list of options is
Usage: av_sort [OPTION]... [FILE]...
Write sorted concatenation of all FILE(s) to standard output.

+POS1 [-POS2] start a key at POS1, end it *before* POS2 (obsolescent)
field numbers and character offsets are numbered
starting with zero (contrast with the -k option)
-b ignore leading blanks in sort fields or keys
-B buffers total number of simultaneous sort buffers. Default 1 or processors+2.
-c check if given files already sorted, do not sort
-d consider only [a-zA-Z0-9 ] characters in keys
-f fold lower case to upper case characters in keys
-g compare according to general numerical value, imply -b
-i consider only [\040-\0176] characters in keys
-k POS1[,POS2] start a key at POS1, end it *at* POS2
field numbers and character offsets are numbered
starting with one (contrast with zero-based +POS form)
-m merge already sorted files, do not sort
-M compare (unknown) < `JAN' < ... < `DEC', imply -b
-n compare according to string numerical value, imply -b
-N maximum temp files to merge at once, default=1024
-o FILE write result on FILE instead of standard output
-p processors number of simultaneous sort threads to invoke. Default 1
-r reverse the result of comparisons
-R totalMem megabytes of RAM we will try not to exceed. default=100
-s stabilize sort by disabling last resort comparison
-t SEP use SEParator instead of non- to whitespace transition
-T DIRECTORY use DIRECTORY for temporary files, not $TMPDIR or /var/tmp
-T DIR1,DIR2 use two alternating directories for temporary files
-u with -c, check for strict ordering;
with -m, only output the first of an equal sequence
-U as -u, but keep only a unique prefix, i.e. 'a ab abc b' becomes 'a b'
-v write a bunch on nonsence to stderr
-x subFile if using --subexact or --subprefix, write the subtracted lines to subFile
-z end lines with 0 byte, not newline, for find -print0
-Z mergealloc K bytes of mem to use for each read buffer during merge, default=32
--help display this help and exit
--version output version information and exit
--diff do a diff of two files, both assumed to be sorted
--intersect print the intersection of all given (sorted) files
--quicksort use a special quicksort for in-memory sorting (default)
--qsort use the system qsort for in-memory sort
--stablesort use a slower sort that keeps existing order where possible. default if -s is specified
--subexact assuming sorted input, print the first thing minus lines in the second thing
--subprefix assuming sorted input, print the first thing minus lines prefixed by something in the second thing
POS is F[.C][OPTS], where F is the field number and C the character position
in the field, both counted from one with -k, from zero with the obsolescent
form. OPTS is made up of one or more of Mbdfinr; this effectively disables
global -Mbdfinr settings for that key. If no key is given, use the entire
line as the key. With no FILE, or when FILE is -, read standard input.
For yet more information, try "man sort".


Terms of Use (10 Mar 2001)