1、創建helloword.txt輸入3行內容。
2、在系統中打開hadoop
start-dfs.sh start-yarn.sh
3、把本地計算機中的計算機中的helloword.txt上傳到服務器中
4、創建目錄/user/root/filetest
hdfs dfs -mkdir p /user/root/filetest
5、把helloword.txt上傳到HDFS目錄中
hdfs dfs -moveFromLocal /simple/helloword.txt /user/root/filetest
6、查看文件上傳是否成功
7、成功后查看顯示內容
hdfs dfs -cat /user/root/filetest/helloword.txt