Linux uses the hadoop dfs command method

  

Many users in the Linux system are exposed to shorter commands, and hadoop dfs commands are more difficult to remember, but often used, the following small series will introduce you to Linux The system uses the method of the hadoop dfs command.

Create a directory

hadoop dfs -mkdir /home

upload a file or directory to hdfs

hadoop dfs -put hello /

hadoop dfs -put hellodir//

View directory

hadoop dfs -ls /

Create an empty file

hadoop dfs -touchz /361way

Deleting a file

hadoop dfs -rm /361way

Deleting a directory

hadoop dfs -rmr /home

Named

hadoop dfs -mv /hello1 /hello2

View File

hadoop dfs -cat /hello

Merge all the contents of the directory A file, download to local

hadoop dfs -getmerge /hellodir wa

Use du file and directory size

hadoop dfs -du /

Copy to local

hadoop dfs -copyToLocal /home localdir

View dfs

hadoop dfsadmin -report

View running Java programs
>

Jps

The above is the way to use the hadoop dfs command in Linux. The hadoop dfs command combines various parameters to achieve a variety of operations. You can select a command and just take a look.

Copyright © Windows knowledge All Rights Reserved