How to list only the file names in HDFS
The following command will return filenames only: hdfs dfs -stat “%n” my/path/* :added at Feb 04 ’21 Actually last few years I use hdfs dfs -ls -d my/path/* | awk ‘{print $8}’ and hdfs dfs -ls my/path | grep -e “^-” | awk ‘{print $8}’