Shell Tools
Developer Release Notes
BeOS Release 4


db

New and improved db commands:


disktest

New disktest tool performs disk diagnostics by performing a series of reads and writes to a file or to a raw device. & It runs forever (until you Control+c), spitting out error messages as it goes. Type disktest for instructions.

WARNING: The file argument (-file=<filename>) is the read/write file that the program creates when it's running; you don't use this argument to pass in the name of the disk you want to diagnose (the disk is implied by the filename).

If you tell disktest to run on a raw disk, it will destroy the disk's data.


dumppt

dumppt is a partition table examination tool.  It wants to be fed a device file, and spits out statistics about the partitions it finds there:

$ dumppt /dev/disk/ide/ata/0/master/0/raw
Partition information for /dev/disk/ide/ata/0/master/0/raw:
LBA geometry: 803f5e sectors, 200 bytes/sector
BIOS geometry: 20a cylinders, 3f sectors/track, ff heads, 200 bytes/sector
Partition         |  Starting     Ending | Starting   Ending   Number
  Sector  # A  ID |   C  H  S    C  H  S |   Sector   Sector  Sectors
==================+======================+===========================
        0 0 80 eb |   0  1  1  105 96 3f |       3f   401fed   401faf
        0 1 80 eb | 105 97 3f  20b 2c 3e |   40202c   803f5c   401f31
*** Warning: Partition doesn't start on a head boundary. ***
*** Warning: Partition doesn't end on cylinder boundary. ***


irsoter

New iroster command dumps the Input Server's roster of devices:

$ iroster
      name               type         state
-----------------------------------------------
     AT Keyboard  B_KEYBOARD_DEVICE  running
      PS/2 Mouse  B_POINTING_DEVICE  running


mail_parser

The new mail_parser program adds the appropriate attributes and file types so "message/rfc822" files (attachments, typically) can be read by BeMail.  The program runs automatically when you click on an rfc822 attachment in a BeMail message.  You can also run it from the command line:

$ mail_parser file1 file2 file3 ...

Note that the program doesn't do any validity testing -- it converts the files (adds attributes and changes file types) even if it doesn't make much sense.


profile

New profile program is a simple profiling utility that prints a list of the top ten most consumptive functions per thread in an application.  The list is printed when the app is quit.  Type profile for more info.


translate

New translate program is a command-line interface to the Translation Kit:

$ translate infile outfile format

format designates the format that you want to convert to.  The format designation is either a MIME type ("text/plain", "image/x-portable-pixmap") or a four-byte code ('TEXT', 'PPM ').  translate --list prints a list of recognized formats for both input and output (summarized below):

FormatInputOutput
StyledEdit
  • "text/x-vnd.Be-stxt" 'STXT'
  • "text/plain" 'TEXT'
  • "text/x-vnd.Be-stxt" 'STXT'
  • "text/plain" 'TEXT'
  • TIFF
  • "image/x-tiff" 'TIFF'
  • "image/x-be-bitmap" 'bits'
  • "image/x-be-bitmap" 'bits'
  • Targa
  • "image/x-targa" 'TGA '
  • "image/x-be-bitmap" 'bits'
  • "image/x-targa" 'TGA '
  • "image/x-be-bitmap" 'bits'
  • PPM
  • "image/x-portable-pixmap" 'PPM '
  • "image/x-be-bitmap" 'bits'
  • "image/x-portable-pixmap" 'PPM '
  • "image/x-be-bitmap" 'bits'
  • BMP
  • "image/x-bmp" 'BMP '
  • "image/x-be-bitmap" 'bits'
  • "image/x-bmp" 'BMP '
  • "image/x-be-bitmap" 'bits'

  • xres

    New xres resource manipulation program reads and writes resources in big-endian and little-endian formats, and can convert resources between the two formats.  This means you can take your PPC resources and copy them into your x86 application (and vice versa) -- even if the target file already exists.

    For example, let's say you've got an x86 executable and a PPC resource file.  Here's how you pour the resources into the executable:

    $ xres -o myApp.x86 ppcRes.rsrc

    Used as shown here, myApp.x86's resources are first stripped and then the new ones (from ppcRes.rsrc) are added.  To maintain myApp.x86's existing resources, list the file as one of the inputs:

    $ xres -o myApp.x86 ppcRes.rsrc myApp.x86

    To add a resource from the command line, you do the following:

    $ xres -o myResFile.rsrc -a CSTR:0:MyDog -s "Fido" myResFile.rsrc

    -a means "add"; the next triplet is the type:id:name of the resource that you're adding; -s tells the program to take the resource value from the following string.  You can also tell it to take the value from a file.

    Type xres --help for more documentation.

    xres replaces addres, copyres, listres, stripres, rescvt_intel, and rescvt_ppc.


    Miscellaneous






    BeOS Release 4




    Copyright © 1998 Be, Inc.  All rights reserved.