diff --git a/winsup/utils/utils.sgml b/winsup/utils/utils.sgml
index 5b705115a..daaba9ac4 100644
--- a/winsup/utils/utils.sgml
+++ b/winsup/utils/utils.sgml
@@ -3,7 +3,10 @@
Cygwin comes with a number of command-line utilities that are
used to manage the UNIX emulation portion of the Cygwin environment.
While many of these reflect their UNIX counterparts, each was written
-specifically for Cygwin.
+specifically for Cygwin. You may use the long or short option names
+interchangeably; for example, --help and
+-h function identically.
+
cygcheck
@@ -22,29 +25,20 @@ You must at least give either -s or -k or a program name
The cygcheck program is a diagnostic utility
that examines your system and reports the information that is
significant to the proper operation of Cygwin programs. It can give
-information about a specific program (or program) you are trying to
+information about specific programs or libraries you are trying to
run, general system information, or both. If you list one or more
programs on the command line, it will diagnose the runtime environment
-of that program or programs. If you specify the -s
+of that program or programs, providing the names of DLL files on which
+the program depends. If you specify the -s
option, it will give general system information. If you specify
-s and list one or more programs on the command line,
it reports on both.
-The -c option causes the "program" arguments
-to be interpreted as package names. cygcheck will
-report the current version of the package that you specify. With no
-arguments, cygcheck will report on all packages.
-
-The cygcheck program should be used to send
-information about your system to Cygnus for troubleshooting (if your
-support representative requests it). When asked to run this command,
-include all the options plus any commands you are having trouble with,
-and save the output so that you can mail it to Cygnus, like
-this:
-
-
-C:\Cygnus> cygcheck -s -v -r -h > tocygnus.txt
-
+The -h option prints additional helpful
+messages in the report, at the beginning of each section. It also
+adds table column headings. While this is useful information, it also
+adds some to the size of the report, so if you want a compact report
+or if you know what everything is already, just leave this out.
The -v option causes the output to be more
verbose. What this means is that additional information will be
@@ -55,67 +49,75 @@ directories on the PATH.
The -r option causes
cygcheck to search your registry for information
-that is relevent to Cygnus programs. These registry entries are the
-ones that have "Cygnus" in the name. If you are paranoid about
+that is relevent to Cygwin programs. These registry entries are the
+ones that have "Cygwin" in the name. If you are paranoid about
privacy, you may remove information from this report, but please keep
-in mind that doing so makes it harder for Cygnus to diagnose your
-problems.
+in mind that doing so makes it harder to diagnose your problems.
-The -h option prints additional helpful
-messages in the report, at the beginning of each section. It also
-adds table column headings. While this is useful information, it also
-adds some to the size of the report, so if you want a compact report
-or if you know what everything is already, just leave this out.
+The -c option causes the arguments
+to be interpreted as package names. cygcheck will
+report the current version of the package that you specify, or with no
+arguments, on all packages.
+
+The cygcheck program should be used to send
+information about your system for troubleshooting when requested.
+When asked to run this command save the output so that you can email it,
+for example:
+
+
+C:\cygwin> cygcheck -s -v -r -h > cygcheck_output.txt
+
cygpath
-Usage: cygpath.exe (-u|-w|-t TYPE) [-c HANDLE] [-f FILE] [options] NAME
- cygpath.exe [-ADHPSW]
-Output type options (required):
- -u|--unix print Unix form of NAME (default)
- -w|--windows print Windows form of NAME
- -t|--type print Windows form of NAME with TYPE one of
- dos drive letter with backslashes (C:\WINNT)
- mixed drive letter with regular slashes (C:/WINNT)
+Usage: cygpath (-d|-m|-u|-w|-t TYPE) [-c HANDLE] [-f FILE] [options] NAME
+ cygpath [-ADHPSW]
+Output type options:
+ -d, --dos print DOS (short) form of NAME (C:\PROGRA~1\)
+ -m, --mixed like --windows, but with regular slashes (C:/WINNT)
+ -u, --unix (default) print Unix form of NAME (/cygdrive/c/winnt)
+ -w, --windows print Windows form of NAME (C:\WINNT)
+ -t, --type TYPE print TYPE form: 'dos', 'mixed', 'unix', or 'windows'
Path conversion options:
- -a|--absolute output absolute path
- -c|--close HANDLE close HANDLE (for use in captured process)
- -f|--file FILE read FILE for input; use - to read from STDIN
- -i|--ignore ignore missing argument
- -l|--long-name print Windows long form of NAME (with -w only)
- -p|--path NAME is a PATH list (i.e., '/bin:/usr/bin')
- -s|--short-name print Windows short form of NAME (with -w only)
-System information output:
- -A|--allusers use `All Users' instead of current user for -D, -P
- -D|--desktop output `Desktop' directory and exit
- -H|--homeroot output `Profiles' directory (home root) and exit
- -P|--smprograms output Start Menu `Programs' directory and exit
- -S|--sysdir output system directory and exit
- -W|--windir output `Windows' directory and exit
-Other options:
- -h|--help output usage information and exit
- -v|--version output version information and exit
+ -a, --absolute output absolute path
+ -l, --long-name print Windows long form of NAME (with -w, -m only)
+ -p, --path NAME is a PATH list (i.e., '/bin:/usr/bin')
+ -s, --short-name print DOS (short) form of NAME (with -w, -m only)
+System information:
+ -A, --allusers use `All Users' instead of current user for -D, -P
+ -D, --desktop output `Desktop' directory and exit
+ -H, --homeroot output `Profiles' directory (home root) and exit
+ -P, --smprograms output Start Menu `Programs' directory and exit
+ -S, --sysdir output system directory and exit
+ -W, --windir output `Windows' directory and exit
The cygpath program is a utility that
converts Windows native filenames to Cygwin POSIX-style pathnames and
-back. It can be used when a Cygwin program needs to pass a file name
-to a native Windows program, or expects to get a file name from a
-native Windows program. You may use the long or short option names
-interchangeably, even though only the short ones are described
-here.
+vice versa. It can be used when a Cygwin program needs to pass a file
+name to a native Windows program, or expects to get a file name from a
+native Windows program. Alternatively, cygpath can
+output information about the location of important system directories
+in either format.
+
The -u and -w options
-indicate whether you want a conversion from Windows to UNIX (POSIX)
-format (-u) or a conversion from UNIX (POSIX) to
-Windows format (-w). You must give exactly
-one of these. To give neither or both is an error. Use the
--l or -s option in combination
-with the -w option to convert to Windows long or
-short form.
+indicate whether you want a conversion to UNIX (POSIX) format
+(-u) or to Windows format (-w).
+Use the -d to get DOS-style (8.3) file and path names.
+The -m option will output Windows-style format
+but with forward slashes instead of backslashes. This option is
+especially useful in shell scripts, which use backslashes as an escape
+character.
+
+ In combination with the -w option, you can use
+the -l and -s options to use normal
+(long) or DOS-style (short) form. The -d option is
+identical to -w and -s together.
+
Caveat: The -l option does not work if the
check_case parameter of CYGWIN is set to strict,
@@ -131,16 +133,22 @@ formats.
The -i option supresses the print out of the
usage message if no filename argument was given. It can be used in
-make file rules converting variables to a proper format that may be
-omitted.
+make file rules converting variables that may be omitted
+to a proper format. Note that cygpath output may
+contain spaces (C:\Program Files) so should be enclosed in quotes.
+
+
Example cygpath usage
#!/bin/sh
-for i in `echo *.exe | sed 's/\.exe/.cc/'`
-do
- notepad "`cygpath -w $i`"
-done
+if [ "${1}" = "" ];
+ then
+ XPATH=".";
+ else
+ XPATH="$(cygpath -w "${1}")";
+ fi
+ explorer $XPATH &
@@ -149,14 +157,15 @@ done
-S, and -W output directories used
by Windows that are not the same on all systems, for example
-S might output C:\WINNT\SYSTEM32 or C:\WINDOWS\SYSTEM.
-The -A option forces use of the "All Users" directories
-instead of the current user for the -D and
--P options. The -H shows the Windows'
-profiles directory that can be used as root of home.
+The -H shows the Windows profiles directory that can
+be used as root of home. The -A option forces use of
+the "All Users" directories instead of the current user for the
+-D and -P options.
On Win9x systems with only a single user, -A has no
effect; -D and -AD would have the
-same output.
-The -ws options can be combined with the capital options.
+same output. By default the output is in UNIX (POSIX) format;
+use the -w or -d options to get
+other formats.