Listing files that end in ".txt" from directories with the word "SALARIO" in its name without using pipes

Solution 1:

I tried it and it works for me, so I suggest you to use the following command.

find -path '*SALARIO*/*' -name '*.txt'

Solution 2:

Try this find . -wholename "./SALARIO/*.txt"

Solution 3:

List *.txt files directly under SALARIO/

$ find -type d -name 'SALARIO' -exec sh -c 'ls $1/*.txt' _ '{}' \;

Or

$ shopt -s globstar; ls **/SALARIO/*.txt