Using find in one windows

поиск find

Выполняет поиск строки текста в файле или файлах и отображает строки текста, содержащие указанную строку. Searches for a string of text in a file or files, and displays lines of text that contain the specified string.

Синтаксис Syntax

Параметры Parameters

Параметр Parameter Описание Description
/v /v Отображает все строки, не содержащие указанный объект . Displays all lines that don’t contain the specified .
/C /c Подсчитывает количество строк, содержащих указанный объект , и отображает итоговое значение. Counts the lines that contain the specified and displays the total.
/n /n Предшествует каждой строке с номером строки файла. Precedes each line with the file’s line number.
/i /i Указывает, что при поиске регистр не учитывается. Specifies that the search is not case-sensitive.
[«/OFF» [строка]] [/off[line]] Не пропускает файлы с установленным атрибутом «вне сети». Doesn’t skip files that have the offline attribute set.
Обязательный элемент. Required. Задает группу символов (заключенных в кавычки), которые требуется найти. Specifies the group of characters (enclosed in quotation marks) that you want to search for.
[ :][

] Указывает расположение и имя файла, в котором выполняется поиск указанной строки. Specifies the location and name of the file in which to search for the specified string. /? /? Отображение справки в командной строке. Displays help at the command prompt.

Комментарии Remarks

Если вы не используете /i, эта команда ищет именно то, что указано для String. If you don’t use /i, this command searches for exactly what you specify for string. Например, эта команда обрабатывает символы и по a — A разному. For example, this command treats the characters a and A differently. Однако при использовании параметра /i Поиск выполняется без учета регистра, а в a A качестве того же символа обрабатывается и. If you use /i, however, the search becomes non-case-sensitive, and it treats a and A as the same character.

Если строка, которую нужно найти, содержит кавычки, необходимо использовать двойные кавычки для каждой кавычки, содержащейся в строке (например, «» Эта строка содержит кавычки «»). If the string you want to search for contains quotation marks, you must use double quotation marks for each quotation mark contained within the string (for example, «»This string contains quotation marks»»).

Если опустить имя файла, эта команда выступает в качестве фильтра, принимая входные данные из стандартного источника входных данных (обычно это клавиатура, канал (|) или перенаправленный файл), а затем отображает все строки, содержащие строку. If you omit a file name, this command acts as a filter, taking input from the standard input source (usually the keyboard, a pipe (|), or a redirected file) and then displays any lines that contain string.

Параметры и параметры командной строки для команды Find можно вводить в любом порядке. You can type parameters and command-line options for the find command in any order.

Нельзя использовать подстановочные знаки (* и ?) в именах файлов или расширениях, указанных при использовании этой команды. You can’t use wildcards (* and ?) in file names or extensions that you specify while using this command. Для поиска строки в наборе файлов, указанных с помощью подстановочных знаков, эту команду можно использовать в команде for . To search for a string in a set of files that you specify with wildcards, you can use this command within a for command.

При использовании /c и /v в одной командной строке эта команда отображает количество строк, которые не содержат указанную строку. If you use /c and /v in the same command line, this command displays a count of the lines that don’t contain the specified string. При указании параметра /c и /n в той же командной строке команда Find игнорирует параметр /n. If you specify /c and /n in the same command line, find ignores /n.

Эта команда не распознает возвраты каретки. This command doesn’t recognize carriage returns. При использовании этой команды для поиска текста в файле, который содержит символы возврата каретки, необходимо ограничить строку поиска текстом, который может быть найден между возвратами каретки (то есть строкой, которая не может быть прервана символом возврата каретки). When you use this command to search for text in a file that includes carriage returns, you must limit the search string to text that can be found between carriage returns (that is, a string that is not likely to be interrupted by a carriage return). Например, эта команда не сообщает о совпадении для строкового налогового файла, если между словами налога и файла происходит возврат каретки. For example, this command doesn’t report a match for the string tax file if a carriage return occurs between the words tax and file.

Примеры Examples

Чтобы отобразить все строки из Pencil.AD , которые содержат строку резкость карандаша, введите: To display all lines from pencil.ad that contain the string pencil sharpener, type:

