Hadoop_ common commands (on hdfs)

Hadoop_ common commands (on hdfs)
hadoop fs all file systems can be used
hdfs dfs file system for only hdfs
- 1 - see all directories (folders) and documents 
HDFS dfs -Ls /
- 2 -  Create a directory hdfs file system (folder)
hdfs dfs -mkdir /test
- 3 -  Create a file in the file system hdfs
hdfs dfs -touchz /words_1.txt
--4--  delete files in the file system hdfs
hdfs dfs -rm /words_1.txt
hdfs dfs -rf /words_1.txt
--5--  upload files to hdfs
hdfs dfs -put file name / path
Word frequency statistics for file operations : wordcount
- 6 -  contents of the file on the View hdfs
File name on hdfs dfs -cat / corresponding path
View upload path

Open to view the contents of the output file

- 7 -  Download files from hdfs
hdfs dfs -get / file name / downloaded to the target path
--8--  recursive directory delete
hdfs dfs -rmr /test
--9--  View node process
jps
--10--  create a file
vi filename
 

Guess you like

Origin www.cnblogs.com/wulw829/p/11330548.html