Command-Line – Get Absolute Path of Files Using ‘Find’ Command

command linefind

Is there a way to get absolute path of a file that is being searched?

For example:

find .. -name "filename"

It gives me results like ../filename but I want the full path.

What I need is to find in the parent directory and its children, for a specific file, that I will use in another script later.


Best Answer

Try something like:

find "$(cd ..; pwd)" -name "filename"