command-definition.tail.xml Maven / Gradle / Ivy
<?xml version="1.0"?> <command-def xmlns="http://www.unix4j.org/command-def" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.unix4j.org/command-def command-def.xsd"> <command name="tail" class="org.unix4j.unix.Tail" package="org.unix4j.unix.tail"/> <name> tail - display the last part of a file </name> <synopsis> ORIGINAL: tail [-n number][file...] CURRENT: tail [-cqs][file ...] </synopsis> <description ref="tail.html"/> <notes/> <methods> <method args="" usesStandardInput="true"> Reads the last 10 lines from the standard input and writes them to the standard output. </method> <method args="args" usesStandardInput="false"> Reads the last n lines from each of the files specified and writes them to the standard output. If more than a single file is specified, each file is preceded by a header consisting of the string {@code "==> XXX <=="} where {@code "XXX"} is the name of the file. Options can be specified by acronym (with a leading dash "-") or by long name (with two leading dashes "--"). Operands other than the default "--paths" operand have to be prefixed with the operand name. </method> <method args="count" usesStandardInput="true"> Reads the last {@code count} lines from the standard input and writes them to the standard output. </method> <method args="options,count" usesStandardInput="true"> Reads the last {@code count} lines or characters from the standard input and writes them to the standard output. </method> <method args="files" usesStandardInput="false"> Reads the last 10 lines from each of the specified files and writes them to the standard output. If more than a single file is specified, each file is preceded by a header consisting of the string {@code "==> XXX <=="} where {@code "XXX"} is the name of the file. </method> <method args="count,files" usesStandardInput="false"> Reads the last {@code count} lines from each of the specified files and writes them to the standard output. If more than a single file is specified, each file is preceded by a header consisting of the string {@code "==> XXX <=="} where {@code "XXX"} is the name of the file. </method> <method args="count,paths" usesStandardInput="false"> Reads the last {@code count} lines from each of the specified files and writes them to the standard output. If more than a single file is specified, each file is preceded by a header consisting of the string {@code "==> XXX <=="} where {@code "XXX"} is the name of the file. </method> <method args="options,count,files" usesStandardInput="false"> Reads the last {@code count} lines or characters from each of the specified files and writes them to the standard output. If more than a single file is specified and the {@code -q} option is not specified, each file is preceded by a header consisting of the string {@code "==> XXX <=="} where {@code "XXX"} is the name of the file. </method> <method args="options,count,paths" usesStandardInput="false"> Reads the last {@code count} lines or characters from each of the specified files and writes them to the standard output. If more than a single file is specified and the {@code -q} option is not specified, each file is preceded by a header consisting of the string {@code "==> XXX <=="} where {@code "XXX"} is the name of the file. </method> </methods> <options> <option name="chars" acronym="c"> The {@code count} argument is in units of characters instead of lines. Starts from 1 and includes line ending characters. </option> <option name="suppressHeaders" acronym="q"> Suppresses printing of headers when multiple files are being examined. </option> <option name="countFromStart" acronym="s"> The {@code count} argument is relative to the beginning of the file instead of counting from the end of the file. For instance, {@code tail -s 10} prints the lines starting from line 10; {@code tail -s 1} prints the whole file. </option> </options> <operands default="paths"> <operand name="count" type="long"> The last {@code count} lines of each input file are copied to standard output, starting from 1 (characters instead of lines if the {@code -c} option is specified, and offset from start instead of end with {@code -s} option). Must be a non-negative integer or an exception is thrown. If {@code count} is greater than the number number of lines (characters) in the input, the application will not error and send the whole file to the output. </operand> <operand name="paths" type="String..."> Pathnames of the input files to be filtered; wildcards * and ? are supported; relative paths are resolved on the basis of the current working directory. </operand> <operand name="files" type="java.io.File..."> The input files to be filtered; relative paths are not resolved (use the string paths argument to enable relative path resolving based on the current working directory). </operand> <operand name="args" type="String..."> String arguments defining the options and operands for the command. Options can be specified by acronym (with a leading dash "-") or by long name (with two leading dashes "--"). Operands other than the default "--paths" operand have to be prefixed with the operand name (e.g. "--count" for a subsequent count operand value). </operand> <operand name="options" type="TailOptions"> Options for the tail command. </operand> </operands> </command-def>