Поиск в терминале windows

Download Windows Speedup Tool to fix errors and make PC run faster

The Search function in any utility allows you to find information related to a keyword entered as a query. It can also be used to find the path of an application or a program you run on your system. Windows Terminal too comes with a search feature that allows you to look through the text buffer for a specific keyword. Let’s see how to search in Windows Terminal in Windows 11/10.

The Search in Windows Terminal can be useful when trying to find a command you had run before or for a specific file name. Here are a few different ways in which you can use Search function in Windows Terminal.

  1. Keyboard shortcut use
  2. Directional search
  3. Searching within panes
  4. Case match search.

1] Keyboard Shortcut use

The simplest way to access the Search function in Windows Terminal is to use the Ctrl+Shift+F keyboard shortcut. Once opened, you can type the keyword you’re looking for into the text box and hit Enter to search.

You can also open the search dialog with a customized shortcut of your own. To do so, open your settings.json file and search for the find command. By default, this command is set to Ctrl+Shift+F.

// Press ctrl+shift+f to open the search box

{ "command": "find", "keys": "ctrl+shift+f" },

You can change it to something simple as just Ctrl+F.

2] Directional Search

Directional Search Windows Terminal

This method will configure Windows Terminal to search from the bottom to the top of the text buffer.

If required, you can change the search direction (upwards or downwards) by selecting one of the arrows in the search dialog.

3] Searching within panes

search within panes

The search dialog integrates with panes as well. When focused on a pane, you can open the search dialog.

It is visible in the upper-right corner of a pane. Any keyword you enter will show results found within that pane only.

4] Case match search

How to search in Windows Terminal

As opposed to other methods, you can add case matching as an option in your search to narrow down your search results. Simply toggle the case matching by selecting the case match button. Now, whenever you perform the search, only those results that match the keyword entered with its specific letter casing will appear.

How do you search in Terminal commands history?

When inside a terminal, hold down Ctrl and press R. This action invokes reverse-i-search. Now, enter a letter – like W to find a match for the most recent command in your history that starts with the same alphabet. Keep typing to narrow down your match. When found, press Enter.

A post-graduate in Biotechnology, Hemant switched gears to writing about Microsoft technologies and has been a contributor to TheWindowsClub since then. When he is not working, you can usually find him out traveling to different places or indulging himself in binge-watching.

Last Updated :
13 Mar, 2025

Ever lost a file on your computer and wished there was a quick way to find it without clicking through endless folders? Say hello to the Windows Command Prompt (CMD) a powerful little tool that can help you search for files fast. In this how-to blog, we will explore the steps to search for files using CMD simple commands, so you can find what you need in no time, no fancy software required.

So without further ado, let’s get into the process of finding files using CMD in Windows 10 and well in Windows 11.

How to Find Files Using CMD in Windows?

In this section we have mentioned some steps, so follow the few steps to get the lost file or file that you are looking for.

Step 1: Open CMD

To find your file first, open CMD or Windows Command Prompt, and to do this, click the Win+R button and type CMD, or you can click the Windows key and type CMD to open Windows Command Prompt.

Step 2: Use DIR Command

After successfully launching the Command Prompt, type the below command and press Enter to pull up a list of files and folders. 

dir

Step 2: Use CD Folder Command

For moving down into a particular directory, use the below command followed by a folder name,  until you reach the folder you want to search.

cd folder_name

Step 3: Use Aging DIR Command

Now type the dir command again but this time with your search term, follow dir with your search term in quotes with an asterisk term before closing the quotes (For example, type dir “Raveling*”) and press Enter. The command prompt will show you the file location along with the list of files name starting with a similar keyword. 

The asterisk is what’s known as a wildcard and, in our example, it stands for anything that follows the word ‘highlands’, such as ‘raveling.doc’, ‘raveling.xls’ or My Business plans.txt’.

If you don’t know the exact location of your file in your hard drive, then instead of manually navigating through your directories, start searching from the very top level of your hard drive and include every sub-folder.

Step 4: Use Raveling Command

