1

Here is a find command that I have:

find . -maxdepth 1 -mindepth 1 -type d -exec find {} -type f -name "*.csv" \;

In fact, it is a find command within a find command. For every directory in my current directory, it checks to see if a file ends with .csv.

What I want, is for this command to print out the name of the directory that does contain a file that ends with .csv. Is this possible using the command above, or should I try a different solution?

John Kugelman
  • 349,597
  • 67
  • 533
  • 578
buydadip
  • 8,890
  • 22
  • 79
  • 154

0 Answers0