codafind

This documentation describes the functionality of the codafind tool which is part of CODA.

General description

The codafind tool is able to assist you in searching for specific product files within a large set of locally available (product) files. The tool supports searching within a given list of files. If you provide one or more directories, then codafind will search these directories recursively for files that match the given search criteria. It is possible to provide a mix of files and directories as arguments to codafind.

    codafind [-D definitionpath] [<options>] <files|directories>
        Match a filter on a series of files and/or recursively on all contents
        of directories

        Options:
            -d, --disable_conversions
                    do not perform unit/value conversions
            -f, --filter '<filter expression>'
                    restrict the output to data that matches the filter
                    if no filter is provided codafind will find all files that
                    can be opened with CODA
            -V, --verbose
                    show the match result for each file

    CODA will look for .codadef files using a definition path, which is a ':'
    separated (';' on Windows) list of paths to .codadef files and/or to
    directories containing .codadef files.
    By default the definition path is set to a single directory relative to
    the tool location. A different definition path can be set via the
    CODA_DEFINITION environment variable or via the -D option.
    (the -D option overrides the environment variable setting).

You can provide a search criterium with the -f option. If you do not explicitly provide a search criterium codafind will try to find all files that can be accessed with CODA. If you do provide a search criterium, codafind will try to match each file it can open with CODA against the filter. If the filter matches positively then it will print the path to this file to the console. The filter should be a valid boolean CODA expression.

If you want to see the result of the search filter for each of the files that codafind checks you can use the -V,--verbose option. When you provide this option, codafind will show you the filepath followed by the match result for each of the files it encounters.

As is explained further in the next section, with codafind it is possible to create filter expressions in which you perform some comparison against data inside a product file. Since codafind uses the CODA C library to read the data from a product file, by default it will read the unit/value converted value. If you want to disable this conversion you can use the -d option and comparison will then be done with the 'raw' product data.