The top level of the drive is represented by a backslash and, to include subdirectories, you add a forward slash and ‘s’ to the end of the query as shown below:

dir “\Raveling*” /s 

The above command is my all-time favorite because, with the help of this command, I don’t have to force my brain to remember the location of the files. This trick usually takes seconds to search the entire drive for the file.  

You can also search for a particular file type by using a command dir \*.pdf /s and it will show you all files saved with the .pdf extension. You can try this for other files too (for example: .doxc, .png, .exe and more).

Note: The position asterisk symbol in the command matters a lot so type carefully and check once before executing the command.

How All The Commands Works?

Now you know enough to find any file on your entire hard drive within few seconds but if you are more curious to know how all these commands are working and what all these symbols stand for, then continue reading this post.

Let’s discuss each term one by one:

  • dir command is for showing files on the current directory, but it can also show files from anywhere in the drive of the system.
  • / tells dir to search from the top-level or root directory of the hard drive.
  • /s is used for searching sub-directories.
  • * asterisk is using before text (for example *.pdf) show all files ending with .pdf and * using at the end (for example raveling*) show you all file-names starting with that word.

Conclusion

Using the Command Prompt to search files in CMD is a valuable skill for anyone who frequently navigates through files and directories on a Windows system. By understanding the various commands available, you can easily find files with CMD and streamline your workflow. Whether you’re searching by name, location, or content, this method ensures that you can quickly locate the files you need with minimal effort.

If you are an advanced user of Windows, you might want to use the command line to find files on your system. You can use the command line to find files by date, content, size, and location, etc. In this article, I will show you how to use various methods and commands to find files using the command line in Windows 10/11.

Basic File Search Commands

One of the simplest ways to search for files using the command line is to use the dir and findstr commands. The dir command lists the files and folders in a directory, and you can use it with wildcards (*) to find file by name or extension from the Windows command line. For example, to use CMD to search for files with the extension TXT in the current directory, you can use the command:

dir *.txt

CMD Find FIle Extension

The Findstr command searches for a string of text in a file or files. You can use it with the /i option to ignore case sensitivity and with the /s option to search in all subdirectories. For example, to search for the word “hello” in all text files in the current directory and its subdirectories, you can use the command:

findstr /i /s "hello" *.txt

CMD Find File Name Containing a String

As mentioned, you can use the dir command to find a file name containing a specific string. For example, to find a file name containing the string “share” in the current directory and its subdirectories, you can type:

dir /s /b *share*

This will return a list of file names that match the pattern. The /s switch tells the command to search in all subdirectories, and the /b switch tells it to display only the bare file name.

You can also use wildcards to specify more complex patterns. For example, to find a file name that starts with “report” and with extension “.docx”, you can type:

dir /s /b report*.docx

Advanced File Search Commands

The find command searches for files that match certain criteria, such as name, size, date, and attributes. You can search words within files using the command prompt.

For example, to search for the word “hello” in all text files in the current directory, you can use the following command:

findstr /i /m "hello" *.txt

To search for all files larger than 1 MB in the C: drive, you can use the command:

forfiles /P C:\ /S /C "cmd /c if @fsize gtr 1048576 echo @path"

where Command for Executable Files

If you want to search for executable files, such as programs and applications, you can use the where command. It is mainly for locating executable files in a specified path or paths. You can use wildcards (*) with the where command to search for files with a specific name or extension. For example, to search for all executable files with the word “chrome” in their name in the C: drive, you can use the command:

where /r C:\ *chrome*.exe

Combine Dir and Find Commands

You can also use advanced filtering options with the dir command to search for files based on their attributes, such as size, date, and extension. You can use various switches with the dir command to filter your results. For example, to search for all readonly files in the current directory, you can use the command:

dir /a:r

To search for all files modified after January 1st, 2024 in the current directory, you can use the command:

dir /t:w /o:d | findstr /b "01/01/2024"

To search for all PDF files smaller than 100 KB in the current directory and its subdirectories, you can use the command:

dir /s *.pdf | findstr /v "<DIR>" | findstr /v "bytes" | findstr /r "[09][09][09] KB"

