Test HDFS system upload and download function
1. Upload
Upload the jdk file from the root directory to the root directory of the hdfs system and name it jdk
# hadoop fs -put /home/zox/jdk-8u221-linux-x64.tar.gz hdfs://localhost:9000/jdk
2. Download
Download jdk from the root directory of the hdfs system to the local /home/ folder and name it as jdk1.8
# hadoop fs -get hdfs://localhost:9000/jdk /home/zox/jdk1.8
3. View
View files uploaded to hdfs
# hadoop fs -ls hdfs://localhost:9000/
You can also view directly from the web page
You can also unzip the downloaded file to see if the downloaded file is damaged
# cd /home/zox
# tar -zxvf jdk1.8