Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Hadoop 根据hdfs中的模式列出文件名_Hadoop_Hdfs_Ls_Microsoft Distributed File System - Fatal编程技术网

Hadoop 根据hdfs中的模式列出文件名

Hadoop 根据hdfs中的模式列出文件名,hadoop,hdfs,ls,microsoft-distributed-file-system,Hadoop,Hdfs,Ls,Microsoft Distributed File System,我正在hdfs中搜索特定的文件模式。 我的要求是,我需要搜索在特定位置存在两个字符的文件名。 例如: 我需要选择第二个文件,其中包含2018年和2018年后的两个职位 我的意思是,有没有一种搜索方法,如下所示 hdfs dfs ls order_items_2018..11* 两个点指定任何未知字符。您可以使用如下所示的HDFS命令 hdfs dfs-ls订单项目2018??11* 此命令将列出文件顺序\u items\u 20181211\u transactions.dat,因为这是给定三

我正在hdfs中搜索特定的文件模式。 我的要求是,我需要搜索在特定位置存在两个字符的文件名。 例如:

我需要选择第二个文件,其中包含2018年和2018年后的两个职位

我的意思是,有没有一种搜索方法,如下所示

hdfs dfs ls order_items_2018..11*

两个点指定任何未知字符。

您可以使用如下所示的HDFS命令

hdfs dfs-ls订单项目2018??11*

此命令将列出文件顺序\u items\u 20181211\u transactions.dat,因为这是给定三个文件中唯一的匹配结果。问号?此处用作通配符,并考虑该位置的所有未知字符。它有助于获得所需模式的文件

希望这有帮助

hdfs dfs ls order_items_2018..11*