Windows CMD Find File Recursively

If you want to perform recursive searches using the dir command, you can use the /s switch. The /s switch searches for files in the current directory and all its subdirectories. For example, to search for all text files in the current directory and its subdirectories, you can use the command:

dir /s *.txt

Recursive searches are useful for locating files that are buried deep in your system’s folders.

You can also use the Where command to search recursively. For example, to list all files that start with “ffmp” in the c:\windows directory and its subdirectories, use the following command:

where /r c:\users ffmp*

CMD Search File Recursively

PowerShell Commands for File Searches

PowerShell is a powerful command line tool that allows you to perform various tasks on your system. You can also use PowerShell commands to find files based on various criteria. For example, to search for all text files that contain the word “hello” in the current directory and its subdirectories, you can use the command:

Get-ChildItem -Path .\* -Include *.txt -Recurse | Select-String -Pattern "hello"

To search for all files larger than 1 MB in the C: drive, you can use the command:

Get-ChildItem -Recurse -Path C:\ | Where-Object {$_.Length gt 1MB}

To search for all PDF files created before January 1st 2024 in the current directory and its subdirectories, you can use the command:

Get-ChildItem -Path .\* -Include *.mp4 -Recurse | Where-Object { $_.CreationTime -lt '2024-01-01' }

Find Files Powershell

Common CommandLine File Search Parameters

Here are some general tips for optimizing your command line file searches in Windows:

  •  Use wildcards (*) to search for files with a specific name or extension.
  •  Use the /s switch with the dir, find, and findstr commands to search in all subdirectories.
  •  Use the /r switch with the where command to search in a specified path or paths.
  •  Use the /a switch with the dir and find commands to filter files by attributes, such as hidden, readonly, system, etc.
  •  Use the /t switch with the dir command to filter files by date, such as creation, modification, or access.
  •  Use the /o switch with the dir command to sort files by name, size, date, or extension.
  •  Use PowerShell commands to perform more advanced file searches with various criteria.

Conclusion

In this article, I have shown you how to find files using the command line in Windows 11/10. Hopefully, you have learned to use advanced filtering and sorting options with these commands to get your results quickly. 

Искать нужный файл в операционной системе Windows может быть еще более просто и быстро, если воспользоваться функционалом командной строки, а именно Терминала Windows. Он позволяет не только искать файлы, но и выполнять множество других действий, в том числе файловой системой компьютера. Если вы новичок в работе с Терминалом Windows и хотите научиться правильно искать нужный файл, предлагаем ознакомиться с полным руководством по использованию командной строки в ОС Windows. В этом материале мы рассмотрим основные команды, с помощью которых можно искать файлы и папки, а также их расширения и снятие ограничений на доступ к папкам. Также мы познакомим вас с некоторыми особенностями поиска файлов в разных версиях ОС Windows. Данный материал поможет как начинающим пользователям, так и тем, кто ищет наиболее эффективные и быстрые способы поиска файлов в Терминале Windows.

Как искать файлы в Терминале Windows

Как искать файлы в Терминале Windows

В Терминале Windows есть несколько способов поиска файлов. Один из них – использование команды «dir», которая позволяет просмотреть список файлов в текущей директории. Для поиска файлов с определенным именем или расширением можно использовать ключи «dir /s «имя_файла»» или «dir /s «*.расширение»«. Например, команда «dir /s «test.txt»» выведет список всех файлов с именем «test.txt» в текущей и всех вложенных директориях.

Другой способ – использование команды «find». Она позволяет искать строки в содержимом файлов. Например, команда «find «строка» «путь_к_файлу»» выведет все строки в файле с указанным путем, которые содержат указанную строку.

Также можно использовать программу «Everything» для быстрого поиска файлов с любым именем или расширением. Программа индексирует все файлы на диске и позволяет выполнить поиск по ключевому слову или фразе.

  • dir – просмотр списка файлов в текущей директории
  • dir /s – поиск файлов с определенным именем или расширением
  • find – поиск заданной строки в содержимом файлов
  • Everything – программа для быстрого поиска файлов на диске

