Search by the contents of files in a folder. Instantly search files in Windows. Sleight of hand and no fraud. How to save search terms

Many novice users are interested in how to find a file on a computer. Windows 7 or any other operating system is not that important. The principle of searching for documents on a computer is approximately the same. Especially when it comes to the Windows platform. In general, there are quite a few options for action. They are all very simple. But you will have to not only study them, but also understand some of the features of the search. So how to find file and folders in Windows 7? What does the user need to know about this process? Perhaps, this procedure accessible even to those who are not yet familiar with computers at all.

About search

The first thing you should pay attention to is that search in Windows is carried out, as a rule, without additional software. This is a standard feature found on all operating systems. You don't have to download additional programs to help you search for information on your PC.

How to find a file on your computer? Windows 7 or any other version of the operating system is not so important. You need to understand that the process is extremely simple. It is enough to know the name of the file or folder you want to find. And do not fall for offers on the Internet that supposedly allow you to quickly search for information on your computer. It has already been said - additional programs no need for this!

Location address

How to search for files in Windows 7? As soon as the data reaches the computer, it is assigned a special address. It is through this that information is searched. All documents in the operating system have a similar component. There is not a single file on the computer without an address.

It usually consists of the section title hard drive, on which the document is located, then the path to the desired object is indicated. It consists of folders. For example: C:/Windows/system32/drivers/etc/host/.

Accordingly, the “host” document is located in the etc folder, which is placed in drivers. That, in turn, is located in a folder called “system32”, located in Windows on partition hard drive C. If you know the exact location of the document, you can quickly find it. This is why some recommend finding out or file. It can be used in the future. But more on that a little later. First, you should figure out how to find a file on your computer (Windows 7).

Manually

The first method is well suited when either the location of the document is known, or there is simply not the slightest idea of ​​what exactly the search subject is correctly called. This is about self-discovery document in the operating system. It’s enough just to study the files and folders on your computer and think about where exactly this or that document might be located. This method is called Extremely Unstable. But if the user has at least an approximate guess about where this or that information may be stored, such a solution can help.

If you know the exact location address, you can simply go to it. On the computer, the user searches for the hard drive partition he needs and the folder in which the document is located. Next comes the opening of the latter. Inside, a specific file is manually searched.

Exact navigation to address

But this is only the first scenario. In practice, it is not often used if the user is not sure of the location of the document. How to find a file on your computer? Windows 7 offers one clever and interesting trick. It will only work when the exact location of the document is known.

It is not at all necessary to manually open all the folders in which the file is attached. If you have an exact location address, you can quickly open the source of the document. To do this, it is best to open "Libraries". Next in address bar copy the file address and press Enter. A folder will open in which this or that document or another folder is attached.

That is, when you need to find a host, you need to copy the inscription “C:/..../etc” into the address bar. Then the etc folder will open, in which you will need to manually find required document. Nothing difficult or special. But so far we have considered situations in which the address is either known exactly or is known approximately. What to do if there is no such information?

Via "Start"

