3 Put Data to HDFS - arwankhoiruddin/hadoopLab GitHub Wiki

Download sample data

We will download a text file from Gutenberg.

wget http://www.gutenberg.org/cache/epub/20417/pg20417.txt

Make input directory in HDFS

./bin/hadoop fs -mkdir /input

Put the data to HDFS

./bin/hadoop fs -put pg20417.txt /input

Ensure that the data is uploaded to HDFS

./bin/hadoop fs -ls /input

It should display pg20417.txt