Find: Searching for a File or Directory

sudo find / -iname 'target_to_find' -type d


  1. Search Access Privileges: sudo to search protected (root access only) files
  2. Search Depth: / searches the whole file system while. This is the recommended parameter as usually you’re usually not sure which directory the file or sub-directory is located. . searches within the current directory. ~/ searches the “home” directory (and below) of the user you are logged in as
  3. Case Sensitivity: -iname performs a case-insensitive search while -name does the opposite
  4. Search Target: target_to_find stick between single quotes as a best practice
  5. Search Target Type: The -type directive is optional and the default value is f which searches for file names. d searches for directory names

  1. Ubuntu Community Help Wiki
  2. AskUbuntu