/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颠倒排序的顺序。使用最后一次访问的时间,而不是修改显示和排序。