栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

HDFS遍历子目录 Hadoop fs -ls -R path

HDFS遍历子目录 Hadoop fs -ls -R path

/hadoop fs -help cmd 可以看命令的介绍
hadoop fs -help ls
22/03/24 18:47:41 INFO conf.Configuration: Current hadoop.security.authentication = simple
-ls [-d] [-h] [-R] [-t] [-S] [-r] [-u] [ …] :
List the contents that match the specified file pattern. If path is not
specified, the contents of /user/ will be listed. For a directory a
list of its direct children is returned (unless -d option is specified).

Directory entries are of the form:
permissions - userId groupId sizeOfDirectory(in bytes)
modificationDate(yyyy-MM-dd HH:mm) directoryName

and file entries are of the form:
permissions numberOfReplicas userId groupId sizeOfFile(in bytes)
modificationDate(yyyy-MM-dd HH:mm) fileName

-d  Directories are listed as plain files.
-h  Formats the sizes of files in a human-readable fashion
    rather than a number of bytes.
-R  Recursively list the contents of directories.
-t  Sort files by modification time (most recent first).
-S  Sort files by size.
-r  Reverse the order of the sort.
-u  Use time of last access instead of modification for
    display and sorting.

-d目录以普通文件形式显示。
-h以人类可读的方式格式化文件大小,而不是字节数。
-R递归列出目录的内容。-t根据修改时间(最近的先修改)对文件进行排序。
-S按大小对文件排序。
-r颠倒排序的顺序。使用最后一次访问的时间,而不是修改显示和排序。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/780649.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号