realpath

realpath - expand symbolic links and drive letters 

Command


SYNOPSIS

realpath -dnmwu path ...


DESCRIPTION

realpath realpath calls the NuTCRACKER Platform realpath() to expand symbolic links. It then converts the output into Win32, PTC MKS Toolkit or NuTCRACKER Platform format for display. realpath can also map UNC (Unniversal Naming Convension) paths to and from mapped drive letter.

Options

-d 

If the path is in UNC form and there is a drive letter mapped to that UNC then the result will be displayed in drive letter form. If two drive letters are mapped to the same UNC share than the results are not deterministic.

-u 

For every path with a drive letter, an attempt is made to convert it to UNC by decoding the mount point.

-n 

Output is in NuTCRACKER Platform /c=/ //machine/share/ format.

-w 

Output is in Win32 c:\ or \\machine\share\ format.

-m 

Output is in PTC MKS Toolkit forward slash c:/ or //machine/share/ format.

-? 

Prints out realpath help.

path is a series of input paths to convert


EXAMPLES

Convert Win32 path C:\dir1\dir2\slink\file to the real path and output in MKS Toolkit format.

$ realpath -m C:\dir1\dir2\slink\file 
c:/dir1/dir2/dir2/file
$

Assuming N: is mapped to \\hera.mks.com\files, show the full UNC path for N:/my/files/file.txt in Win32 backslash format

$ realpath -w -u N:/my/files/file
\\hera.mks.com\files\my\files\file.txt
$

DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

1 

Failure due to any of the following:

— unknown command line option
— failure in realpath()


PORTABILITY

Linux. All UNIX systems. Windows Server 2012. Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019.


AVAILABILITY

PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Commands:
tkpath

Functions:
realpath()


PTC MKS Toolkit 10.3 Documentation Build 39.