getmerge

Takes a source directory and a destination file as inputted and concatenates files into the destination local file.
Optionally -nl can be set to enable adding a newline character (LF) at the end of each file; -skip-empty-file can be used to avoid unwanted newline characters in case of empty files.

Returns 0 on success and non-zero on error.

The usage is as follows:

$ hadoop fs -getmerge [-nl] <src> <localdst>

Example:

$ hadoop fs -getmerge -nl /src /opt/output.txt
$ hadoop fs -getmerge -nl /src/file1.txt /src/file2.txt /output.txt
Found a mistake? Seleсt text and press Ctrl+Enter to report it