Due to our being forgetful in nature, we oftentimes neglect the recordsdata that we have now created. We will solely be lucky if we will nonetheless keep in mind the trail, folder, or listing the place we have now saved these lacking recordsdata. If that is the case, it could by no means be an enormous deal then. Nevertheless, trully this an enormous downside and even painful if we won’t even keep in mind the place we have now positioned the lacking recordsdata in our laptop. “Easy,” I am listening to you… “discover it.” Yeah, we will discover it. However wait, are you aware the filename?
Forgetting recordsdata and forgetting the filenames are most typical in us. I’ll by no means consider any individual on the market have a photographic reminiscence and has by no means skilled lacking a few of the recordsdata he had created earlier than. For positive, all of us have gone via that scary expertise particularly if the file that’s lacking is so valuable to us.
In Home windows, this downside can simply be addressed simply through the use of the discover or search instrument within the Begin menu. Are you able to keep in mind some texts or phrases within the filename? Use “discover recordsdata with names” and unleash the ability of the wildcard character (*). For instance, in case you can solely keep in mind the phrase “statistic” within the filename, then seek for “*statistic*” and that can seek for recordsdata with the phrase “statistic” within the filename. “I can not even keep in mind a phrase within the filename,” once more I can hear you saying that. Effectively, I do not assume you’ll be able to’t even keep in mind even a single phrase within the file content material itself. If you cannot keep in mind even a phrase or phrase within the filename then go for the file content material itself. In Home windows, nonetheless you’ll be able to seek for recordsdata containing some texts that you just specify in your “discover recordsdata containing textual content” enter field. That may completely clear up your downside of forgetting phrases within the filename itself.
Nevertheless, if you’re in Linux, the entire thing can be extra completely different and sophisticated than it’s in Home windows particularly if you’re only a regular consumer depending on the GUI interface. Linux is extra on executing instructions from a shell.
So if you’re a standard consumer and that you’re going through the “lacking recordsdata” downside in Linux, don’t fret, I’ll present you the most typical strategies in fixing this problem:
Discover recordsdata that include a textual content string
grep -lir “textual content to seek out” *
The -l change outputs solely the names of recordsdata by which the textual content happens (as a substitute of every line containing the textual content), the -i change ignores the case, and the -r descends into subdirectories.
Discover recordsdata containing search phrases on Ubuntu
To search out recordsdata containing key phrases, linux has a robust command referred to as grep, which you need to use to seek out the traces inside any file or a listing of recordsdata.
grep -i -n ‘textual content to look’ *
Checklist recordsdata containing textual content
Used to recursively search a listing for recordsdata containing a string, output the names of the recordsdata and the road quantity. This may search all common recordsdata in for.
grep –with-filename –line-number `discover -type f`