> ## Content Index
> Fetch the complete content index at: https://en.blog.themarfa.name/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to Easily Find Text Files Containing Passwords
- URL: https://en.blog.themarfa.name/how-to-easily-find-text-files-containing-passwords/
- Published: 2025-05-13T06:46:53.000Z
- Updated: 2025-05-13T06:46:53.000Z
- Description: Many people store passwords in text files, even though it’s easier and much safer to use password managers. PowerShell and grep commands can help locate such files.
- Author: Konstantin Dokuchaev
- Tags: Windows, macos

A surprising number of people still store their website logins and passwords in plain text documents. This is odd to me, since password managers are not only more secure but also more convenient for organizing and searching information.

If you’ve decided to finally organize your passwords, it’s a good idea to scan your drive for as many text files containing login credentials as possible.

### Solution for Windows

The easiest way is to open PowerShell and run the following command:

```
Get-ChildItem -Path C:\ -Recurse -Include *.txt, *.log, *.csv | Select-String -Pattern "password|login|pass|secret|credentials|user|username|auth|apiKey|token|accessKey|privateKey|passwords|pwd|hash|пароль|логин|ключ|аккаунт|учетная запись|секрет|токен|доступ|ключ_доступа|сертификат" | Format-Table Filename, LineNumber, Line
```

This command will display a list of files matching the search criteria. You can customize the keywords or file formats as needed.

![](https://storage.ghost.io/c/31/c7/31c7da9c-f519-464c-9a3b-2d4144b557a6/content/images/2025/05/image-16.png)

### Solution for macOS

It’s just as simple on a Mac. Open the Terminal and run the following command:

```
grep -r -i -E "password|login|pass|secret|credentials|user|username|auth|apiKey|token|accessKey|privateKey|passwords|pwd|hash|пароль|логин|ключ|аккаунт|учетная запись|секрет|токен|доступ|ключ_доступа|сертификат" /path/to/search/
```

As with the Windows example, this will return a list of all files that match your criteria.

![](https://storage.ghost.io/c/31/c7/31c7da9c-f519-464c-9a3b-2d4144b557a6/content/images/2025/05/image-17.png)