How can I get the full path of a relative directory in Bash

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

   This question already has an answer here:
    * /questions/4045253/converting-relative-path-into-absolute-path /questions/4045253/converting-relative-path-into-absolute-path 6 answers

Answers

Changing to the directory seems to be a straightforward approach:

echo "$(cd "${directory}"; pwd)"

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/30167350/how-can-i-get-the-full-path-of-a-relative-directory-in-bash

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils