Hadoop [Lesson 5]: Hadoop tests the upload and download functions of the HDFS system

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

Insert picture description here

3. View

View files uploaded to hdfs

# hadoop fs -ls hdfs://localhost:9000/ 

Insert picture description here

You can also view directly from the web page
Insert picture description here

You can also unzip the downloaded file to see if the downloaded file is damaged

# cd /home/zox

# tar -zxvf jdk1.8

Guess you like

Origin blog.csdn.net/qq_41315788/article/details/109272948