Getting started with hadoop - Experiment 1

Getting started with hadoop - Experiment 1

start hdfs:

ssh localhost
start-dfs.sh

Create a test folder in hdfs:

hadoop fs -mkdir /test/

Delete specified folder:

hadoop fs -rm -r /test

Query all folders under the / directory:

hadoop fs -ls /

Upload local files to the /test/ directory of hdfs

cd /usr/local
sudo touch user.txt
hdfs dfs -put /usr/local/user.txt /test/user.txt

Check whether usser.txt is in the /temp/ directory of hdfs

hdfs dfs -find hdfs下路径名 -name 文件名

Guess you like

Origin blog.csdn.net/m0_59161987/article/details/129610605