Find command to return absolute path Find command to return absolute path unix unix

Find command to return absolute path


Try searching from $cwd:

find $cwd -name \*.f


You should use the command realpath to resolve the path :

find . -name "*.f" -exec realpath {} \;


I got it to work using $PWD:

find $PWD -name \*.f