Debian

How to Find Files in Debian 10

Find Files Debian in 10

Introduction:

Being a computer user, we all work with different types of files quite often. However, at times, there is such a large number of files on our computer system that it gets nearly impossible to keep the names of all those files at your fingertips. At times, you even tend to forget if a certain file exists on your system or not. In these situations, we try to look for the different ways in which we can find files in our system. Today’s article is focused on the methods of finding files in a Debian 10 system.

Methods of Finding Files in Debian 10:

First, we will be creating a sample text file for demonstrating all the methods that are listed below. A text file in Debian 10 can be created with the following command:

sudo nano TextFile.txt

Here, you can replace TextFile with any name of your preference. We have named our sample text file as abc.txt.

Running the above-mentioned command will also open the newly created file with the nano editor. Here, you can type in any random text. This text is not that important since we are just going to use this file for demonstration. Our sample text file with some random content is shown in the image below:

After creating this file, now we will use the three different methods below to find this file in Debian 10.

Method # 1: Using the “whereis” Command in Debian 10:

The “whereis” command in Debian 10 is essentially used to trace the exact path of any specified file. However, this command can also be used indirectly to find a file in Debian 10 because this command will display the paths of only those files that actually exist in your system. Therefore, to find our sample text file named abc.txt, we will run the following command:

whereis abc.txt

Since we have created our sample text file in the Debian 10 Home directory, therefore, you will be able to see a colon after the file name in the output of this command as shown in the image below. However, if your sample file or any other file that you are trying to locate resides in some other directory, then the above-mentioned command will display its exact path.

Method # 2: Using the “find” Command in Debian 10:

The “find” command in Debian 10 is extremely versatile in terms of the options that can be used in conjunction with this command to find files as per our requirements. If a file you are looking for actually exists in your system, then the “find” command will return its name. Otherwise, it will not display any output. The “find” command in its simplest form is used as follows where we are trying to check whether the text file named abc.txt exists in our Debian 10 system or not.

find abc.txt

You can crosscheck from the output of the command shown below that the file named abc.txt exists on our Debian 10 system.

Method # 3: Using the Debian 10 GUI:

Finally, there is a GUI based method too with which you can easily search for any specific file if you do not want to use the Debian 10 terminal. For using the GUI of a Debian 10 system to search for files on it, you simply have to go to its file manager by looking for its icon on the Debian 10 taskbar.

Once you are there in the Debian 10 file manager, you need to click on the search icon as highlighted in the following image.

This will allow you to type in the name of the file you are looking for in the appeared search bar. We have simply typed “abc” in that search bar and our Debian 10 system has displayed our file abc.txt on the screen as highlighted in the image shown below.

In the very same manner, you can look for any desired file in Debian 10 using its GUI. This will also confirm if a certain file exists on your system in the first place or not.

Conclusion:

This article threw light on the three different methods of finding files in Debian 10. The first two methods are designed mainly for the techies who like working with the CLI whereas the third method targets the common users who are more likely to use the GUI.

Similar Posts