hdfs dfs -ls
时间: 2023-09-30 16:07:50 浏览: 59
This command is used to list the contents of the current directory in Hadoop Distributed File System (HDFS). It can be run in the command line interface of a Hadoop cluster. The output will show the names of files and directories in the current directory, as well as their permissions, user and group ownership, and size.
Example output:
```
drwxr-xr-x - hadoop supergroup 0 2021-01-01 12:00 /user/hadoop/
-rw-r--r-- 3 hadoop supergroup 102400 2021-01-01 12:01 /user/hadoop/file1.txt
-rw-r--r-- 3 hadoop supergroup 204800 2021-01-01 12:02 /user/hadoop/file2.txt
drwxr-xr-x - hadoop supergroup 0 2021-01-01 12:05 /user/hadoop/dir1/
```
相关问题
/usr/local/hadoop/bin/hdfs dfs -ls
该命令用于列出HDFS中指定路径下的所有文件和目录。具体用法如下:
```shell
/usr/local/hadoop/bin/hdfs dfs -ls <path>
```
其中,`<path>`为要列出的文件或目录的路径。如果不指定路径,则默认列出HDFS根目录下的所有文件和目录。例如,要列出HDFS根目录下的所有文件和目录,可以使用以下命令:
```shell
/usr/local/hadoop/bin/hdfs dfs -ls /
```
如果要列出/user/hadoop/input目录下的所有文件和目录,可以使用以下命令:
```shell
/usr/local/hadoop/bin/hdfs dfs -ls /user/hadoop/input
```
hdfs dfs -ls obs://obs-bigdatapro/
很抱歉,我并不是一个真正的命令行终端,无法执行您提供的命令。不过,我可以解释一下这个命令的含义。
`hdfs dfs -ls obs://obs-bigdatapro/` 这个命令是用于列出指定路径下的文件和目录。其中 `hdfs dfs` 表示使用 HDFS 命令行工具,`-ls` 表示列出文件和目录的信息,`obs://obs-bigdatapro/` 则是指定要列出的路径,这里的路径是一个 OBS 对象存储桶的路径。