Predictive Hacks

How to Search for a File in Unix/Linux

It is very common to try to find a file on our hard disk or within a directory and sub-directories. We can easily do that with the find command in Unix/Linux. Let’s say that I am looking for file names that contain the word report.

find . -iname "*report*"

Notice that the . refers to our current directory, we could have used the path explicitly like /home, the -iname will make find ignore the filename case, if you want to be case sensitive, you should use the -name and the * within the quotes refer to any character, so in essence, we are looking for file names that contain the substring report.

Regarding the Wildcard Characters which are useful for searching:

  • * Zero or more characters
  • ? Any one character
  • [] Any character in the brackets

Share This Post

Share on facebook
Share on linkedin
Share on twitter
Share on email

Subscribe To Our Newsletter

Get updates and learn from the best

More To Explore


Image Captioning with HuggingFace

Image captioning with AI is a fascinating application of artificial intelligence (AI) that involves generating textual descriptions for images automatically.


Intro to Chatbots with HuggingFace

In this tutorial, we will show you how to use the Transformers library from HuggingFace to build chatbot pipelines. Let’s