My Oracle Support Banner

Using Wild Card Characters in hadoop fs -ls Command is Not Returning Correct Results (Doc ID 1594043.1)

Last updated on APRIL 08, 2020

Applies to:

Big Data Appliance Integrated Software - Version 2.2.1 and later



NOTE: In the examples that follow, user details, cluster names, hostnames, directory paths, filenames, etc. represent a fictitious sample (and are used to provide an illustrative example only). Any similarity to actual persons, or entities, living or dead, is purely coincidental and not intended in any manner.


Using the wild card character (*) in conjunction with a hadoop fs ls shell command returns errors as well as directories and files outside of HDFS. The errors are normally due to the directory hadoop is looking for not being on the local file system which the wild card character causes hadoop fs -ls to also search. Note the following "hadoop fs -ls" command returns a number of directories with the following:

$ hadoop fs -ls /tmp | grep hi*
drwxrwxrwx   - hdfs    supergroup          0 2013-10-22 11:14 /tmp/.cloudera_health_monitoring_canary_files
drwxr-xr-x   - hdfs    supergroup          0 2013-09-11 15:46 /tmp/hive-beeswax-hdfs
drwxr-xr-x   - owfuser supergroup          0 2013-09-09 09:16 /tmp/hive-beeswax-owfuser
drwxr-xr-x   - sample  supergroup          0 2013-09-11 15:38 /tmp/hive-beeswax-sample
drwxr-xr-x   - oracle  supergroup          0 2013-09-10 05:49 /tmp/hive-mapred
drwxr-xr-x   - oracle  supergroup          0 2013-10-16 13:28 /tmp/hive-oracle

 If we issue the following instead we see the error:


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.