how to find the path of a file when it is passed as ....filename(parameter) to script

hi unix guru's..................:confused:
question is posted in the #3 permalink shown below.

i) Read the Simple rules of the UNIX.COM forums: regarding forbidden duplicate posts like yours: http://www.unix.com/unix-dummies-questions-answers/74582-how-find-complete-path-file-unix.html\#post302218015

ii) Use proper spelling. This makes fast reading a lot easier esp. for experienced board users.

iii) If you want to write a script start reading e.g. the "Advanced Bash Scripting Guide" (av. online) which will help you getting started. If you have specific questions somebody here will answer you, but your question is somewhat inspecific one does not really know what you want.

hi unix guru's..................( the question is here)

I was asking if there is any command or logic which will give the complete path of file situated in any of the directories in database.

please donot say its "pwd" or "find command" because "pwd" gives only the current working directory and "find" command is not suitable as my database is very huge and it will take days for "find" to configure out the direcory.

the path of the file that i wanted to know will be present either in the parent directory or parent's parent directory so on............

i think i made my point clear.......

thanks in advance...................

You need to write a script and the pwd command can be of use.

If you get the current working directory, you can recursively traverse the path and check for the existence of your file.

If pwd returns a/b/c/d/e/ then you check for the existence of a/b/c/d/file, a/b/c/file, etc until you find it.