How to search directory for specific files?

Let’s learn how to search directory for specific files. The most accurate or helpful solution is served by Stack Overflow.

There are ten answers to this question.

Best solution

How to search a a directory tree in TCL for files that end in .so or .a and build a list of those directories

I'm trying to write a set of TCL scripts that helps setup a user's environment for a set of libraries that are not in their standard LD_LIBRARY_PATH as part of a support solution. Since the system is rather sparse in terms of what I can install, I don't really have access to any TCL extensions and am trying to do this in base TCL as much as possible. I'm also relatively new to TCL as a language. What I'd like to do is search through a directory structure and locate the directories that have .so...

Answer:

Tcllib has a fileutil module that does a recursive find: package require fileutil set filenames [::fileutil...

Read more

stareja at Stack Overflow Mark as irrelevant Undo

Other solutions

What is the Linux command to search for a word in list of files in a directory?

I want to search word  in all the files of a directory and list the files which contain that word. Which linux command will be helpful ?

Answer:

grep -w -l <searchword> <pathofdirectory> the -w option forces grep to exactly match...

Read more

Sundeep Agarwal at Quora Mark as irrelevant Undo

Answer:

The program below will search all non-directory files in the starting directory. If you want to search...

Read more

wiki.answers.com Mark as irrelevant Undo

Answer:

The traditional answer is the one already given with find and sed. This replaces "foo" with...

Read more

Joshua Levy at Quora Mark as irrelevant Undo

Answer:

Different operating systems may have very different tools. On Linux and Unix-like systems, 'grep computers...

Read more

community wiki at wiki.answers.com Mark as irrelevant Undo

Answer:

Unix really doesn't use file extensions, but if you want to look for them recursively, then use: ls...

Read more

community wiki at wiki.answers.com Mark as irrelevant Undo

Answer:

I use the locate command. Locate just queries a database and prints out the location of the file as...

Read more

wiki.answers.com Mark as irrelevant Undo

Search local hard drive for all the copies of the single file, VB6

Hi, I have a code, which is searching through all hard drives for the specific file. It has only two functions. Function “SearchFileRecursivw” has a place where I specify the path for my file under comment "Main Loop". My problem...

Answer:

Hi rbrian2-ga, Here is what I understand of how your code is working : You have two global variables...

Read more

rbrian2-ga at Google Answers Mark as irrelevant Undo

How can I recursively search-and-replace terms in .xls and .docx files?

I want to recurse through a directory tree and search-and-replace some terms in Excel/Word files.

Answer:

There's a nice freeware Macro to do this with Office. http://www.funduc.com/word_sr.htm.  Word Search...

Read more

Miguel Esquirol at Quora Mark as irrelevant Undo

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.