Чтобы найти текст, «специалисты, обозначенные в документе только для обсуждения. To find the text, «The scientists labeled their paper for discussion only. Это не окончательный отчет «. It is not a final report.» в файле report.doc введите: in the report.doc file, type:

Для поиска набора файлов можно использовать команду Find в команде for . To search for a set of files, you can use the find command within the for command. Чтобы найти в текущем каталоге файлы с расширением bat, которые содержат строку строки, введите следующую команду: To search the current directory for files that have the extension .bat and that contain the string PROMPT, type:

Чтобы найти и отобразить имена файлов на диске C, которые содержат строковый ЦП, выполните поиск на жестком диске с помощью вертикальной черты (|), чтобы направить выходные данные команды dir в команду Find следующим образом: To search your hard disk to find and display the file names on drive C that contain the string CPU, use the pipe (|) to direct the output of the dir command to the find command as follows:

Так как поиск при поиске выполняется с учетом регистра, а dir создает прописные буквы, необходимо либо ввести строковый процессор в верхнем регистре, либо использовать параметр командной строки /i с командой Find. Because find searches are case-sensitive and dir produces uppercase output, you must either type the string CPU in uppercase letters or use the /i command-line option with find.

Using find in one windows

Searches for a string of text in a file or files, and displays lines of text that contain the specified string.

Syntax

Parameters

Parameter Description
/v Displays all lines that don’t contain the specified .
/c Counts the lines that contain the specified and displays the total.
/n Precedes each line with the file’s line number.
/i Specifies that the search is not case-sensitive.
[/off[line]] Doesn’t skip files that have the offline attribute set.
Required. Specifies the group of characters (enclosed in quotation marks) that you want to search for.
[ :][

] Specifies the location and name of the file in which to search for the specified string. /? Displays help at the command prompt.

Remarks

If you don’t use /i, this command searches for exactly what you specify for string. For example, this command treats the characters a and A differently. If you use /i, however, the search becomes non-case-sensitive, and it treats a and A as the same character.

If the string you want to search for contains quotation marks, you must use double quotation marks for each quotation mark contained within the string (for example, «»This string contains quotation marks»»).

If you omit a file name, this command acts as a filter, taking input from the standard input source (usually the keyboard, a pipe (|), or a redirected file) and then displays any lines that contain string.

You can type parameters and command-line options for the find command in any order.

You can’t use wildcards (* and ?) in file names or extensions that you specify while using this command. To search for a string in a set of files that you specify with wildcards, you can use this command within a for command.

If you use /c and /v in the same command line, this command displays a count of the lines that don’t contain the specified string. If you specify /c and /n in the same command line, find ignores /n.

This command doesn’t recognize carriage returns. When you use this command to search for text in a file that includes carriage returns, you must limit the search string to text that can be found between carriage returns (that is, a string that is not likely to be interrupted by a carriage return). For example, this command doesn’t report a match for the string tax file if a carriage return occurs between the words tax and file.

Examples

To display all lines from pencil.ad that contain the string pencil sharpener, type:

To find the text, «The scientists labeled their paper for discussion only. It is not a final report.» in the report.doc file, type:

To search for a set of files, you can use the find command within the for command. To search the current directory for files that have the extension .bat and that contain the string PROMPT, type:

To search your hard disk to find and display the file names on drive C that contain the string CPU, use the pipe (|) to direct the output of the dir command to the find command as follows:

Because find searches are case-sensitive and dir produces uppercase output, you must either type the string CPU in uppercase letters or use the /i command-line option with find.

Which version of Windows operating system am I running?

Find operating system info in Windows 10

To find out which version of Windows your device is running, press the Windows logo key + R, type winver in the Open box, and then select OK.

Here’s how to learn more:

Select the Start button > Settings > System > About .

Under Device specifications > System type, see if you’re running a 32-bit or 64-bit version of Windows.

Under Windows specifications, check which edition and version of Windows your device is running.

If you’re having a problem with activation, see Activate in Windows 10.

If you forgot the password you use to sign in to Windows devices or email, see How to reset your Microsoft password.

For info about updating Windows, see Windows Update: FAQ.

