I have a large directory with tons of files and subdirectories in it. Is there a way to recursively search through all of these files and subdirectories and print out a list of all files containing an underscore (_) in their file name?

  • 6
    find . -name '*_*' Apr 3, 2015 at 21:03
  • Thanks that worked perfectly! If you post this as an answer instead of a comment I will mark is as correct.
    – Evster
    Apr 3, 2015 at 21:14
  • I'll let you answer it. Apr 3, 2015 at 21:17

1 Answer 1

find . -name '*_*'

Thanks to Stéphane Chazelas as noted in the comments above!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.