How do I find the relative path in Linux?

Nguyên Lê

New member
How do I find the relative path in Linux?
Answer
To obtain the full path of a file, we use the
readlink command. readlink prints the absolute path of a symbolic link, but as a side-effect, it also prints the absolute path for a relative path. In the case of the first command, readlink resolves the relative path of foo/ to the absolute path of /home/example/foo/.
 

Tìm kiếm

Back
Top