How does searching a file system in Solaris work?

Jumpem

Lifer
Sep 21, 2000
10,757
3
81
I have a C++ program that includes some .h files I am not familiar with. How do I perform a search that will look in the folders preceding the current one and find file X if it exists?

thanks!

Edit: i figured out how to do it using "find". But it literally took a few minutes to give me a result. Is there anything that does it quicker?
 

TGS

Golden Member
May 3, 2005
1,849
0
0
when you run the find, make sure you are just searching the directory you need the results from. What is the string you are running?
 

Jumpem

Lifer
Sep 21, 2000
10,757
3
81
Originally posted by: TGS
when you run the find, make sure you are just searching the directory you need the results from. What is the string you are running?

I am using "find /home/A/B/C/D -name filename.h". "/home/A/B/C/D" is the base directory that all the files have in common.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
The string looks fine. Getting it to search up the tree isn't possible, as far as I'm aware. I have to admit though, I haven't read the MANPAGE in a long time. ;)
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Edit: i figured out how to do it using "find". But it literally took a few minutes to give me a result. Is there anything that does it quicker?

Successive finds will be quicker as everything will be cached.