标签:www. 文件相关 bsp 命名 tar tps log l命令 用户目录
cd /usr/local/hadoop touch hzh.txt //此处编辑hzh.txt cat hzh.txt
./sbin/start-dfs.sh ./bin/hdfs dfs -mkdir -p /user/hadoop ./bin/hdfs dfs -mkdir input ./bin/hdfs dfs -put ./hzh.txt input
//hdfs中的文件(夹) ./bin/hdfs dfs -ls //hdfs 中input的所有文件(夹) ./bin/hdfs dfs -ls input
./bin/hdfs dfs -cat input/hzh.txt
./bin/hdfs dfs -rm -ls input/hzh.txt
./bin/hdfs dfs -get input/hzh.txt ~/hzh.txt
cd bin/ $ if $(./hdfs dfs -test -e input/hzh.txt); then $(./hdfs dfs -appendToFile ~/hzh.txt input/hzh.txt); else $(./hdfs dfs -copyFromLocal ~/hzh.txt input/hzh.txt); fi
if $(./hdfs dfs -test -e input/hzh.txt); then $(./hdfs dfs -copyToLocal input/hzh.txt ~/hzh.txt); else $(./hdfs dfs -copyToLocal input/hzh.txt ~/hzh2.txt); fi
./hdfs dfs -cat input/hzh.txt
./hdfs dfs -ls input/hzh.txt
./hdfs dfs -ls -R /user
//x创建 if $(./hdfs dfs -test -d dir1/dir2); then $(./hdfs dfs -touchz dir1/dir2/filename); else $(./hdfs dfs -mkdir -p dir1/dir2 && hdfs dfs -touchz dir1/dir2/filename); fi //s删除 ./hdfs dfs -rm dir1/dir2/filename
./hdfs dfs mkdir -p dir0/dir1 ./hdfs dfs rmdir dir0 ./hdfs dfs -rm -r dir0
./hdfs dfs -appendToFile ~/hzh.txt input/hzh.txt
./hdfs dfs -rm targetFile
./hdfs dfs -rmdir dir
./hdfs dfs -mv input/hzh.txt input/hzh2.txt
标签:www. 文件相关 bsp 命名 tar tps log l命令 用户目录
原文地址:https://www.cnblogs.com/huangzemian123/p/9147838.html