In any laptop system, you’ve got tons of various recordsdata. A few of them are system recordsdata which might be there for the reason that very starting, whereas a few of them are consumer recordsdata that you simply create by yourself as per your wants. Nonetheless, when there’s a massive bulk of recordsdata, and also you solely want to seek for a selected file or set of recordsdata for any particular job, then the method of in search of that file or recordsdata manually might be extraordinarily tedious as it’s a must to go to every listing looking for that file or recordsdata that you simply want. And even then, it’s not assured that you’ll be successfully capable of finding all these recordsdata.

Fortunately, our working programs as of late are environment friendly sufficient that they current us with other ways by which we are able to automate this job and make it extra speedy. Like different working programs, Linux additionally permits us to seek for recordsdata robotically through terminal instructions. Subsequently, immediately, our dialogue will revolve round exploring the completely different strategies of looking for recordsdata on Linux from the command line.

Notice: The strategies defined under have been examined with Linux Mint 20.

There are 4 other ways of looking for recordsdata on Linux from the command line, and we’re going to talk about all of them one after the other:

Technique #1: Utilizing the “discover” command

The “discover” command with its completely different choices can be utilized to seek for recordsdata primarily based on their identify, kind, date modified, measurement, and many others. on Linux through the command line. On this state of affairs, we wish to use the “discover” command to filter out all of the textual content recordsdata which might be current in our present listing. We should proceed as follows to do that:

In your terminal, you should execute the next command:

$ discover –kind f –identify ‘*.txt’

Right here, the asterisk is used for indicating that the above-mentioned command will return all of the textual content recordsdata current in your present working listing.

How to Search for Files on Linux from the Command Line? – Linux Hint

Once you hit the Enter key to execute this command, it is possible for you to to see all of the recordsdata with the .txt extension which might be positioned in your present listing, as proven within the picture under:

How to Search for Files on Linux from the Command Line? – Linux Hint

Technique #2: Utilizing the “find” command

The “find” command is helpful every time you realize the entire identify of the file to be searched, or you realize the identify partially, i.e., only a half for it. This command will basically fetch all these recordsdata for you that include the entire or partial identify that you’ve specified after this command. For instance, In our present listing, we’ll filter for all of the recordsdata containing the “sed” string of their names. This may be accomplished by following the steps talked about under:

You might want to execute the command proven under in your terminal:

Right here, “sed” might be changed with every other string that needs to be contained within the names of the recordsdata that you simply wish to search utilizing the “find” command.

How to Search for Files on Linux from the Command Line? – Linux Hint

As soon as this command executes, it is possible for you to to see all of the recordsdata that include the desired string, i.e., “sed” on this case, their names are proven within the following picture:

How to Search for Files on Linux from the Command Line? – Linux Hint

Technique #3: Utilizing the “whereis” command

This command is a bit of bit superior in a way that this doesn’t solely return the file names that you’re in search of reasonably it additionally returns the entire path to the binary and supply together with the person pages (in case of command) as its output due to which you’ll precisely find the place all the mandatory recordsdata of a bundle or a command reside. To reveal the utilization of the “whereis” command in Linux Mint 20, we’ll merely attempt to search for the person pages, the binary file, and the supply file of the “lsusb” command. We are able to do that by performing the next steps:

We’ve got to execute the command said under within the terminal:

Right here, “lsusb” might be changed with every other command or bundle whose binary, supply, and man pages you wish to search whereas utilizing the “whereis” command.

How to Search for Files on Linux from the Command Line? – Linux Hint

Once you run the command proven above in your terminal, it is possible for you to to see the entire path to the binary file, supply file, and the person pages of the “lsusb” command as proven within the following picture:

How to Search for Files on Linux from the Command Line? – Linux Hint

Technique #4: Utilizing the “which” command

The “which” command might be known as as a mini model of the “whereis” command because it solely returns the entire path of the executable file of a command or a bundle. At any time when you’re solely involved with looking for the binary file of a selected command or a bundle, you may conveniently make use of the “which” command. For instance, we’ll attempt to seek for the executable file of the “lsusb” command whereas making use of the “which” command as defined under:

You merely must execute the next command in your terminal:

Right here, you may exchange “lsusb” with every other command or bundle whose executable file you wish to search whereas utilizing the “which” command.

How to Search for Files on Linux from the Command Line? – Linux Hint

After working the above-mentioned command in your terminal, you’ll instantly have the ability to see the trail to the executable file of the “lsusb” command in your terminal as proven within the picture under:

How to Search for Files on Linux from the Command Line? – Linux Hint

Conclusion

By selecting any of the strategies mentioned on this article in accordance with your wants, you may search for your required recordsdata on the Linux working system and therefore save yourselves from the effort of in search of every file manually.

100 linux tips and tricks,linux tricks and hacks,save command in linux terminal,in unix terminal,linux screen tips and tricks,tecmint linux tricks,linux cheat sheet pdf,linux commands cheat sheet 2020 pdf,kali linux cheat sheet pdf,linux cheat sheet github,linux cheat sheet wallpaper,ubuntu cheat sheet 18.04 pdf,cheatography linux,linux cheatbook,ubuntu 18.04 terminal commands,linux switches list,linux command switches,the echo command:,a linux text-mode login prompt reads,the chgrp command can be used on a file by:,what does the command line prompt pwd mean?,linux commands with examples and syntax,linux commands cheat sheet,in linux means,linux commands pdf,state the purpose of vi editor,dd unix,linux cheat sheet reddit,list all txt files in a directory linux,how to list the hidden files,ls list only file names,what does ls -al do,linux find -exec ls,command used to move to another directory,linux command cheat sheet pdf,linux administration commands cheat sheet pdf,linux cheat sheet commands,best linux cheat sheet,a to z linux commands pdf,linux commands cheat sheet with examples pdf,basic linux commands

You May Also Like

Calculation Number of Days Between Two Dates

Topic: Delphi Language charlene44 wrote: 18/08/2006 at 15h08 calculation of number of…

Top Benefits of Social Media Marketing

We cannot deny the fact that when it comes to marketing, social…

World of Warcraft Classic: Some Players Use Illegal Tools to Stay Connected

Earlier this week, Blizzard released World of Warcraft Classic. The launch was,…

Crash Team Racing Bientt Back on Ps4!

Activision seems not to have finished with the remastering of the Playstation…