The Invisible Configuration Files
In Ubuntu Linux, any file or directory that begins with a period (e.g., .bashrc, .ssh/, .config/) is completely hidden from standard file managers and basic ls commands. These hidden files usually contain critical user configurations, application settings, and private SSH keys. When you are auditing a user’s home directory or attempting to clean up bloated configuration folders left behind by uninstalled software, you cannot rely on standard searches. You must explicitly instruct the Linux search engine to hunt for these invisible targets.
Using the find Command for Hidden Files
The Linux find command can easily isolate hidden files by combining the -name flag with a specific wildcard pattern.
- Open your Terminal application (Ctrl + Alt + T) or log into your server via SSH.
- To scan the
/home/user/directory and return only hidden files and folders, type the following command exactly:sudo find /home/user/ -name ".*" - Press Enter and provide your administrator password.
Targeting Specific Types
If the user has hundreds of hidden configuration files, the output will be overwhelming. You can further refine the search by appending the -type flag. To exclusively find hidden directories (like .cache/ or .local/), run find /home/user/ -type d -name ".*". To exclusively find hidden files (like .env or .profile), change the flag to -type f. The quotation marks around the ".*" pattern are absolutely mandatory to prevent the Bash shell from expanding the wildcard before the find engine receives it.