How to retrieve absolute path given relative

absolute, bash, path, shell

Solution

use:

find "$(pwd)"/ -type f

to get all files or

echo "$(pwd)/$line"

to display full path (if relative path matters to)

Problem

Is there a command to retrieve the absolute path given a relative path? For example I want $line to contain the absolute path of each file in dir `./etc/` ``` find ./ -type f | while read line; do echo $line done ```

Original source

Related problems