Index of Section 1 Manual Pages
| Interix / SUA | unixpath2win.1 | Interix / SUA |
UNIXPATH2WIN(1) System General Commands Manual UNIXPATH2WIN(1)
NAME
unixpath2win - convert pathnames from Unix syntax to Windows syntax
SYNOPSIS
unixpath2win [-ckKmrs] [-f file] path [paths...]
DESCRIPTION
The unixpath2win utility converts a path in Unix syntax to a path in Win-
dows syntax. The converted result is written to standard output. The path
does not need to be an actual existing file or directory. Paths will be
resolved for all symbolic links because Windows programs will not under-
stand symbolic links. However, this default behavior can be overridden
with the options.
When paths are provided as multiple arguments then there will be one line
of output per argument.
The options are as follows:
-c Check that the path or paths to be translated actually exist. If
a component of path does not exist then it is an error. The
default is to check as few components as possible to create a
Windows path.
-f file
Accept paths from a file after any paths provided as arguments
are dealt with. If the filename is '-' then the stdin will be
read for paths.
-k When a path is provided with a trailing slash the trailing slash
will be preserved in the output when the final component of path
is a directory. Otherwise the trailing slash not be printed. The
default is for a trailing slash not to be printed.
-K This is similar to the -k option but the trailing slash is pre-
served in the output regardless of the type of the final compo-
nent.
-m This indicates that path may contain colons (:) to separate mul-
tiple paths as might be found in some environment variables such
as PATH. The resulting output is a set of semi-colon (;) sepa-
rated paths.
-r When a relative path is provided then print the path name or
names in context to the relative current directory unixpath2win
is run. If path can be resolved but it cannot be printed as a
relative path then it will be output as an absolute path. Other-
wise it will be an error. Note that symbolic links can be a
source of difficulty when trying to have a path be printed rela-
tively.
-s When path contains a symbolic link do not follow the symbolic
link.
As a special case the path /dev/null is convert to the Windows equivalent
of nul.
SAMPLES
Convert a simple path:
% unixpath2win /bin
C:\SUA\bin
Convert an environment variable with paths:
% echo $LD_LIBRARY_PATH
/usr/lib:/usr/local/lib
% unixpath2win -m $LD_LIBRARY_PATH
C:\SUA\usr\lib;C:\SUA\usr\local\lib
DIAGNOSTICS
The unixpath2win utility shall exit with one of the following values: 0
when successful and >0 when not successful.
ENVIRONMENT
No environment variables are used.
NOTES
For backward compatability with another version of unixpath2win the
default action is that each path is an isolated path.
SEE ALSO
unixpath2win(2), winpath2unix(1), winpath2unix(2)
Interix August 29, 2007 Interix