realpath needs to be included in all version of Mint

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
lsatenstein

realpath needs to be included in all version of Mint

Post by lsatenstein »

Install with apt-get.

Most useful in shell scripting to resolve paths with ../ That is relative paths to real paths from /
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29615
Joined: Wed Jul 06, 2011 3:58 am

Re: realpath needs to be included in all version of Mint

Post by xenopeek »

That similar to what readlink -f does. For example to get the canonical path of parent directory:

Code: Select all

readlink -f ../
readlink is part of coreutils, so present on all GNU/Linux distros.
Image
Locked

Return to “Scripts & Bash”