How to Find Hidden Files in Ubuntu Linux (find .*)

The Invisible Configuration

In Ubuntu Linux, hiding a file from the standard ls command or the graphical file manager is incredibly simple: you just add a period (dot) to the very beginning of the filename. Because of this, almost every application on a Linux server uses these “dotfiles” (like .bashrc or .ssh) to store critical configuration data securely out of sight. However, if you are attempting to audit a user’s home directory or clean up a compromised web server, standard searches will often miss these invisible files entirely. You must explicitly instruct the search engine to look for files that begin with a period.

Using the find Command for Dotfiles

The Linux find command utilizes the standard -name flag combined with a specific wildcard syntax to isolate hidden files.

  1. Open your Terminal application (Ctrl + Alt + T) or log into your server via SSH.
  2. To search the /home/user/ directory specifically for every hidden file and hidden folder, type the following command exactly:
  3. sudo find /home/user/ -name ".*"
  4. Press Enter and provide your administrator password.

Filtering the Results

Because the command above searches for literally anything starting with a dot, the output will also include the current directory (.) and the parent directory (..), which can clutter your results. To refine the search and only return actual hidden files (ignoring directories completely), you can combine it with the type flag: sudo find /home/user/ -type f -name ".*". This guarantees that your terminal will only list hidden text files, scripts, and binaries.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.