hadoop 入门 —— 实验一
启动 hdfs:
ssh localhost
start-dfs.sh
在hdfs中创建一个 test 文件夹:
hadoop fs -mkdir /test/
删除指定文件夹:
hadoop fs -rm -r /test
查询 / 目录下的所有文件夹:
hadoop fs -ls /
将本地文件上传到 hdfs 的 /test/ 目录下
cd /usr/local
sudo touch user.txt
hdfs dfs -put /usr/local/user.txt /test/user.txt
检测 usser.txt 是否在 hdfs 的 /temp/ 目录下
hdfs dfs -find hdfs下路径名 -name 文件名