hadoop fs -get
hadoop fs -copyToLocal
Above HDFS commands can be used for copying the HDFS files to local system.
hadoop fs -cat
This command will display the content of the HDFS file on your stdout (console or command prompt).
hadoop fs -text
This will display the content of the hdfs file ( But text only work with zip and TextRecordInputStream formats like SequenceFieFormat).
按照行数读取hadoop文件方法:hadoop fs -text file | head
-n 100