Find operating system info in Windows 8.1 or Windows RT 8.1

To find out which version of Windows your device is running, press the Windows logo key + R, type winver in the Open box, and then select OK.

If your device is running Windows 8.1 or Windows RT 8.1, here’s how to learn more:

If you’re using a touch device, swipe in from the right edge of the screen, tap Settings, and then tap Change PC settings. Continue to step 3.

If you’re using a mouse, point to the lower-right corner of the screen, move the mouse pointer up, click Settings, and then click Change PC settings.

Select PC and devices > PC info.

Under Windows you’ll see which edition and version of Windows your device is running.

Under PC > System type you’ll see if you’re running a 32-bit or 64-bit version of Windows.

If you’re having a problem with activation, see Activate Windows 7 or Windows 8.1

If you forgot the password you use to sign in to Windows devices or email, see How to reset your Microsoft password.

For info about updating Windows, see Windows Update: FAQ.

Find operating system info in Windows 7

Select the Start button, type Computer in the search box, right-click on Computer, and then select Properties.

Under Windows edition, you’ll see the version and edition of Windows that your device is running.

Support for Windows 7 ended on January 14, 2020

We recommend you move to a Windows 10 PC to continue to receive security updates from Microsoft.

If you’re having a problem with activation, see Activate Windows 7 or Windows 8.1.

If you forgot the password you use to sign in to Windows devices or email, see How to reset your Microsoft password.

For info about updating Windows, see Windows Update: FAQ.

Find in Files

Find in Files allows you to search a specified set of files. The matches found and actions taken are listed in the Find Results window selected in Result options.

You can use any of the following methods to display Find in Files in the Find and Replace window.

To display Find in Files

On the menu bar, choose Edit > Find and Replace.

Choose Find in Files.

To cancel a Find operation, press Ctrl + Break.

The Find and Replace tool does not search directories with the Hidden or System attribute.

Find what

To search for a new text string or expression, specify it in the box. To search for any of the 20 strings that you searched for most recently, open the drop-down list and choose the string. Choose the adjacent Expression Builder button if you want to use one or more regular expressions in your search string. For more information, see Using regular expressions in Visual Studio.

The Expression Builder button will only be enabled if you have selected Use Regular Expressions under Find options.

Look in

The option chosen from the Look in drop-down list determines whether Find in Files searches only in currently active files or in all files stored within certain folders. Select a search scope from the list or click the Browse (. ) button to display the Choose Search Folders dialog box and to enter your own set of directories. You can also type a path directly into the Look in box.

With the Entire Solution or Current Project options, project and solution files are not searched. If you want to look in project files, choose a search folder.

If the Look in option selected causes you to search a file that you have checked out from source code control, only the version of that file which has been downloaded to your local machine is searched.

Include subfolders

Specifies that subfolders of the Look in folder will be searched.

Find options

You can expand or collapse the Find options section. The following options can be selected or cleared:

Match case

When selected, a Find Results search will be case-sensitive

Match whole word

When selected, the Find Results windows will only return whole word matches.

Use Regular Expressions

If this check box is selected, you can use special notations to define patterns of text to match in the Find what or Replace with text boxes. For a list of these notations, see Using regular expressions in Visual Studio.

Look at these file types

This list indicates the types of files to search through in the Look in directories. If this field is blank, all of the files in the Look in directories will be searched.

Select any item in the list to enter a preconfigured search string that will find files of those particular types.

Result options

You can expand or collapse the Result options section. The following options can be selected or cleared:

Find results 1 window

When selected, the results of the current search will replace the content of the Find Results 1 window. This window opens automatically to display your search results. To open this window manually, select Other Windows from the View menu and choose Find Results 1.

Find results 2 window

When selected, the results of the current search will replace the content of the Find Results 2 window. This window opens automatically to display your search results. To open this window manually, select Other Windows from the View menu and choose Find Results 2.

Display file names only

Displays a list of files containing search matches rather than displaying the search matches themselves.

Append results

Appends the results from the search to the previous search results.

Читайте также:  Как сделать невидимый курсор мыши windows 10
Оцените статью