
                              Announcing the

                 
                 OS/2 Command Line Utilities version 2.0
                 

The OS/2 Command Line Utilities, OS2CLU, version 2.0 comprises a suite of
native 32-bit OS/2 commands that provide many useful abilities for the
OS/2 user, from searching archive files and subdirectories for filenames,
through searching text files for patterns, to improved versions of several
of the commands that are supplied with OS/2 itself that allow one to
remove more of the 16-bit vestiges that remain in OS/2 Warp.

They are "command line" utilities because they can all be driven from the
command line, making them suitable for use in command scripts ("batch
files").  However, OS2CLU comprises a mixture of text-mode and
Presentation Manager (i.e. graphical) programs.


FEATURES


 All of the utilities are fully 32-bit native OS/2 programs, written to
  take advantage of many of the features of 32-bit OS/2, such as its
  ability to scan directories efficiently.

 27 new commands that weren't in OS2CLU version 1.0:  ANACLOCK, ARCDIR,
  BCOMP, CALCTZ, COMP, CPUIDG, CPUIDT, DELTREE, DIGCLOCK, DIRSIZE, FIND,
  FINDDUPS, FITSIZE, HELP, PARTLIST, RESETINI, SAYDATE, SETDATE, SORT,
  STRINGS, SUM, TASKLIST, TEE, TEXTCONV, TREE, WINSIGHT, and Y.

 All of the utilities that deal with dates are fully capable of handling
  dates beyond the year 2000, beyond the year 2038 -- which is the "drop
  dead" date for much 32-bit C and C++ code --, and right up to the year
  2107, in fact.

  Ironically, this ability in the TOUCH and XDIR commands has revealed two
  Year 2100 bugs in OS/2's own FAT and HPFS filesystem drivers!

 All of the utilities that deal with files support extended wildcards,
  which are a superset of the standard OS/2 wildcard syntax, similar to
  the wildcards that are available in most UNIX shells.

  For example:

    [c:\]attrib +r *.{zip,arj,rar,lzh,tar.gz}

        and

    [c:\]xdir [a-c]*

        and

    [c:\]dump /s *.{su,mo,tu,we,th,fr,sa}[0-9]

 Several of the utilities are 32-bit replacements for commands supplied
  with OS/2 itself that are *still*, even in OS/2 Warp version 4, 16-bit
  programs or batch files, such as ATTRIB, COMP, FIND, HELP, SORT, and
  TREE.

  Needless to say, many of the uglier "features" of the OS/2-supplied
  commands have been removed.  The OS2CLU SORT command, for example, can
  sort files named on the command line as well as its standard input, and
  can sort files that are greater than 64KiB in size.  The OS2CLU COMP
  command can be used in a batch file with ease.  The OS2CLU FIND command
  supports regular expressions and the ability to be used in a command
  pipeline.  The OS2CLU HELP command can be configured to search different
  on-line books by default and won't destroy a customised command prompt
  if one turns help on and off.  And the OS2CLU TREE command, unlike the
  TREE supplied with OS/2, *actually displays a tree*!

 The command-line interface to all of the utilities is straightforward
  and consistent, and is based on conventions that will be familiar to PC
  users.

  For example, all of the utilities support the /? option for obtaining
  help; and the /S option always means "recurse into subdirectories",
  whatever the command.

 The utilities come with a detailed on-line help document, in the
  standard OS/2 INF file format.

 The DUMP, FIND, GREP, SORT, STRINGS, SUM, TEE, TEXTCONV, WC, WHAT, and Y
  commands can be used as filter commands, for use in a command pipeline,
  acting upon what they receive from their standard input, and producing
  results on their standard output.

 All of the utilities contain international support, displaying the date
  and time in the format appropriate to the current setting given for
  COUNTRY in CONFIG.SYS, and using OS/2's system message file for the text
  of error messages.

 All of the utilities that deal with dates and times can also use the ISO
  8601 standard date and time representation, which uses an unambiguous
  format with a 4-digit year, in order to avoid the inherent ambiguity in
  the "national" date formats for the first 31 years of the 21st century
  (e.g. 01/02/03).

 The SAYDATE and DIGCLOCK utilities fully support the TZ environment
  variable, with the standard POSIX syntax (ISO/IEC 9445-1:1990), allowing
  one to operate in any timezone, in either hemisphere, with daylight
  savings time rules being applied correctly and automatically.

  This also allows different commands to be run in different timezones.
  So one could have, if one wanted, multiple instances of DIGCLOCK running
  on the desktop at the same time, all operating in different timezones
  and with different daylight savings time rules!  A fully configurable
  and extensible "world clock"!

 All utilities are limited only by available virtual memory.

  The DIR command in CMD, the default command processor supplied with
  OS/2, refuses to sort a directory listing containing more than 2073
  files.  The DIR command in 4OS2 fails when the directory size reaches a
  more respectable 20,000 files.

  But the XDIR command in OS2CLU was able, in testing, to sort a directory
  listing of 100,000 files, and even that didn't reach its limit!  (We
  just ran out of enthusiasm to go any higher.  (-:)

 All of the utilities that deal with files fully support long filenames,
  filenames with embedded spaces and multiple full stops, deep directory
  trees, and large directories.

  Indeed, the TREE command was added to OS2CLU version 2.0 because one of
  the popular TREE utilities for OS/2 couldn't handle the C:\OS2\ARCHIVES
  directory tree and would always crash because it was too deep!

 All of the utilities that deal with files fully support the Universal
  Naming Convention, used by LANs and by OS/2 Warp Server 5 ("Aurora").

  For example, one doesn't need to use drive letters to access files on
  LAN fileservers, since one can use UNC filenames instead:

    [c:\]ff /s/e \\server\sharename\*.txt

        and

    [c:\]xdir \\server\sharename\*.{exe,com,cmd}

 All of the text-mode utilities can be used when OS/2 is booted to a
  text-mode command line.


THE INDIVIDUAL UTILITIES


    ANACLOCK    A simple Presentation Manager analogue clock program, with
                full support for timezones and automatic (and effortless)
                switching to and from daylight savings time.

    ARCDIR      Displays the contents of archives.  It performs much the
                same function as the "l" or "-view" option to many
                archiving tools, except that one tool supports multiple
                archive types with one uniform command syntax, can list
                files within the archive matching particular wildcards,
                can sort the listing, and can even produce a single
                (sorted) list of the contents of multiple archive files
                that match a particular wild card, optionally recursing
                into subdirectories to find them.

    ATTRIB      Is an enhanced, 32-bit, replacement for OS/2's 16-bit
                ATTRIB command.  It includes, amongst other enhancements,
                extended wildcards, the ability to include and exclude
                files by attribute, and the ability to modify the
                attributes of subdirectories as well as files.

    BCOMP       A simple binary byte-for-byte comparison of two files.

    CALCTZ      A Presentation Manager utility to help calculate the TZ
                environment variable string for any given timezone and
                daylight savings time rules.  Unlike other TZ calculators,
                this command calculates a TZ string that is in the
                standard POSIX 1003.1 (ISO/IEC 9445-1:1990) format.

    COMP        Is an enhanced, 32-bit, replacement for OS/2's 16-bit COMP
                command.  It doesn't prompt the user, so can be used in
                command scripts, and has a more compact output format so
                that differences are easier to spot.  It can also recurse
                into subdirectories to compare entire directory trees; and
                it supports extended wildcards.

    CONVCASE    Renames filenames to upper, lower, or mixed case, which is
                handy in those situations where other programs insist upon
                creating all-uppercase or all-lowercase filenames.  It
                supports the standard OS2CLU features of recursing into
                subdirectories, including/excluding files by attribute,
                and extended wildcards.

    CPUIDG      A Presentation Manager program to display the information
                obtained about the CPU by the CPUID instruction, including
                the various AMD and Cyrix extensions.

    CPUIDT      A text-mode program to display the information obtained
                about the CPU by the CPUID instruction, including
                the various AMD and Cyrix extensions.

    DELTREE     A REXX wrapper script for the XDEL command that behaves
                much like the DELTREE command in MS-DOS and DR-DOS does.

    DIGCLOCK    A simple Presentation Manager digital clock program, with
                a fully configurable display format and full support for
                timezones and automatic (and effortless) switching to and
                from daylight savings time.

    DIRSIZE     Displays the sizes of directories, much like the GNU `du'
                command does, but with the standard OS2CLU features such
                as enhanced wildcards and the ability to include/exclude
                files by attribute, and with the same simple, consistent,
                PC-style, interface of the other utilities that should be
                familiar to OS/2 users.  It also displays the actual true
                "allocated space" figures when used on large FAT volumes.

    DUMP        Dumps the contents of many types of file, including the
                popular ARC, ARJ, LZH, RAR, ZIP, and ZOO archive file
                formats, PKT files (used for mail transfer on Fidonet),
                executable and DLL files, and Intel object module files
                (OBJ and LIB files).

    FF          A versatile yet simple and fast file finder, that is also
                capable of locating files that are contained within ARC,
                ARJ, LZH, RAR, ZIP, and ZOO archives.  It supports the
                standard OS2CLU features of recursing into subdirectories,
                including/excluding files by attribute, and extended
                wildcards.

    FIND        A REXX wrapper for the GREP command that can replace
                OS/2's 16-bit FIND command, searching for lines in text
                files that contain a given string.  It has the standard
                OS2CLU features of being able to operate recursively on
                files in subdirectories and include/exclude files by
                attribute.  It can also has a "brief" display format, and
                the ability to display counts of the number of lines
                found.

    FINDDUPS    Locates files that are exact duplicates of one another,
                even if they have different names and timestamps.  It
                supports the standard OS2CLU features of recursing into
                subdirectories, including/excluding files by attribute,
                and extended wildcards.

    FITSIZE     Groups files into bundles that don't exceed a given total
                size.  It is useful for burning CD-ROMs, or collecting
                files onto LS-120 super-floppy discs.

    GREP        Finds lines that match a given pattern in text files, much
                like the GNU `egrep' command, but with the standard OS2CLU
                features.  It implements almost the entire POSIX "extended"
                regular expression syntax -- far more than most other grep
                utilities, which usually only provide the POSIX "basic"
                syntax.

    HELP        An enhanced, REXX, replacement for OS/2's HELP command
                (which is a "batch file").  It won't upset customised
                PROMPT strings, and doesn't require the 16-bit HELPMSG
                program in order to function.  It also allows the command
                reference on-line book that is used by default to be
                configured via the CMDREF environment variable.

                It is also useful as a replacement for the HELP command
                that is built in to Take Command for OS/2, JP Software's
                command interpreter for OS/2, which doesn't work too well!

    PARTLIST    Displays the entire, unmodified, contents of the partition
                table on one or all of the available partitionable disc
                devices.  Unlike FDISK /QUERY, the partition table is
                displayed in raw uninterpreted form, with the partition
                sizes displayed in numbers of sectors, rather than being
                converted to KiB.

                The /FIX option will fix some of the more common errors
                caused by disc geometry changes (which can occur when a
                disc is moved from one machine to another or when a
                different make of SCSI host adapter is used, for example).

    PLAYTUNE    Plays a tune through the PC speaker.  No more messing
                around converting a tune to a series of numbers for BEEPs!
                And no more need to run QBASIC in a VDM, which eats CPU
                time, just to play a tune!  The tune is given in a format
                compatible with the "PLAY" statement in the BASIC language
                and with so-called "ANSI music" as used by several BBS and
                offline mail and comms utilities.

    RESETINI    Removes the read-only attribute from the user and system
                INI files, and then instructs Workplace Shell to reload
                them.  It is useful as an aid to recovery if an incomplete
                shutdown has left the INI files read-only by accident.  It
                also has the side-effect of closing and re-opening the WPS
                Desktop folder without restarting the system.

    SAYDATE     Displays the current, or any given, date and time, with a
                fully configurable display format and full support for
                timezones and automatic (and effortless) switching to and
                from daylight savings time.  The DATE and TIME commands
                cannot be used in command scripts to display the date and
                time without some ugliness, because they prompt for input.
                This command can be!

    SETDATE     Allows the hardware real-time clock to be set from a date
                or time expressed as local time in any arbitrary timezone.
                It also sets the date and time simultaneously, avoiding
                race conditions in command scripts when used near
                midnight.

    SORT        An enhanced, 32-bit, replacement for OS/2's 16-bit SORT
                command.  It can sort up to the size of available virtual
                memory and has no 64KiB limit, can also sort files named
                on the command line, and supports extended wildcards and
                the other standard OS2CLU features.  It's also quicker!

    STRINGS     Displays embedded strings of characters in files, which is
                particularly useful for searching binary files for text
                strings.  It supports the standard OS2CLU features of
                recursing into subdirectories, including and excluding
                files by attribute, and extended wildcards.

    SUM         Calculates CRC-16, CRC-32, two different types of checksum
                (UNIX BSD and System V), and the MD5 fingerprint for
                files.  It supports the standard OS2CLU features of
                recursing into subdirectories, including/excluding files
                by attribute, and extended wildcards.

    TASKLIST    Lists the contents of the PM Window List in text form,
                suitable for parsing, or use from text-mode programs.

    TEE         A "T-shaped" pipe fitting, that sends its standard input
                to its standard output, writing or appending a copy of it
                to one or more files named as its arguments.

    TEXTCONV    Converts text files from one code page and newline
                convention to another.  It makes it easy to interchange
                text files between OS/2 and Usenet, the Macintosh, and
                UNIX/linux, or between OS/2 users in different countries
                with different code pages.  It supports code page 1004 in
                particular, in order that one can convert text files from
                other code pages to ISO 8859 Latin-1.

    TOUCH       Changes the last modification, last access, or creation
                timestamp of files and directories.  It can override
                read-only protection, and it supports the standard OS2CLU
                features of being able to recurse into subdirectories and
                include/exclude files by attribute, and extended
                wildcards.

    TREE        An enhanced 32-bit replacement for OS/2's 16-bit TREE
                command.  Unlike the latter, this command actually
                displays a tree!  It can also display size information,
                and be limited to using only ASCII characters instead of
                character graphics.  It also supports extended wildcards.

    WC          Counts the number of lines, words, letters, characters, and
                bytes in files.  It supports the standard OS2CLU features
                of recursing into subdirectories, including/excluding
                files by attribute, and extended wildcards.

    WHAT        Finds any embedded SCCS identifying strings in files.

    WHICH       Finds out what would be executed if a given command name
                were used.  It knows about commands that are built into
                the 16-bit CMD, 32-bit CMD, and 4OS2 command interpreters,
                and obeys the PATHEXT environment variable.

    XDEL        Deletes files.  It supports the standard OS2CLU features
                of recursing into subdirectories, including/excluding
                files by attribute, and extended wildcards.  It can also
                remove empty subdirectories, override read-only
                protection, and wipe the contents of files before deleting
                them in order to prevent them from being successfully
                undeleted.

    XDIR        Displays directory listings.  It supports the standard
                OS2CLU features of recursing into subdirectories,
                including/excluding files by attribute, and extended
                wildcards.  It can also sort files from multiple
                subdirectories into one big list, allowing one to see all
                files in multiple subdirectories sorted together by size
                for example, and has no arbitrary limits on the number of
                files that it can process.

    WINSIGHT    Displays the hierarchy of Presentation Manager windows as
                a tree structure, showing window handles, parents, owners,
                process and thread IDs, styles, IDs, types, and text.

    Y           A "Y-shaped" pipe fitting, that concatenates its standard
                input with one or more files and sends the result to its
                standard output.  It can also be used as a more powerful
                replacement for the TYPE command built into IBM's 16-bit
                CMD command interpreter, since it supports the standard
                OS2CLU features of extended wildcards, inclusion and
                exclusion of files by attributes, and recursion into
                subdirectories.


WHERE TO FIND OS2CLU


The OS2CLU02 distribution archive (available as both OS2CLU02.ZIP and
OS2CLU02.RAR, to cater to different tastes) can be File Requested by
anyone at any time of the day from the following Fidonet nodes:

    1:109/921.0        TSR BBS in the U.S.
    2:257/609.0        Air Applewood BBS in the U.K.

It is also available on any Fidonet site around the world that carries the
Fidonet file distribution echo that is hosted by Fernwood BBS in the U.S..

It can also be found on the Hobbes FTP site run by New Mexico State
University in the U.S., and on the LEO FTP site in Germany.


ABOUT THE AUTHOR


Jonathan de Boyne Pollard is a professional computer programmer who
specialises in consultancy and development of operating systems and tools,
and who writes things like the OS/2 Command Line Utilities in his spare
time.  Other previous projects of his include such things as a complete
replacement for the runtime library for Borland C++ 3.1, allowing it to be
used to develop 16-bit OS/2 programs.  He also maintained the Highly
Unofficial Fidonet OS2PROG C++ Compiler Pros and Cons List for several
years, and is the moderator of the international OS2DOS Fidonet echo.  He
is currently working on a project which he believes will astonish 32-bit
OS/2 users.

The best, most reliable, and quickest, way to contact him is on Fidonet,
by sending netmail addressed to either

	Jonathan de Boyne Pollard, FIDONET#2:257/609.3

		or

	Jonathan de Boyne Pollard, FIDONET#1:109/921.70,

which are his two permanent "point" addresses.  Alternatively, you can
post a message in the Fidonet OS2PROG or OS2 echoes.

Another way to contact him is via the Internet mailbox
<J.deBoynePollard@tesco.net>.  Since this is a mailbox hosted by one of
the U.K.'s "free ISPs", and subject to the standard "use every 90 days or
it will be deleted" conditions that such ISPs impose, this latter address
is not guaranteed to be reliable, or even valid, in years to come however.
