How to Find Hidden Files and Directories in Ubuntu (find -name “.*”)

The Dotfile Dilemma

In Ubuntu Linux, any file or directory whose name begins with a period (e.g., .bashrc, .ssh, .config) is automatically hidden from standard directory listings. These are known as “dotfiles,” and they are exclusively used for storing critical user configurations and application settings. If you are trying to back up a user’s entire profile, or auditing a system for hidden malicious scripts, you cannot rely on a standard file search. You must explicitly instruct the search engine to look for files that start with a period.

Using the find Command with -name

The Linux find command utilizes the -name flag combined with wildcard string matching to isolate these hidden system files.

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

Targeting the Invisible

The syntax utilizes the standard -name flag, but we wrap the search string in quotation marks to prevent the bash shell from expanding it before the command runs. The string ".*" instructs the engine to find any file whose name literally begins with a dot (.), followed by absolutely any combination of characters (*). This command is essential for system administrators attempting to locate hidden configuration caches (like .cache/) that are secretly consuming massive amounts of disk space without showing up in standard graphical file managers.

Get the best tech tips delivered straight to your inbox.

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