How to find files on a Windows computer (XP, 7, 8, 10 - it's not that important)? In general, you need to use a standard operating system function. It's called "Search". It is enough to know the name of the document that should be found.

The first way is real quick search- This is using the Start panel. How does an idea come to life with this opportunity? The user must adhere to the following algorithm actions:

  1. Click on the "Start" button in the left corner of the screen. A small menu will open.
  2. At the bottom of the service there is an empty field with a magnifying glass. On some operating systems, it says “Search programs and files.” You need to click there once with the left mouse button.
  3. A slider cursor will appear. In the field you need to type the name of the file, program or folder.
  4. Press Enter and wait for the results.

Nothing more is needed. A few seconds of waiting - and the results will appear on the monitor. Perhaps using "Start" is the most common option. But there are other ways. Searching for files on your computer in Windows 7 is carried out using different methods.

Through additional windows

You can implement your idea within a specific folder. This is not as difficult to do as it seems. Typically, the method helps when the user knows the approximate location of the document.

You must adhere to the following algorithm of actions:

  1. Open the root folder in which the document may be located.
  2. In the upper right corner, find a field with a magnifying glass.
  3. Type the address or document name.
  4. View the search results.

Using example c, the situation will look like this: the user opens partition of drive C, then in Explorer finds the message “Search: Local disk(C:)". In this field you need to write host and wait until all documents containing this word are found. Next, a specific document is manually searched among the entire list.

Filters

But that's not all. How to quickly find a file on your computer? Windows 7 or any other version of Windows is not so important. At least when it comes to newer types of Windows. You can use one trick. It will help you quickly find what you need among the results. The method is based on the previous method. We are talking about specifying search parameters.

The fact is that if you do not use filters, then often when searching you will have to look through a lot of documents and folders. It’s clear how to find a file on your computer. How to find what you need among the search results?

In this situation it is suggested:

  1. Perform a search in a particular folder.
  2. Click on the search bar in the upper right corner of the window.
  3. Select the required filters and set their parameters. In this case, there is no need to erase the name of the file or folder. For example, you can select the document type. In the case of host, this is .txt.
  4. Press Enter and look at the results again.

Accordingly, all documents and files that meet all search parameters will appear on the screen. This is how the implementation of the built-in Windows functions quickly discovering the necessary software.

Search service

Now it’s clear how to find a file on your computer (Windows 7). But there is another option for the development of events. You can call a separate search service on your computer. To do this, you need to press a certain key combination. Then the entire operating system will be scanned and searched.

Using standard function you can follow the algorithm:

  1. Press Win+F. A window with a bluish background will open. This is the standard Windows search engine.
  2. In the search bar (upper right corner, field with a magnifying glass), type the name of the file or folder.
  3. The user must press Enter and wait for the results. You can work with search filters in advance. This will reduce the results returned.

By content

There is one more, last trick. It's called "search inside files and folders in Windows 7". Many users are familiar with it. To bring it to life, you need:

  1. Open this or that document/folder.
  2. Press Ctrl+F.
  3. In the field that appears on the right side of the screen, enter the name of the document/folder/word.
  4. Click on "Enter".

This method is often used when working with Word. It not only helps you search for data in text, but also helps you search for documents.

Sometimes you may need to find a file that contains a certain string or find a line in a file that contains a particular word. In Linux, all this is done using one very simple, but at the same time powerful utility. grep. With its help, you can search not only for lines in files, but also filter the output of commands, and much more.

In this tutorial we will look at how to search for text in Linux files, let's look at the possible options in detail grep, and also give several examples of working with this utility.

Team grep(stands for global regular expression print) is one of the most popular commands in the Linux terminal, which is part of the GNU project. The secret to its popularity is its power; it allows users to sort and filter text based on complex rules.

The grep utility solves many problems, it is mainly used to find strings that match a line in text or the contents of files. It can also find by pattern or regular expressions. In a matter of seconds, the command will find a file with the required line, text in the file, or filter only a couple of required lines from the output. Now let's look at how to use it.

grep syntax

The command syntax is as follows:

$ grep [options] pattern [filename...]

$command | grep [options] pattern

  • Options- This Extra options, with which you specify various search and output settings, such as the number of lines or inversion mode.
  • Sample- this is any string or regular expression that will be searched
  • File and command - this is the place where the search will be conducted. As you will see further, grep allows you to search multiple files and even a directory using recursive mode.

The ability to filter standard output is useful, for example, when you need to select only errors from the logs or find the PID of a process in a numerous utility report ps.

Options

Let's look at the most basic utility options that will help you search for text in files more efficiently grep:

  • -b- show the block number before the line;
  • -c- count the number of occurrences of the pattern;
  • -h- do not display the file name in search results inside Linux files;
  • -i- ignore case;
  • -l- display only the names of files in which the template is found;
  • -n- show the line number in the file;
  • -s- do not show error messages;
  • -v- invert the search, return all lines except those containing a pattern;
  • -w- search for a pattern as a word surrounded by spaces;
  • -e- use regular expressions when searching;
  • -An- show the occurrence and n lines before it;
  • -Bn- show the entry and n lines after it;
  • -Cn- show n lines before and after the entry;

We've covered all the most basic options and even more, now let's move on to examples of the command's work grep Linux.

Examples of using

The theory is over, now let's move on to practice. Let's look at some basic examples of searching inside Linux files using grep, which you may need in everyday life.

Finding text in files

In the first example, we will look for the user User in the Linux password file. To search for text grep In the /etc/passwd file, enter the following command:

grep User /etc/passwd

As a result, you will get something like this, assuming such a user exists, of course:

User:x:1000:1000:User,:/home/User:/bin/bash

Now let's not take case into account during the search. Then the combinations ABC, abc and Abc from the point of view of the program will be the same:

grep -i "user" /etc/passwd

Print multiple lines

For example, we want to select all errors from a log file, but we know that the next line after the error may contain helpful information, then use grep to display multiple lines. We will look for errors in Xorg.log using the “EE” pattern:

grep -A4 "EE" /var/log/xorg.0.log

Will output the line with the occurrence and 4 lines after it:

grep -B4 "EE" /var/log/xorg.0.log

Prints the target line and 4 lines before it:

grep -C2 "EE" /var/log/xorg.0.log

Will output two lines from the top and bottom of the entry.

Regular expressions in grep

Regular Expressions grep- a very powerful tool that greatly expands the possibilities of searching for text in files. To activate this mode, use the option -e. Let's look at a few examples:

Search for an occurrence at the beginning of a line using the special character "^", for example, we will display all messages for November:

grep "^Nov 10" messages.1

Nov 10 01:12:55 gs123 ntpd: time reset +0.177479 s
Nov 10 01:17:17 gs123 ntpd: synchronized to LOCAL(0), stratum 10

Search at the end of the line - special character "$":

grep "terminating.$" messages

Jul 12 17:01:09 cloneme kernel: Kernel log daemon terminating.
Oct 28 06:29:54 cloneme kernel: Kernel log daemon terminating.

Let's find all lines that contain numbers:

grep "" /var/log/Xorg.0.log

In general, regular expressions grep- This is a very broad topic, in this article I just showed a few examples. As you have seen, searching for text in grep files becomes even more efficient. But a full explanation of this topic would require an entire article, so let’s skip it for now and move on.

Recursive use of grep

If you need to search for text in multiple files located in the same directory or subdirectories, for example in the Apache configuration files - /etc/apache2/, use a recursive search. To enable recursive search in grep there is an option -r. The following command will search text in Linux files in all subdirectories of /etc/apache2 for the string mydomain.com:

grep -r "mydomain.com" /etc/apache2/

In the output you will get:

grep -r "zendsite" /etc/apache2/
/etc/apache2/vhosts.d/zendsite_vhost.conf: ServerName zendsite.localhost
/etc/apache2/vhosts.d/zendsite_vhost.conf: DocumentRoot /var/www/localhost/htdocs/zendsite
/etc/apache2/vhosts.d/zendsite_vhost.conf:

Here, the found string is preceded by the name of the file in which it was found. It is easy to disable the file name output using the option -h:

grep -h -r "zendsite" /etc/apache2/

ServerName zendsite.localhost
DocumentRoot /var/www/localhost/htdocs/zendsite

Finding words in grep

When you are looking for the string abc, grep will also output kbabc, abc123, aafrabc32 and similar combinations. You can force the utility to search the contents of files in Linux only for those lines that exclude the search words using the option -w:

grep -w "abc" filename

Search two words

You can search the contents of a file not for one word, but two at once:

egrep -w "word1|word2" /path/to/file

Number of occurrences of a string

Utility grep can tell you how many times a particular string was found in each file. To do this, use the option -c(counter):

grep -c "word" /path/to/file

Using the option -n You can display the line number in which the occurrence was found, for example:

grep -n "root" /etc/passwd

1:root:x:0:0:root:/root:/bin/bash

Inverted search in grep

Team grep Linux can be used to find lines in a file that do not contain a specified word. For example, print only those lines that do not contain the word pair:

grep -v steam /path/to/file

File name output

You can specify grep display only the name of the file in which the specified word was found using the option -l. For example, the following command will display all file names whose contents were searched to find an occurrence of primary:

grep -l "primary" *.c

Color output in grep

You can also force the program to highlight occurrences in the output with a different color:

grep --color root /etc/passwd

It will turn out:

conclusions

That's all. We looked at using the command grep to search and filter command output in the operating room Linux system. When used correctly, this utility will become a powerful tool in your hands. If you have any questions, write in the comments!

If in Windows XP the file search was, although slow, still workable, then in Windows 7 it turned into something completely incomprehensible. Many people successfully use search in Far or Total Commander instead of the standard ones Windows tools. When there are a lot of files on disks, this search is also slow. I would hardly have believed if I had not tried it myself that files can be found instantly (!), right when entering the file name into the search bar. Interested?

A miracle program that saved me a lot of time and continues to help me every day is called Everything. This free mini-application (the portable version is 272 KB in size) does just one simple thing - it searches for files on disks based on part of the file name. The magic is that the search happens instantly as you type the letters of the file name into the search bar (like Google's "live search"). This opens up much greater possibilities for searching files. For example, if you forget the exact name of a file, you can quickly try different variations of the name. With a “classic” search, you would have to wait a long time each time for the search to complete, but here you can immediately see whether something was found or not:

How it works?

When the program is first launched, it scans the file distribution table (NTFS MFT) and saves the scan result to a small cache file. Disk scanning is very fast - even with several terabytes of data, scanning will take no more than one minute. Based full list files on all drives Everything builds an in-memory data structure for quick retrieval. During subsequent launches, repeated scanning of all disks will no longer occur: the program will take information from the cache file and only update it. To track file changes, the program uses information from the USN log of the NTFS partition.

Program limitations:

  • The program searches only NTFS partitions.
  • The search is performed only by file names (it is not possible to search by attributes, dates and contents of files).

I'm sure Everything will become your reliable assistant and save many, many hours. And for Microsoft, this is a reason to think about how search should actually work;)

The search mechanism in Windows 7 is organized a little differently than in Windows XP, but it is no less convenient and is performed at a much faster speed.

How to start a search

To start searching for files in Windows 7, you need to open Explorer and select the folder in which you want to search, or, if you don’t know what directory the file is located in, select “My Computer.” Then the search will be performed on all hard drives.

You need to search for files of any format using the search bar, which is located in the upper right corner of Explorer in any of its windows. Keyword or phrase must be entered in this line.

The search is performed very quickly, similar to the request processing mechanism in any search engine. As you enter a query word, the system immediately begins scanning files and producing results with titles containing the characters, words, or phrases you entered.

How to use search filters

At first glance, it may seem that the usual filters available in XP, such as date created or modified, file type, size and author, are not available when searching in Windows 7, but this is not at all the case.

When you enter a search query in the drop-down line below, a list of filters corresponding to the desired file type appears, the conditions of which can be set right there in the search line. To do this, click on the desired filter and set its value, for example, the change date “Last week”.


How to find files of a specific type

To find a file whose format is known, for example audio, video, photo or document, but its name, creation date or other parameters are unknown, you can use a search by file type, specifying its extension in the search conditions.

Documentation . To search for documents Word format you need to enter the characters “*.doc” (for Word 2003 format) or “*.docx” (for Word 2007-2010 format) in the search bar. An asterisk denotes any sequence of any characters.

For Excel files you need to use the symbols “*.xls” (for Excel format 2003) or “*.xlsx” (for Excel 2007-2010 format).

For text format files created using the Notepad application, you need to enter “*.txt” in the search bar.

Video. To search for video files, enter the video file extension in the search bar. The most popular extensions: “*.avi”, “*.mp4”, “*.mpeg”, “*.wmv”, “*.3gp”, “*.mov”, “*.flv”, “*.swf” " You can find out the file extension by clicking on it right click mouse and selecting context menu“Properties”, where the “File type” line will indicate its extension.

Audio. The most popular audio file format used on computers is MP3, and to search for them you need to enter the characters “*.mp3” in the line.

Images and photographs. To search for pictures, you should enter the most used extensions of such files “*.jpg”, “*.jpeg”, “*.png”, “*.bmp”, “*.tiff”, “*.gif” in the search bar.


How to find a file in a large list of already found files

It often happens that the file attributes are unknown, or only one is known, and it is very uninformative. For example, we know that the document was created last year. However, over the past year, a huge amount of documents have been created and stored in different places. It is often not possible to view and check a huge number of files found based on one criterion.

To find required file in the list of already found files, you can use several filters simultaneously, setting and changing each of them during the search process as necessary. Each time you add a new filter, the selection will be made again in the list of found files, reducing processing time and the number of results, which greatly simplifies the search for the very desired file.

How to find a file by content

As a rule, files are searched in Windows 7 based on the content of the query in the file name, and not on the text that the file contains. To find a file with the desired word in its text, and not in its name, you need to make simple settings.

Let’s say the task is to find a document among 500 files with the word “Shovel” in its content. To do this, click “Arrange” on the control panel and select “Search folder options” from the drop-down menu.

It is worth noting that searching with this option will take longer, and when the need to search by content is no longer necessary, this option should be disabled.

How to save search terms

It often happens that files need to be searched frequently, for this the same search conditions are used, and there are several of these conditions. In order not to waste time entering the same search parameters every time, the list of these conditions can be saved.

To do this, you need to set the search conditions, wait for the results to be displayed, and upon completion, click “Save search conditions” on the control panel, and in the window that opens, enter the file name for the recurring query, for example, “JULY 2013.”

In the future, when the saved set of search conditions is needed again, the desired shortcut can always be selected in Explorer in the “Favorites” folder under the saved name.

How to clear your search terms

By clicking on the cross at the end of the search line, you can clear the previously entered information and filter conditions that were used for the search, and the line will become empty.

Having tried search in Windows 7 several times, you can verify in practice that it is practical, easy and fast. Now you know how to search for files in Windows 7.

Good afternoon friends! Today we will continue our lessons with the operating room Windows system 7 and learn another secret - how to properly configure and search for files in Windows 7.

It would seem, what’s wrong with that? A search engine is a search engine. I switched to seven about a year ago. And to be honest, in XP I tried not to use the built-in search engine. Absolutely inconvenient. And what you need is either not found, or found, but the process sometimes drags on for several hours.

I didn't expect much from 7. But just the other day, this OS pleasantly surprised me. I needed to search for one file in Windows 7, I didn’t remember its exact name, but I typed part of the name... and received my file in less than 2-3 seconds. Now I only use the built-in search engine.

Indexing service in windows 7

Microsoft developers did a good job. 7's search tool compares favorably with previous operating systems of this family not only in quality, but also in search speed.

My favorite browser is Chrome, and its search engine is very similar to the mechanism in Windows 7. The search begins its work as soon as you enter the first characters. In addition, there is a hint system based on the history of previous requests. If too many results are returned for a search query, the system suggests using dynamic filtering based on various criteria - date, file size, type, etc.

Based on this efficient work The OS search engine has a special indexing service. It starts with operating system, works in the background, creates a special database of information about files. Updating and restoring the index in the event of any failure also occurs automatically, without user intervention.

It should be noted that the OS allocates a certain system resource for the operation of this service. For the service to work effectively, but not to the detriment of other programs, it must be configured correctly. We will definitely talk about this today.

Instantly search for files in Windows 7

7 provides two ways to instantly search for files.

  • 1. Search using the Start menu. Click on the “Start” button and enter the required information in the search field below search query. For example, “Christmas tree”.

As you enter data, search results will be displayed directly in the Start window. It should be noted that the search is also carried out by the contents of the files.

If there are too many results and you want to get acquainted with them in more detail, click on the “View other results” button.

The “Search Results” window will open. The files here are already sorted by type and the search query is highlighted in yellow.

You can make your search more specific. To do this, scroll to the very bottom of the list of search results.

And in the “Repeat search in:” section, select the appropriate option.

If you assume that the file you are looking for is in the OS Library, then select this option.

If you know approximately which folder to search in, select the “Other...” option and specify a specific folder to search.

If you want to search on the Internet, click the “Internet” button.

If you want to repeat the search on the entire computer, click on the “Computer” button. By default, the indexer goes through all files except OS system files and program files. This allows you to increase search speed and reduce the size of the indexer database. but it’s true how often we search system files? It's not often. By selecting the “Computer” option, the system will repeat its search, but only more thoroughly and, accordingly, will take a longer period of time.

  • 2. The second option for instant search is searching in the “ Windows Explorer" The principle of operation is approximately the same.

Setting up the indexing service

  • 1. Go to “Start” -> “Control Panel” -> then in the search area enter “indexing” -> select the “Indexing Options” section.

  • 2. In the window that appears, you will see all the folders for which the indexing service works. If you want to exclude any folder from the search (for example, you know that one of the partitions of your hard drive is used for Reserve copy, then, in principle, it can be removed from this list), click the “Change” button.

And uncheck the box next to the folder that you want to remove from the search engine. Next, click the “OK” button.

  • 3. Next, click on the “Advanced” button. In the window that opens, on the “Indexing Options” tab, uncheck all two boxes. In 99% of cases, we do not need these functions, and therefore there is no need for additional load on the indexing service.

  • 4. If you want to transfer the index base from system partition hard disk to another partition in order to free up free space on the disk, then to do this you need to specify a new folder in the “Index location” section on the same tab.

To successfully change the index database location, be sure to restart the indexing service or simply restart the computer.

  • 5. Next, go to the “File Types” tab and edit the list of file types, leaving only the most essential (with which you work). This will significantly reduce the load on the system. By default, the indexing service processes almost all file types in use.

  • 6. Finally, decide how the indexing service will process files.

If you select “Index properties only,” the indexer will process only the file name and its metadata (size, type, creation date).

If you select the “Index properties and contents of files” option, the document will be completely processed, including its contents. This will take longer and require additional system resources, however, will increase the likelihood of search accuracy.

The choice is yours, my dear Reader.

  • Next, click “OK” and “Close”.

Today we looked at the capabilities of the Window 7 search service and how to configure it. In the next article I will share with you another interesting tool (though from a third-party developer), which allows you to search adapted to the Russian-speaking population, taking into account declensions and cases.



2024 wisemotors.ru. How it works. Iron. Mining. Cryptocurrency.