White Hat Institute

Linux basics

Command-line interface (part 8)

Finding things around

Finding a document in a Linux framework can be troublesome on the off chance that you don’t have the foggiest idea how. The ideal approach to discover records is to use a few distinctive terminal commands. Mastering these commands can give you extensive oversight over your documents, and they are significantly more dominant than the essential search functions on other operating frameworks. Let’s take a look at them.

  • : The  operator enables you to scan for documents for which you know the relative filenames. The easiest type of command searches for records in the flow registry and recursively through its subdirectories that match the provided search criteria. You can scan for documents by name, owner, group, type, permissions, date, and other rules. Type the following command to list all files found in the current directory.

Linux basics 70

To find records that match a particular pattern, use the  option. You can utilize filename meta-characters such as  yet you should put an escape character  in front of each of them. For instance, if we need to find every file that starts with  in the  folder, we need to change our directory to the  folder, and after that type the following command:

Linux basics 71

The  operator has a ton of alternatives accessible for refining the search. For more information about the  operator, run  in a Terminal window and press 

  • : The  option is quicker than the  option since it utilizes a recently built database, while the  command searches in the real system, through all the actual directories and records. The  command restores a rundown of all pathnames containing the predefined group of characters.

Linux basics 72
  • : This operator returns the absolute path of the executable when a command is given. It helps find the location of an executable for creating an alternative way to the program on the desktop or another place in the desktop manager.

Linux basics 73

As a matter of course, the  command only shows the first matching executable. To show all matching executables, utilize this command with the  option.