Next Previous Up Contents
Next: Examples
Up: tcopy: Table Format Converter
Previous: tcopy: Table Format Converter

A.1.1 Usage

The basic usage of tcopy is

    tcopy [-ifmt <in-format>] [-ofmt <out-format>] [<other-flags>]
          <in-table> [<out-table>]
If you don't have the Unix scripts installed, invoke it as described in Section 2 using the classname uk.ac.starlink.ttools.TableCopy.

The most important arguments are as follows:

-ifmt <in-format>
Specifies the format of the input table (one of the known formats listed in Section 3.1 - matching is case-insensitive). This flag can be used if you know what format your input table is in. If it's omitted, then an attempt will be made to detect the format of <in-table> automatically, but this cannot always be done correctly, in which case the program will exit with an error explaining which formats were attempted.
-ofmt <out-format>
Specifies the format in which the output table will be written (one of the ones listed in Section 3.2 - matching is case-insensitive and you can use just the first few letters). If this flag is omitted, then the output filename will be examined to try to guess what sort of file is required, usually by looking at the extension. If it's not obvious from the filename what output format is required, the program will exit with an error.
<in-table>
The location of the input table. This is usually a filename or a URL, and may point to a file compressed in one of the supported compression formats (Unix compress, gzip or bzip2). If it is equal to the special value "-", the input table will be read from standard input. In this case the input format must be given explicitly using the -ifmt flag.
<out-table>
The location of the output table. This is usually a filename to write to. If omitted, or if it is equal to the special value "-", the output table will be written to standard output. In this case the output format must be given explicitly using the -ofmt flag.

The following generic flags can also be used:

-h[elp]
Prints a usage message and exits.
-debug
Causes any error messages, which are usually made brief, to be accompanied by a stack trace. If you are reporting a bug (or debugging the code yourself), then you should use this flag to get the most information about what has gone wrong.
-disk
Encourages the command to use temporary files on disk for caching large amounts of data rather than doing it in memory. This is a good flag to try if you are getting OutOfMemoryErrors. This flag is in most cases equivalent to specifying the system property -Dstartable.storage=disk.
-v[erbose]
May cause more information about progress to be written as the command runs.


Next Previous Up Contents
Next: Examples
Up: tcopy: Table Format Converter
Previous: tcopy: Table Format Converter

STILTS - Starlink Tables Infrastructure Library Tool Set
Starlink User Note 256
STILTS web page: http://www.starlink.ac.uk/stilts/
Author email: m.b.taylor@bristol.ac.uk