how to perform hdfs string search recursively in hdfs

C++
# How to recursively find a file in the Hadoop Distributed file system hdfs:
hdfs dfs -ls -R / | grep [search_term]
# How to perform hdfs string search recursively in hdfs
hadoop fs -cat /hive-data/* | grep -i pattern

Source

Also in C++: