M.Zhu
M.Zhu

Reputation: 152

Append hdfs file to local file?

Since I can use hdfs dfs -appendToFile <localFile> ... <hdfsFile> command to append local file to hdfs files as mentioned in HDFS Command Line Append. Are there any similar commands that allow me to append files in the opposite direction? That is, append hdfs files to certain local file. For example, some commands like

# append files to local
hdfs dfs -appendToLocal <hdfsFile> <localFile>

Upvotes: 0

Views: 293

Answers (1)

M.Zhu
M.Zhu

Reputation: 152

I found that hdfs dfs -getmerge solves my question.

hdfs dfs -getmerge -nl <hdfsFile1> <hdfsFile2> ... <hdfsFileN>  <localFile>

Upvotes: 1

Related Questions