appendToFile

Appends a single source, or multiple sources from a local file system to the destination file system.
Also reads input from stdin and appends to the destination file system.

The destination file gets created if it doesn’t already exist.

Returns 0 on success and -1 on error.

The usage is as follows:

$ hadoop fs -appendToFile <localsrc> ... <dst>

Example:

$ hadoop fs -appendToFile localfile /user/hadoop/hadoopfile
$ hadoop fs -appendToFile localfile1 localfile2 /user/hadoop/hadoopfile
$ hadoop fs -appendToFile localfile hdfs://nn.example.com/hadoop/hadoopfile
$ hadoop fs -appendToFile - hdfs://nn.example.com/hadoop/hadoopfile
Found a mistake? Seleсt text and press Ctrl+Enter to report it