Index of Section 1 Manual Pages
| Interix / SUA | winpath2unix.1 | Interix / SUA |
WINPATH2UNIX(1) System General Commands Manual WINPATH2UNIX(1)
NAME
winpath2unix - convert pathnames from Windows syntax to Unix syntax
SYNOPSIS
winpath2unix [-kKmn] [-f file] path [...]
DESCRIPTION
The winpath2unix utility converts a path in Windows syntax to a path in
Unix 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
canonicalized so that the resulting paths have all elements in the cor-
rect case since Interix uses case-sensitive pathnames (unlike Windows).
You can specify multiple paths to the command line. Each separate, con-
verted path will be written on its own line to standard output.
The options are as follows:
-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 will not be printed.
The default is for a trailing slash not to be printed. With this
option a stat(2) call may be made to check whether the final com-
ponent is a file or directory. If the stat call fails then the
trailing flash will not be added.
-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. This option will not make a stat(2) call.
-m This indicates that path may contain semi-colons (;) to separate
multiple paths as might be found in some environment variables
such as PATH. The resulting output is a set of colon (:) sepa-
rated paths.
-n Use less strict pathname interpretation (i.e. no case conver-
sion). This option should be avoided for most cases because
Interix works with case-sensitive filesystems the vast majority
of times.
SAMPLES
Convert a simple path:
% winpath2unix C:\\
/dev/fs/C
Convert an environment variable with path (quote in case of spaces in
path):
% echo "$COMSPEC"
C:\WINNT\system32\cmd.exe
% winpath2unix $COMSPEC
/dev/fs/C/WINNT/system32/CMD.EXE
DIAGNOSTICS
The winpath2unix utility shall exit with one of the following values: 0
when successful and >0 when not successful.
ENVIRONMENT
No environment variables are used.
NOTES
By default, and for backward compatability with another version of
winpath2unix, each path is an isolated path.
As a special case the path nul is convert to the Unix equivalent of
/dev/null.
SEE ALSO
stat(2), unixpath2win(1), unixpath2win(2), winpath2unix(1),
winpath2unix(2)
Interix July 12, 2007 Interix