Regex working in RedHat is not giving any result in Ubuntu
- by Supratik
My goal is to match specific files from specific sub directories. I have the following folder structure
`-- data
|-- a
|-- a.txt
|-- b
|-- b.txt
|-- c
|-- c.txt
|-- d
|-- d.txt
|-- e
|-- e.txt
|-- org-1
| |-- a.org
| |-- b.org
| |-- org.txt
| |-- user-0
| | |-- a.txt
| | |-- b.txt
I am trying to list the files only inside the data directory.
I am able to get the correct result using the following command in RHEL
find ./testdir/ -iwholename "*/data/[!/].txt"
a.txt
b.txt
c.txt
d.txt
e.txt
If I run the same command in Ubuntu it is not working.
Can anyone please tell me why it is not working in Ubuntu ?