-1

How do i search for filenames containing a word (or multiple words), starting from some directory (not case sensitive) ?

monolith
  • 101

1 Answers1

0
  • The following command should work, where you have permissions

    find /start-directory -name "*word*"
    

    where you replace /start-directory with your particular directory path.

  • in the current directory with

    find . -name "*word*"
    
  • and the following command should work, where you need elevated permissions, for example to search the whole computer (via the root directory /

    sudo find / -name "*word*"
    
sudodus
  • 46,324
  • 5
  • 88
  • 152
  • You seem to be missing a find in the last example - also the OP specified case-insensitivity (-iname rather than -name) and multiple search terms (e.g. -iname '*foo*' -iname '*bar*') – steeldriver Nov 11 '17 at 15:03