View Full Version : Where can I find realpath

2nd January 2007, 08:44 AM
I need 'realpath' in order to make a script to work.
I couldn't find any package that would contain it.
In some ALT Linux versions it resides in 'coreutils' package, however in FC there is no such binary.

Where can I find it?

7th February 2007, 10:34 PM
Bump! I'm looking for an answer to this as well. I've got Fedora Core 5 installed on a server and was looking for the realpath binary usually found in /usr/bin/, but have been unable to find any information regarding it.

Any help is greatly appreciated!!

7th February 2007, 11:08 PM
can you give more info of realpath pls? it does not exist by default installation in FCs boxes that I have.

have you tried

#yum search realpath

7th February 2007, 11:21 PM
realpath resolves symlinks back to their real paths. I ended up just compiling this as the binary wrapper and placing it in /usr/bin:

#include <stdio.h>
#include <limits.h>
#include <stdlib.h>

int main(int argc, char **argv)
int i;

for (i = 1; i < argc; i++) {
char rp[PATH_MAX];

if (!realpath(argv[i], rp)) {
return 1;
} else {
printf("%s\n", rp);

return 0;

Hopefully that helps somebody, because trying to find it was a major pain.