iSnare.com - Free Content Articles Directory
Authors Contents [Advanced Search][Add OpenSearch][Job Search]
Distribute your articles to thousands of article sites for only $2 and below! Read more...

Index  Computers and Technology
 

Linux: Find Files Containing Text

 
[ Contact the Author] [ Send to a Friend] [ Article Publisher] [Make PDF] [ Print] [ Bookmark & Share]
 
Read our Terms of Service before reprinting this article. The submitter specified above has claimed the rights to this article.
Selwin Verallo

Because of our being forgetful in nature, we oftentimes forget the files that we have created. We can only be fortunate if we can still remember the path, folder, or directory where we have stored those missing files. If that's the case, it would never be a big deal then. However, trully this a big problem and even painful if we can't even remember where we have placed the missing files in our computer. "Simple," I'm hearing you... "find it." Yeah, we can find it. But wait, do you know the filename?

Forgetting files and forgetting the filenames are most common in us. I will never believe somebody out there have a photographic memory and has never experienced missing some of the files he had created before. For sure, we all have gone through that frightening experience especially if the file that is missing is so precious to us.

In Windows, this problem can easily be addressed just by using the find or search tool in the Start menu. Can you remember some texts or phrases in the filename? Use "find files with names" and unleash the power of the wildcard character (*). For example, if you can only remember the word "statistic" in the filename, then search for "*statistic*" and that will search for files with the word "statistic" in the filename. "I can't even remember a word in the filename," again I can hear you saying that. Well, I don't think you can't even remeber even a single word in the file content itself. If you can't remember even a word or phrase in the filename then go for the file content itself. In Windows, still you can search for files containing some texts that you specify in your "find files containing text" input box. That will absolutely solve your problem of forgetting words in the filename itself.

However, if you are in Linux, the whole thing would be more different and complex than it is in Windows especially if you are just a normal user dependent on the GUI interface. Linux is more on executing commands from a shell.

So if you are a normal user and that you are facing the "missing files" problem in Linux, don't worry, I will show you the most common methods in solving this issue:

Find files that contain a text string

grep -lir "text to find" *

The -l switch outputs only the names of files in which the text occurs (instead of each line containing the text), the -i switch ignores the case, and the -r descends into subdirectories.

Find files containing search terms on Ubuntu

To find files containing keywords, linux has a powerful command called grep, which you can use to find the lines inside any file or a list of files.

grep -i -n ‘text to search' *

List files containing text

Used to recursively search a directory for files containing a string, output the names of the files and the line number. This will search all regular files in for .

grep --with-filename --line-number `find -type f`

Important NoticeDISCLAIMER: All information, content, and data in this article are sole opinions and/or findings of the individual user or organization that registered and submitted this article at Isnare.com without any fee. The article is strictly for educational or entertainment purposes only and should not be used in any way, implemented or applied without consultation from a professional. We at Isnare.com do not, in anyway, contribute or include our own findings, facts and opinions in any articles presented in this site. Publishing this article does not constitute Isnare.com's support or sponsorship for this article. Isnare.com is an article publishing service. Please read our Terms of Service for more information.

The author is the owner of one of the most favorite blogs http://smart-pad.blogspot.com.
Article Tags: files [See Dictionary], find [See Dictionary], search [See Dictionary]
Got a question about this article? Ask the community!
Article published on September 05, 2007 at Isnare.com
 
Rate [Ratings: 0 / 5] [Votes: 51]

How to Prevent the Noise on Your Car Stereo
Submitted by: Jack Wylde

If you do not know or cannot comprehend what that term means “noise” from your car audio system then you perhaps don’t own a car audio system yet...

Ways a Camera Phone Can Help in an Emergency
Submitted by: Seomul Evans

In an emergency you will require to allow and welcome help, and later it is over, you will have to return, repair, and rebuild...

Facts About Cell Phones Health Risks?
Submitted by: Seomul Evans

Through the long time, there have been so many rumors concerning the wellness risks of cell phones But we are a society that would almost rather die, than give them up...

How to Pick a Car Cassette Player
Submitted by: Jack Wylde

Cassette player for your car audio system is the most basic kind of stereo system that you can purchase for your car...

How Your Web Hosting Can Help Grow Your Business
Submitted by: Frank Hendrickson

One of the most popular ways of marketing and promotion in this time and age is through online or what everybody calls as internet marketing, web marketing or e Marketing...

Web Conferencing: Fast, Easy and Reliable Way of Connecting to People
Submitted by: Allison Clarke

Are you cringing by the thought of planning a conference Making travel arrangements, organizing numerous agendas, trying to secure a location, and the expenses will surely make anyone dismayed in setting up a conference...

Best Mini Netbooks - Mini Laptop Reviews - Samsung - Lenovo - Acer
Submitted by: James J Clarkson

Netbooks are very quickly gaining in popularity It was not all that long ago that you could go to a computer store and see only one or two brands of netbooks...

Will You Still Find Cheap Car Audio Systems?
Submitted by: Jack Wylde

You will be surprised as to how untrue the stereotype theory of cheap audio systems equals to bad sound quality actually is...

How to Improve the Sound Quality of Your Car Audio
Submitted by: Jack Wylde

The truth is that if you just buy the car with no additional sound accessories, the sound quality of your car stereo system might not be the kind that you would like it to be...

Car Cassette Player: Two Features
Submitted by: Jack Wylde

The cassette player for the car audio system is the most basic kind of stereo system that you can have for your car...

Why You Need Car Alarm For Your Car Stereo Systems
Submitted by: Jack Wylde

You must understand the importance of an alarm system for a car that has some kind of car stereo system installed in it...

Plexiglas For Your Car Audio
Submitted by: Jack Wylde

Surely you have heard of Plexiglas and all the benefits that surround such an absolutely brilliant invention for mankind...

Shopping For Car Speakers
Submitted by: Jack Wylde

If you have your own car and if you have bought it recently you know then exactly how much time of the day you will be spending in zipping around in it...

Your Car Audio System Should Suit You
Submitted by: Jack Wylde

Car audio systems are a great source of enjoyment for the person who is driving the car as well as the others who are not; in fact a stereo inside a car has now become almost like a necessity for people around the world...

The Importance of a Car Audio Equalizer
Submitted by: Jack Wylde

For most of us, when we own a car a must-have is a car audio system for our own driving enjoyments as well as for those being driven around...

Isnare.com Footer Divider

© 2004-2009. Isnare Free Articles - An Isnare Online Technologies Free Articles Project. All Rights Reserved.   Privacy Policy