Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
rwappend(1)			 SiLK Tool Suite		     rwappend(1)

NAME
     rwappend - Append SiLK Flow file(s) to an existing SiLK Flow file

SYNOPSIS
       rwappend [--create=[TEMPLATE_FILE]] [--print-statistics]
	      [--site-config-file=FILENAME]
	      TARGET_FILE SOURCE_FILE [SOURCE_FILE...]

       rwappend --help

       rwappend --version

DESCRIPTION
     rwappend reads SiLK Flow records from the specified SOURCE_FILEs and ap-
     pends them to the TARGET_FILE.  If "stdin" is used as the name of one of
     the SOURCE_FILEs, SiLK flow records will be read from the standard input.

     When the TARGET_FILE does not exist and the --create switch is not pro-
     vided, rwappend will exit with an error.  When --create is specified and
     TARGET_FILE does not exist, rwappend will create the TARGET_FILE using the
     same format, version, and byte-order as the specified TEMPLATE_FILE.  If no
     TEMPLATE_FILE is given, the TARGET_FILE is created in the default format
     and version (the same format that rwcat(1) would produce).

     The TARGET_FILE must be an actual file---it cannot be a named pipe or the
     standard output.  In addition, the header of TARGET_FILE must not be com-
     pressed; that is, you cannot append to a file whose entire contents has
     been compressed with gzip (those files normally end in the ".gz" exten-
     sion).

OPTIONS
     Option names may be abbreviated if the abbreviation is unique or is an ex-
     act match for an option.  A parameter to an option may be specified as
     --arg=param or --arg param, though the first form is required for options
     that take optional parameters.

     --create
     --create=TEMPLATE_FILE
	 Create the TARGET_FILE if it does not exist.  The file will have the
	 same format, version, and byte-order as the TEMPLATE_FILE if it is pro-
	 vided; otherwise the defaults are used.  The TEMPLATE_FILE will NOT be
	 appended to TARGET_FILE unless it also appears in as the name of a
	 SOURCE_FILE.

     --print-statistics
	 Print to the standard error the number of records read from each
	 SOURCE_FILE and the total number of records appended to the TAR-
	 GET_FILE.

     --site-config-file=FILENAME
	 Read the SiLK site configuration from the named file FILENAME.  When
	 this switch is not provided, rwappend searches for the site configura-
	 tion file in the locations specified in the "FILES" section.

     --help
	 Print the available options and exit.

     --version
	 Print the version number and information about how SiLK was configured,
	 then exit the application.

EXAMPLES
     In the following examples, the dollar sign ("$") represents the shell
     prompt.  The text after the dollar sign represents the command line.  Lines
     have been wrapped for improved readability, and the back slash ("\") is
     used to indicate a wrapped line.

     Standard usage where the file to append to, results.rw, exists:

      $ rwappend results.rw sample5.rw sample6.rw

     To append files sample*.rw to results.rw, or to create results.rw using the
     same format as the first file argument (note that sample1.rw must be re-
     peated):

      $ rwappend results.rw --create=sample1.rw 	 \
	     sample1.rw sample2.rw

     If results.rw does not exist, the following two commands are equivalent:

      $ rwappend --create results.rw sample1.rw sample2.rw

      $ rwcat sample1.rw sample2.rw > results.rw

ENVIRONMENT
     SILK_CONFIG_FILE
	 This environment variable is used as the value for the --site-con-
	 fig-file when that switch is not provided.

     SILK_DATA_ROOTDIR
	 This environment variable specifies the root directory of data reposi-
	 tory.	As described in the "FILES" section, rwappend may use this envi-
	 ronment variable when searching for the SiLK site configuration file.

     SILK_PATH
	 This environment variable gives the root of the install tree.	When
	 searching for configuration files, rwappend may use this environment
	 variable.  See the "FILES" section for details.

FILES
     ${SILK_CONFIG_FILE}
     ${SILK_DATA_ROOTDIR}/silk.conf
     /data/silk.conf
     ${SILK_PATH}/share/silk/silk.conf
     ${SILK_PATH}/share/silk.conf
     /usr/local/share/silk/silk.conf
     /usr/local/share/silk.conf
	 Possible locations for the SiLK site configuration file which are
	 checked when the --site-config-file switch is not provided.

SEE ALSO
     rwcat(1), silk(7)

BUGS
     When a SOURCE_FILE contains IPv6 flow records and the TARGET_FILE only sup-
     ports IPv4 records, rwappend converts IPv6 records that contain addresses
     in the ::ffff:0:0/96 prefix to IPv4 and writes them to the TARGET_FILE.
     rwappend silently ignores IPv6 records having addresses outside of that
     prefix.

     rwappend makes some attempts to avoid appending a file to itself (which
     would eventually exhaust the disk space) by comparing the names of files it
     is given; it should be smarter about this.

SiLK 3.22.2			   2026-08-27			     rwappend(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=rwappend&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help