Что такое Терминал Windows

Терминал Windows — это инструмент, который позволяет пользователю работать с операционной системой через командную строку. Эта функция предназначена для пользователей, которые предпочитают работать в текстовом режиме, а не в графическом интерфейсе пользовательского интерфейса.

В Терминале Windows пользователи могут выполнять различные команды операционной системы, такие как копирование, перемещение, удаление и создание файлов и папок. Он также может быть использован для настройки системы, выполнения диагностики и управления пользователями.

Зачастую, использование командного интерфейса может показаться сложным для новичков. Однако, для тех, кто знаком с командами, Терминал Windows может быть более удобным способом работы с файлами и системой в целом. Например, некоторые задачи можно выполнить быстрее через командную строку.

Терминал Windows может быть использован как основной инструмент для работы с системой, так и дополнительным, который может быть открыт при необходимости. Он также может быть использован в качестве более безопасного способа работы с файлами, так как многие задачи требуют административных прав, и использование системы через командную строку может помочь избежать ошибок, связанных с использованием графического интерфейса пользовательского интерфейса.

Зачем нужно знать, как искать файлы через Терминал

Зачем нужно знать, как искать файлы через Терминал

Терминал — это мощный инструмент для работы с файлами и папками в операционной системе Windows. Если вы умеете правильно искать файлы через Терминал, то можете значительно ускорить свою работу на компьютере и избежать потери времени на поиск нужного файла вручную.

Знание основных команд терминала позволяет производить поиск файлов и папок по множеству параметров, таких как размер, дата изменения или расширение файла. Кроме того, использование терминала позволяет искать файлы в больших хранилищах или директориях, что может быть невозможно сделать вручную.

Также, знание терминала — это необходимость для программистов и системных администраторов, которые часто работают с большим количеством файлов и папок. Они могут настраивать систему, выполнять скрипты и автоматизировать различные процессы, которые были бы непосильны для выполнения вручную.

В современном мире, где каждую секунду происходит огромное количество операций, правильное использование терминала становится все более актуальным. Знание терминала позволяет оптимизировать рабочие процессы, ускорить работу с файлами и повысить свою производительность.

Команды для поиска файлов в Терминале Windows

В Терминале Windows существует несколько команд, с помощью которых можно искать необходимый файл на компьютере. dir – это одна из команд, которая выводит список файлов и папок в указанном пути. Для поиска файла можно использовать ключ /S, который выводит список подпапок и их содержимое.

Еще одна полезная команда для поиска файлов — find. Она позволяет найти файл с заданным именем в указанной директории. Команда findstr позволяет искать файлы по содержимому. Для этого нужно указать ключи /S и /M, чтобы поиск происходил во всех подпапках и чтобы вывести только названия файлов, а не их содержимое.

Кроме этого, существуют команды, позволяющие искать файлы по типу или по размеру. Например, команда dir *.txt /S найдет все файлы с расширением .txt на компьютере. Команда dir /A:-D /S позволит найти все папки на компьютере. А если нужно найти файлы, размер которых превышает определенное значение, можно воспользоваться командой dir /A:-D /S /C 500K.

Терминал Windows позволяет искать не только файлы, но и строки в файлах. Для этого можно использовать команду find /I «строка» файл.txt. Используя команды обработки файлов в терминале Windows, вы можете легко и быстро найти нужные файлы и информацию в них.

Как использовать операторы для уточнения запроса

Как использовать операторы для уточнения запроса

При поиске файлов в Терминале Windows, операторы — это удобный инструмент для уточнения запроса и получения более точных результатов. Они позволяют указать определенные параметры поиска, такие как дата создания, размер файла или тип файла.

Для использования операторов в запросе, необходимо использовать специальные символы. Например, оператор «AND» может быть указан как «&», «&&» или «/». Оператор «OR» может быть указан как «|», «

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Где хранятся скрины на компе на windows 10 win shift s
  • Как почистить полностью компьютер без переустановки windows
  • Как создавать свои сборки windows
  • Как очистить зарезервированное хранилище windows 10
  • Как выглядит windows 7 ultimate