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}'
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…