


















All HDFS commands are invoked by the bin/hdfs script. Running the hdfs script without any arguments prints the description for all commands.
Usage: hdfs [SHELL_OPTIONS] COMMAND [GENERIC_OPTIONS] [COMMAND_OPTIONS]
-- 创建文件 [root@VM-75-149-centos file]# echo 'hello world!' > hello.text [root@VM-75-149-centos file]# ls hadoop-2.10.1.tar.gz hello.text [root@VM-75-149-centos file]# cat hello.text hello world! -- hdfs创建多级目录 [root@VM-75-149-centos file]# hdfs dfs -mkdir -p /2022/05/ -- hdfs查询文件目录 [root@VM-75-149-centos file]# hdfs dfs -ls / Found 1 items drwxr-xr-x - root supergroup 0 2022-05-05 15:23 /2022 -- 上传文件到hdfs [root@VM-75-149-centos file]# hdfs dfs -put hello.text /2022/05/ -- hdfs查询文件 [root@VM-75-149-centos file]# hdfs dfs -ls /2022/05/ Found 1 items -rw-r--r-- 1 root supergroup 13 2022-05-05 15:26 /2022/05/hello.text
通过web查看上传的文件信息

此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。