Absolute Paths

When logged in to a CSCF computer, I noticed this great little utility: absolute

It converts a relative pathname to an absolute one. I didn't have access to the source and I couldn't find any comperable utility. However, there is realpath system call that does the work. A few lines of C later, and I have a nice little wrapper.

It requires GNU libc (since it makes pleasant assumptions about having certain extensions. It will read the relative path from either the command line or standard input.

Absolute C Source Follow Link

It should compile with gcc -o absolute absolute.c

Thu, 7 May 2009 16:25:53 -0400 View History