I would like to know if we can list files in an HDFS directory with files NOT matching the given pattern.
For instance, assume I have some files with names containing some date values [eg: 'file201606250001.csv'].
If I need to get list of files not belonging to a date pattern, say '*20160629*', what command can I use?
I tried to give the following command, but it still is listing all files (including the ones matching the pattern I wanted to exclude).
hdfs dfs -ls /test/* | grep -v '*20160629*'
I tried the solution given here, but still it returns all files.