home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1999 November / PCOnline_11_1999.iso / filesbbs / OS2 / DFSEE305.ZIP / DFS.DOC < prev    next >
Text File  |  1999-08-30  |  134KB  |  2,843 lines

  1.  
  2.    Display File Systems; version 3.05 30-08-99-99  (c) 1994-1999; Jan van Wijk
  3.  ═════════════════════════[ www.fsys.demon.nl ]══════════════════════════════
  4.  
  5. CONTENTS (pagenumbers based on 80 line pages)
  6. ---------------------------------------------
  7.  Introduction, purpose of the program                                    1
  8.  Status of the program and change history                                2
  9.  Terminology used                                                        3
  10.  Summary of commands                                                     5
  11.  Command reference, general DFS commands                                 7
  12.  Command reference, FDISK specific commands                             24
  13.  Command reference, FAT   specific commands                             31
  14.  Command reference, NTFS  specific commands                             33
  15.  Command reference, HPFS  specific commands                             35
  16.  Diagram of an example HPFS structure                                   42
  17.  Examples of DFS usage                                                  43
  18.  Known limitations                                                      47
  19.  Considered improvements                                                48
  20.  
  21. HINT: When using DFSee to create a logfile, DO NOT USE ">" REDIRECTION, use
  22.       the DFSee "log filename" command instead. This will prevent littering
  23.       the logfile with ANSI control-codes (See DFSQUICK.BAT for an example)
  24.  
  25.       When browsing an LVM (Warp server for e-bussines) system, set the
  26.       screen-width to over 100 characters when possible. This will allow
  27.       complete display of the volume + partition-names in the 'part' table
  28.  
  29. Introduction, purpose of the program
  30. ------------------------------------
  31.  
  32.  The DFSee program is a disk and filesystem browser with an emphasis on the
  33.  HPFS and FAT filesystems, disk partitioning and some NTFS.
  34.  It will support different file-systems sometime in the future.
  35.  
  36.  The program has been built while studying the HPFS filesystem.
  37.  It's main purpose is getting to understand the file-system as it resides
  38.  on the disk itself, in the data-structures laid down in disk-sectors.
  39.  Over time, additional logic was implemented to allow analysis of all
  40.  sorts of disk problems on HPFS volumes.
  41.  The tool has been used a few times over the past years to analyse some
  42.  real-life disk problems in a large systems-integration project.
  43.  Also it has proven very usefull in teaching others the internals of HPFS
  44.  Most of my knowledge of the HPFS file-system is based on the excellent
  45.  lectures "HPFS Internals" at the 1994, 95 and 96 ColoradOS/2 conferences by
  46.  Doug Azzarito and on peeking arround on a lot of HPFS volumes using DFS.
  47.  
  48.  Further improvements will probably be in more advanced recovery commands
  49.  and other filesystems like NTFS and EXT2 and in porting to other platforms.
  50.  
  51.  The standard distribution, DFSEExxx.ZIP contains executables for OS/2 Warp
  52.  (32-bit), 16-bit DOS and Windows-NT.
  53.  
  54.  
  55. Availability
  56. ------------
  57.  
  58.  1) My Homepage:  http://www.fsys.demon.nl       always the most recent DFSee!
  59.  2) USA mirror:   http://www.infobear.com        search for "DFSEE"
  60.  3) HOBBES (WWW): http://hobbes.nmsu.edu         search for "DFSEE"
  61.  4) Several other WEB and FTP sites, bulletin boards (often outdated!)
  62.  
  63. Status of the program
  64. ---------------------
  65.  
  66.  This version of the program is free for anyone to use, it was written
  67.  in my own time using my own equipment. However, I do appreciate feedback.
  68.  Further development depends on my own needs and feedback I receive from
  69.  other users, al work has to be done on spare time...
  70.  
  71.  Suggestions and other comments regarding DFSee and filesystems are welcome.
  72.  
  73.  If you have a disk-related problem, feel free to contact me, I cannot
  74.  guarantee prompt or continuous attention bu I will do the best I can ...
  75.  
  76.  You can reach me through the Internet: dfsee@fsys.demon.nl
  77.                                                                               
  78. Change History
  79. --------------
  80. 1.00  27-11-94     DHPFS initial version, hex dump super+spare blocks
  81. 1.39  20-07-95     32-bit port; Sector Lookup table; bug-fixes
  82. 1.52  13-09-95     new '/' cmd shortcut; First released version!     <== BBS
  83. 1.62  13-10-95     RUN cmd runs REXX; Added Free-space and inconsistency report
  84. 1.64  16-10-95     Cleanup for delivery on ColoradOS/2 CDROM
  85. 1.70  20-12-96     Update ColoradOS/2, DASD limits; REQUESTABLE (OS2FISYS forum)
  86. 1.87  19-01-97     Fixed MBR/EBR walk; multiple cmds using #, BM-labels in part
  87. 1.91  21-01-97     New fixroot, fixcp and saveto commands for recovery actions
  88. 2.00  03-02-97     Removable media (NEWDASD); (part) D: cmd; invisible primary
  89. 2.06  16-03-97     Updated ACL support on HPFS386; Scan badsectors
  90. 2.12  06-04-97     Added logical volume support using "DASD" type access
  91. 2.20  19-05-97     Win NT beta version; Search speedup; prio command; cleanup
  92. 2.24  10-06-97     Added Img and Sim commands; date/time on dirblocks;
  93. 2.25  15-06-97     Added Wrim command; Improved lock implementation (nested)
  94. 2.28  21-06-97     Added autobase command for HPFS (find HPFS partition start)
  95. 2.30  06-07-97     Improved 'find' syntax and functionality; Undelete support
  96. 2.32  20-07-97     Reporting & ALBLK fixes to saveto; new "ca" cmd CheckAlloc
  97. 2.35  18-08-97     Path info in Fnode display and "list" output; MEM cmd
  98. 2.37  24-08-97     Path display on find Fnode; Wildcard select on list +f
  99. 2.40  06-09-97     import/export of LSN lists; getbs/fixbs badsector mgmt
  100. 2.41  12-10-97     Multiple file UNDELETE with delfind/delshow/delsave cmds
  101. 2.42  18-10-97     Support for EA's in "saveto" and delsave cmds
  102. 2.43  28-10-97     Support for undelete of directories including EA's
  103. 2.47  11-11-97     Updated SLT error display; new check cmd (chkdsk); +/- cmd
  104. 2.50  24-11-97     HPFS checksum management; cs, edit and write cmd
  105. 2.52  07-12-97     check spare/super; BPB display; Specific FAT & NTFS commands
  106. 2.54  28-12-97     More FAT commands; generic More ...; fix DELFIND bug
  107. 2.55  25-01-98     DOS version; diskgeo cmd; More write capabilities; bugfixes
  108. 2.57  15-02-98     Name DFSee; VFAT Details; FAT Os2Ea display; "find" cleanup
  109. 2.58  22-02-98     Fixed More... bugs; Fixed FAT EA & label bug; show EA details
  110. 2.60  08-03-98     Single snlist; recover/saveto; dirfind, wipe; color in DFSNT
  111. 2.61  29-03-98     saveto xxx.DIR orphan naming; DispHex update; displ NTFS-MFT
  112. 2.63  19-04-98     Fixed DFSDOS WRIM and IM commands (file I/O); Fix "FS xxxx"
  113. 2.64  04-05-98     Small bug-fixes + support for named-pipe to LPT on sim/wrim
  114. 2.65  10-05-98     Fixed 'f* * xxx' bug + new % speed-up option; FAT32 support
  115. 2.67  04-06-98     Added optional LZW-compression on SIM and WRIM commands
  116. 2.70  28-07-98     Fixed date-time display for HPFS (bug was OS/2 only)
  117. 2.72  30-07-98     New $ option to 'part' for size-info table
  118. 2.75  21-10-98     No default SLT generation on "part", "vol", "im" and "fs"
  119. 2.77  17-11-98     Added NTFS runlist display; Fixed trap on HPFS autobase cmd
  120. 2.78  22-11-98     Added HPFS bootsector creation; fixed WIPE trap, DFSDOS WRIM
  121. 2.79  29-11-98     NTFS fixups & directory display; FAT dir bug; FreeSpace bug
  122.                    Fixed some DFSDOS geo-bugs, added geometry to part display
  123. 2.80  13-12-98     DOS Cyl count fix; TZDFSEE dates; NTFS RunList; list +d / +c
  124. 2.81  16-12-98     Allow "diskgeo" for images & non-alpha chars in *.img name
  125.                    fixed display of 1-sector HPFS bootsector .IMG file
  126. 2.82  01-01-99     Set exit RC; bootrec Cyl size; HPFS auto CPinfo; INT13 ext.
  127.                    Physical Geo in DFSDOS In13ext; show limits with 'base'
  128.                    NTFS fixboot cmd; part-table display fix; BeOS-FS recognition
  129. 2.83  12-01-99     Extended type 0f as extended; NTFS display MftSize & DirSize
  130.                    Part * and part $* display; fixed bootsector display trap
  131. 2.84  24-01-99     Calculated CHS warnings/info; FreeSpace info; list +g
  132.                    fixext cmd fixes 0f-type extended partitions back to 0x05
  133.                    setptype cmd changes type of any partition to any value
  134. 2.85  25-01-99     NT admin warning; Small FAT bugfix; TrackZero freespace
  135. 2.86  07-02-99     Fixed WRIM doc; MAP command; TRANS command; small fixes
  136. 2.87  14-02-99     minor MAP display updates; No auto-read diskinfo
  137. 2.88  15-02-99     Final touch on MAP display; DFSBW/DFSQUICK.bat more generic
  138. 2.89  16-02-99     Fix Fnode-display for huge 0-size file; DFSDOS ANSI detect
  139. 2.90  25-03-99     FDISK delete; newmbr; settype; setaccess; startable; create
  140.                          plist; dos2os; cleanup; setboot
  141. 2.91  28-03-99     New NTFS MIR cmd; .NNN, BM-name and cleanup fixes; TYPE cmd
  142. 2.92  31-03-99     Added some more system-types (TYPE); minor fixes DOS2OS
  143. 2.93  07-04-99     Reboot internal for DOS/OS2, DFSNTX.EXE for NT; geo at start
  144. 2.94  20-04-99     LVM and minor JFS display updates; plist LVM + plist WALK
  145. 2.96  11-05-99     Minor fixes in LVM display, find and delfind commands
  146. 2.99  28-06-99     More minor fixes; introduction of text-based windowing
  147. 3.00ß 07-07-99     Small but significant fixes for text-based windowing
  148. 3.00Σ 09-07-99     New 'bsfind' command to find bootsectors quickly
  149. 3.00  10-07-99     win/nowin commands and LOGO text; dirfind cmd fixed
  150. 3.01  25-07-99     Windowing enhancements; DFSDOS fixes; More LVM support
  151. 3.03  04-08-99     DFSDOS Ext-Int13 fix; ANSI colors cleanup; display sizes
  152. 3.04  15-08-99     Aurora GEO; display speedup; UNDELETE speedup + enhancements
  153.                    NTFS improved MFT display and translation functions
  154. 3.05  30-08-99     NTFS MFT allocation update; find deleted MFT records
  155.  
  156.                                                                               
  157. Terminology used
  158. ----------------
  159.  
  160.  Sector         512 bytes of data (although other sizes exist!)
  161.                 This is the smallest amount of data manipulated by the
  162.                 disk subsystems and is also the basic allocation-unit
  163.                 for the HPFS file-system
  164.  
  165.  CHS            Cylinder Head Sector (addressing)
  166.                 This is the classical way of addressing physical sectors
  167.                 on a disk. It is used in the PC's BIOS, in partition tables
  168.                 and in low-level disk-IO API's (IOCTL, INT-13).
  169.                 In most implementations the addressing ranges are limitted
  170.                 causing all sorts of problems with large disks/partitions.
  171.  
  172.  INT-13         DOS Interrupt-13, the classical way to interface to
  173.                 physical disks in DOS. Limitted by design to 1024 cylinders.
  174.  (DFSDOS)       Maximum disksize, when using BIOS disk-translation like LBA
  175.                 is just below 8Gb (1024 cylinders, 255 heads, 64 sectors)
  176.  
  177.  Ext-Int-13     Extended INT-13, a new BIOS interface that breaks the 1024
  178.                 cylinder limit. Implemented on recent (EIDE/ATA) BIOS'es
  179.  (DFSDOS)       and some operating system drivers (like Win9x Dosbox)
  180.                 Due to several problems with different implementations,
  181.                 DFSee will recognize the existence, but only use Ext-Int-13
  182.                 on disks really larger than the limit (1024 cylinders)
  183.  
  184.  PSN            Physical Sector Number
  185.                 This is the zero-based, unsigned-LONG, number for a
  186.                 sector on a physical disk. Addressing on a disk using
  187.                 PSN's is often refered to as Relative Block Addressing
  188.                 (RBA) or Logical Block Addressing (LBA)
  189.  
  190.  LSN            Logical Sector Number
  191.                 This is the zero-based, unsigned-LONG, number for a
  192.                 sector on a logical partition. The partition can be seen
  193.                 as a linear sequence of sectors.
  194.                 Note: when accessing a whole disk, the LSN equals the PSN
  195.  
  196.  SLT            Sector/Cluster Lookup Table
  197.                 An array of information about sectors or groups of sectors,
  198.                 containing the type of the sector(s) and the LSN of a
  199.                 directly related sector (usualy an Fnode).
  200.                 It is currently implemented for HPFS only.
  201.  
  202.  Cluster        A (small) group of adjecent sectors that are handled by the
  203.                 operating system as one allocation-unit.
  204.                 It is used on FAT filesystems to allow large partitions at
  205.                 the cost of more wasted "slack" space, and on NTFS to balance
  206.                 performance, slack-space etc.
  207.                 HPFS does not use sector-clustering (or a cluster-size of 1!)
  208.  
  209.                 DFS will try to account for clustering where needed, for
  210.                 example in size calculations and where sector/cluster pointers
  211.                 are used in the file-system internal structures.
  212.  
  213.                                                                               
  214.  
  215.  Partition      An area on a physical disk that holds a single logical
  216.                 file-system like FAT, HPFS, Boot-manager, NTFS etc.
  217.                 There is an index to find partitions in the form of a
  218.                 set of partition-tables in the MBR/EBR chain.
  219.  
  220.  MBR            Master Boot Record
  221.                 The first sector on the physical disk, located at PSN 0 =
  222.                 Cylinder 0, Head 0, Sector 1
  223.                 It contains the initial boot code called from the BIOS and
  224.                 the main partition table that holds the primary partitions
  225.                 and the start of the chain of extended boot records (EBR).
  226.  
  227.  EBR            Extended Boot Record
  228.                 It contains no boot code but only a partition table that
  229.                 holds the location of a single logical partitions.
  230.                 It usualy is located on the cylinder just before the actual
  231.                 logical partition itself, at Head 0, Sector 1.
  232.                 Each EBR will also point to the next EBR if more logical
  233.                 partitions exist on the same disk.
  234.  
  235.  Volume         A logical volume as seen by the active operating system,
  236.                 with a logical drive-letter associated to it.
  237.                 It can be either a hard-disk partition with a filesystem
  238.                 recognized and mounted by the operating system, or some
  239.                 other storage-medium like floppy disk or CD-Rom.
  240.                 Note: Network drives or other "virtual" file-systems can also
  241.                       be refered to as volumes. However, DFSee will not be able
  242.                       to access them because such devices usualy cannot be
  243.                       accessed using "open volume" (DASD) methods.
  244.  
  245.  LVM            Logical Volume Manager, an 'FDISK' like program plus related
  246.                 operating system drivers on OS/2 Warp Server for e-bussines.
  247.                 LVM allows more flexible naming and usage of partitions and
  248.                 drive-letters, including joining multiple partitions on
  249.                 more than one disk into a single volume.
  250.                 DFSee respects the drive-letters as assigned with LVM and has
  251.                 special display options like the 'PLIST LVM' command in FDISK
  252.                 mode. Also the 'part' display will show volume- and partition
  253.                 names as well. (TIP: use a display-size wider than 80 columns)
  254.  
  255.  Shortname      The leading part of a filename, as contained in an HPFS fnode
  256.                 and usefull for undelete. The maximum length is 15 characters
  257.  
  258.  LsnInfo        A value combining an LSN and a (small) informational value in
  259.                 a single 32-bit number. It can be kept in the sector-list and
  260.                 the sector lookup table, most operations will recognize and
  261.                 handle it correctly.
  262.                 On example of usage is the directory-sector LSN plus the index
  263.                 of a directory-entry for (V)FAT directories.
  264.                 LsnInfo 78000345 combines LSN 00000345 with index 7 and a
  265.                 single bit to mark it as an LsnInfo value (flag 0x08000000)
  266.                 So this points to the 8th directory entry in the directory
  267.                 sector at LSN 0345. (entry-numbers start counting at 0 :-)
  268.  
  269.  Sector list    A list of sector numbers (LSN) or LsnInfo combination-values
  270.                 that can be manipulated as a whole with several commands like
  271.                 export, import, getbs, fixbs, dirfind, delfind, delsave etc.
  272.  
  273.                                                                               
  274. Summary of commands
  275. -------------------
  276.  
  277.  The user-interface has a command entry-field with history buffer so
  278.  previous commands can be recalled, and a large scroll-buffer for output.
  279.  Output can also be copied to a file for later analysis.
  280.  
  281.  The classic user-interface can be used as well, start the program with
  282.  the keyword 'nowin' as the first parameter, like 'DFS nowin'
  283.  
  284.  The commands are single words or (hexadecimal) numbers.
  285.  Most commands have one or more parameters of wich some are optional.
  286.  
  287.  DFSee keeps track of the current- and some other usefull SN's so they
  288.  can be referenced faster, without having to type them in. They are:
  289.  
  290.      Name          Cmd       Description
  291.      ----          ---       -----------
  292.      up            'u'       up in hierarchy
  293.      down          Enter     down in hierarchy
  294.      this          't'       this (current)
  295.      xtra          'x'       Extra, alternative
  296.  
  297.  You can display and analyse either a physical disk, a partition or a volume.
  298.  A physical disk can be opened using the 'disk' command.
  299.  
  300.  A disk-partition or volume needs to be opened first with the 'part' or
  301.  'vol' commands respectively. The following prompt will show some status info.
  302.  After opening an HPFS partition, using 'Enter' a few times will take you
  303.  to the superblock, root-directory, possible sub-directories upto some file.
  304.  
  305.  Multiple commands can be chained if separated with a special character,
  306.  the default is '#' but this can be changed with the 'sep' command.
  307.  
  308.  An overview of the available commands is given below, it can also be
  309.  referenced from within the program using the 'help' command.
  310.  
  311.  -----------------------------------------------------------------------------
  312.  
  313.  DFSee basic selection commands, use '??' for other generic commands
  314.  
  315.  Batch-mode can be forced by adding a '!' char to the cmd as in 'FDISK!'
  316.  Any command not recognized will be passed to the operating system
  317.  
  318.  The DISK, FDISK, PART and VOL commands can select a specific mode wich
  319.  makes more specific commands available, use '?' and '???' for details
  320.  
  321.  hex-sector-nr    = Analyse & display sector, SN using logical sector-number
  322.  ? or /?          = Show current FS (mode), specific commands and help info
  323.  ??               = Show list of all generic commands with short description
  324.  ???              = Show all recognized sector-types for current filesystem
  325.  <Enter>, u, x    = Show next with <Enter>, up with 'u' or extra LSN with 'x'
  326.  DISK [dsknr] [!] = Select a physical disk and show the MBR, [!] = reset geo
  327.  FDISK [FdiskCmd] = Activate the FDISK fs (mode) and optionaly execute cmd
  328.  LOG       [file] = Log (append) to 'file' (.log); (No file => stop logging)
  329.  PART [$|+|dr/nr] = Show partitions,  or select one using nr or drive-letter
  330.  VOL      [drive] = Show all volumes, or select one using drive-letter
  331.  q                = Quit DFSee OS2: 3.05 30-08-99 (c) 1994-1999; Jan van Wijk
  332.  
  333.                                                                              
  334.  A list of general available commands can be shown using the '??' command:
  335.  
  336.  -----------------------------------------------------------------------------
  337.  
  338.  .NNN             = Display numbered FS-entity marked .NNN from the sector list
  339.  BASE   [sn [sl]] = Show (and set) physical base limits start and end values
  340.  BATCH  [on |off] = Set batch-mode, no confirmation and locking-error reporting
  341.  BPS      secsize = Force sectorsize to specified value (decimal, bytes)
  342.  BSFIND   [types] = Find boot-sectors on head 0/1 sector 1 only (fast)
  343.  CD        [path] = Change current directory an current drive
  344.  CS          [sn] = Calculate 32-bit checksum for 'this' sector; HPFS aware
  345.  CHECK    [dr/nr] = Report all detected file-system errors using SLT info
  346.  CHS c  h  s      = Analyse & display sector, using CHS (cylinder head sector)
  347.  DELSHOW [w;t]    = Show delfind list, optional wildcard and min/max threshold
  348.  DELWIPE [w;t][p] = Wipe sectors in list with pattern, wildcard [w], threshold
  349.  DIRFIND [l][dir] = Put [l] levels of directory-contents in the sector-list
  350.  DISKGEO [?|c h s]= Force specified geometry on opened physical disk, ?=adjust
  351.  DISPLAY          = Show current display size
  352.  EXPORT      [fn] = Export  LSN's in the sector list, to   file [fn]
  353.  FINDPATH   path  = Find and show file/directory specified by path-spec,
  354.                     relative to current dir, or root if starting with '\'
  355.  FS fsys-name     = Force analysis mode for filesystem 'fsys-name'
  356.  FIND[op] t [str] = Find using [op]tions, sectors of type t containing [str]
  357.       options are : * = repeat; - = backward; $ = Ign-case; @[pos] = position
  358.  HELP         [*] = Show list of generic commands with short description
  359.  a,A  xx   [size] = ASCII-dump (half)sector, SN xx, s sectors or bytes
  360.  h,H  xx   [size] = Hex-dump   (half)sector, SN xx, s sectors or bytes
  361.  ID          [xx] = Identify 'this' or specified sector, using the SLT
  362.  IM   img         = Open a file with a FS-image (.img) for display & analysis
  363.  IMPORT      [fn] = Import  LSN's to the sector list, from file [fn]
  364.  LIST [opt] [str] = Display LSN's in the sector list, using options/string
  365.  LOCK             = Lock physical disk or logical partition to avoid conflicts
  366.  MAP [disknr opt] = Display pseudo-graphical map of partitions on a disk
  367.  MEM  [c|lsn] [#] = Store LSN in sector-list at loc #, or limit list-size
  368.  MORE [?|*|lines] = Set number of screen-lines, including More ... function
  369.  PRIO       [lvl] = Set relative priority of the DFS main thread
  370.  PSN  xx          = Analyse & display sector, SN xx using physical sector-nr
  371.  RECOVER  d [w;t] = Recover files from the sector-list (delfind), to dir [d],
  372.                     and with optional wildcard [w] and min/max threshold [t]
  373.  SAVETO  [dir][l] = Save filedata for current file to a new file in [dir]
  374.  SCAN [wr [NoId]] = Scan bad-sectors; use read/Write verify; No automatic id
  375.  SCL       clsize = Force clustersize to specified value (decimal, sectors)
  376.  SCREEN  [on|off] = Switch output to the screen on or off
  377.  SETANSI [on|off] = Set use of ANSI escape-sequences (colors) on or off
  378.  SIM img  [f s z] = Save to FS-image, from LSN [f], size [s]; z = LZW compress
  379.  SLT  [type i ln] = Display SLT for sectors of 'type' at index i, ln lines
  380.  SORT [-][unique] = Sort LSN list; [-] = descending [unique] removes duplicates
  381.  TRANS l|i|c|p xx = Translate and display value 'xx' as Lsn, I13, Chs and Psn
  382.  t  [sector-type] = Display 'this' sector as Hex or specified sector-type
  383.  u  [sector-type] = Display 'up'   sector as Hex or specified sector-type
  384.  x  [sector-type] = Display 'xtra' sector as Hex or specified sector-type
  385.  UNLOCK           = Unlock physical disk or logical partition
  386.  WIPE   pat [f s] = Wipe disk/vol/part area with pattern at LSN [f], size [s]
  387.  WRIM   img [f s] = Write FS-image to disk-sectors start at LSN [f], size [s]
  388.  WIN   [col][row] = Reset display to windowing mode, opt. resize display size
  389.  NOWIN [col][row] = Reset display to cmd-line  mode, opt. resize display size
  390.  RUN macro        = Run a DFS macro in a REXX file
  391.  q                = Quit DFSee OS2: 3.05 30-08-99 (c) 1994-1999; Jan van Wijk
  392.                                                                              
  393. Command reference, general DFS commands
  394. ---------------------------------------
  395.  
  396.  FDISK  [Command] = Select FDISK mode, pass (optional) command to execute
  397.  
  398.  Purpose:       Make FDISK the active analysis mode and command-set
  399.  
  400.  Parameters:    command optional   Specific FDISK command (try FDISK ??)
  401.  
  402.  Output:        none
  403.  
  404.  Remarks:       When the 'batch' mode is forced using a trailing ! on FDISK,
  405.                 and a command is specified, DFSee will do an automatic quit
  406.                 after completing the command. This is usefull to execute a
  407.                 series of FDISK commands from a batch- or command-file.
  408.  
  409.  
  410.  DISK [dsknr] [!] = Select a physical disk and show the MBR, [!] = reset geo
  411.  
  412.  Purpose:       Select a physical disk
  413.  
  414.  Parameters:    dsknr   optional   disk nr, default is current if open or 1
  415.                 !       optional   reset previously forced geometry
  416.  
  417.  Output:        Disk Geometry and default display of sector 0 (usualy MBR)
  418.  
  419.  Remarks:       The dfs_number variable for REXX will be set to nr-of-disks
  420.                 See also: WALK command
  421.  
  422.  
  423.  LOCK [ign]   = Lock physical disk, to allow writing to it
  424.  
  425.  Purpose:       Lock a physical disk
  426.  
  427.  Parameters:    ign     optional   Ignore lock failure, do not prompt
  428.                                    interactively for write permission
  429.  
  430.  Output:        none
  431.  
  432.  
  433.  UNLOCK       = Unlock physical disk, after writing to it
  434.  
  435.  Purpose:       Unlock a physical disk
  436.  
  437.  Parameters:    none
  438.  
  439.  Output:        none
  440.                                                                               
  441.  
  442.  BPS   secsize    = Force sectorsize to specified value (decimal, bytes)
  443.  
  444.  Purpose:       Force a specific number of bytes per sector
  445.  
  446.  Parameters:    secsize mandatory  Number of bytes per sector (decimal)
  447.  
  448.  Output:        none
  449.  
  450.  Remarks:       Should be automatically correct, special purpose usage only
  451.  
  452.  
  453.  SCL   clsize     = Force clustersize to specified value (decimal, sectors)
  454.  
  455.  Purpose:       Force a specific number of sectors per cluster
  456.  
  457.  Parameters:    clsize  mandatory  Number of sectors per cluster (decimal)
  458.  
  459.  Output:        none
  460.  
  461.  Remarks:       Should be automatically correct, special purpose usage only
  462.  
  463.  
  464.  MAP [disknr opt] = Display pseudo-graphical map of partitions on a disk
  465.  
  466.  Purpose:       Give an easy to interpred visual image of the disk layout
  467.  
  468.  Parameters:    disknr  optional   number of disk to diplay, default is all
  469.  
  470.                 opt     optional   options, '+' is more verbose map
  471.  
  472.  Output:        Some lines of drawing-characters and text representing the
  473.                 disk with it's partitions. The partitions are sized according
  474.                 to their real size. Freespace is also shown the same way.
  475.                 The color of the areas indicate the filesystem-type.
  476.                 Each area contains the most relevant textual info as well.
  477.  
  478.  Remarks:       Loosely modelled after the PartitionMagic display
  479.  
  480.  
  481.  
  482.  PART [opt / drv] = Select specified partition, or show the list of partitions
  483.  
  484.  Purpose:       Select a disk partition for analysis
  485.  
  486.  Parameters:    opt/drv optional   Number specifying the partition as shown
  487.                                    by the 'disks' or 'part' commands
  488.                         or   d:    Drive-letter for a partition (part C:)
  489.                         or   $     To get a table with size information
  490.                     and/or   *     To add info on extended partitions to table
  491.                         or   +     To get a multi-line verbose list (incl LVM)
  492.                         or   ++    Extremely verbose, with additional FS info
  493.                         or   !     To force a new scan of physical disks
  494.                                    If no parameter is specified the list of
  495.                                    partitions will be displayed.
  496.                         or   !!    Force new scan, and use alternative method
  497.                                    of drive-letter assignment (industry std).
  498.  
  499.  Output:        Either the list of partitions in the specified format, or the
  500.                 verbose partition display for the selected partition.
  501.  
  502.  Remarks:       The command "d:" where d is any existing drive-letter will
  503.                 be interpreted as a "part d:" command. This means that the
  504.                 C: partition can be opened just by typing "C:"
  505.  
  506.                 The returncode (rc) will be zero for a valid partition id or
  507.                 the number of partitions otherwise (usefull in REXX scripts).
  508.  
  509.                                                                               
  510.                 An example of the list ouput in table form (default) is:
  511.  
  512. Number of disks   : 2
  513. Geometry for disk : 1   Cyl: 263 H:255 S:63   Disksize : 00407847 =    2063 Mb
  514. Geometry for disk : 2   Cyl: 527 H:255 S:63   Disksize : 00812F4F =    4134 Mb
  515.  Id 06=F: WARNING : Not formatted or invalid bootrecord
  516. ┌──┬──┬───┬─────────────────┬────────┬────────┬───────────┬──────────┬────────┐
  517. │id│PD│Vol│Type, description│Format  │Creator │Label Info │BM-Name   │ Size Mb│
  518. ├──┼──┼───┼─────────────────┼────────┼────────┼───────────┼──────────┼────────┤
  519. │01│ 1│>--│Prim 0a Boot Mgr │BMGR    │fdisk   │«Merlin  » │          │     7.8│
  520. │02│ 1│*--│Hide 16 FAT >32Mb│FAT16   │IBM  7.0│FAT_BOOT_1 │IBMDOS7   │   125.5│
  521. │03│ 1│*C:│Prim 06 FAT >32Mb│FAT16   │MSWIN4.0│FAT_BOOT_2 │WIN95/NT  │   360.8│
  522. │04│ 1│ D:│Log  06 FAT >32Mb│FAT16   │MSWIN4.0│FAT_DATA   │          │   690.3│
  523. │05│ 1│ E:│Log  07 Inst. FS │NTFS    │Win NT  │           │          │   360.8│
  524. │06│ 1│ F:│Log  07 Inst. FS │--none--│fdisk   │           │          │     7.8│
  525. │07│ 1│*G:│Log  07 Inst. FS │HPFS    │OS2 20.0│OS2_BOOT_3 │Merlin    │   509.8│
  526. ├──┼──┼───┼─────────────────┼────────┼────────┼───────────┼──────────┼────────┤
  527. │08│ 2│ H:│Log  07 Inst. FS │HPFS    │OS2 20.0│BIG_HPFS   │          │  2400.3│
  528. │09│ 2│ I:│Log  06 FAT >32Mb│FAT16   │MSDOS5.0│MSVCPP_DFS │          │   706.0│
  529. │10│ 2│ --│Log  82 LinuxSwap│SWAP    │fdisk   │           │          │   117.6│
  530. │11│ 2│*--│Log  83 LinuxExt2│EXT2    │fdisk   │           │Linux     │   902.1│
  531. └──┴──┴───┴─────────────────┴────────┴────────┴───────────┴──────────┴────────┘
  532.  
  533.  Number of disks   = The number of disks reported by the system
  534.  Physical-Geo disk = Physical geometry for a disk using extended INT13 (DFSDOS)
  535.  Geometry for disk = Geometry for one disk, as reported by the the OS
  536.   Id nn=d: WARNING = Any informal, strange or alarming conditions on partition
  537.  
  538.  Where:   id                = The selection-id used by DFS for this partition
  539.           PD                = Physical drive number; 1..max
  540.           Vol               = Drive letter, capital (or lowercase for hidden)
  541.                               Prefix: '>' for active partition (BIOS bootable)
  542.                                       '}' active partition, not first disk
  543.                                       '!' active partition, bad bootsector
  544.                                       '*' for partitions bootable by Bootmgr
  545.                                       '-' bootable by Bootmgr, bad bootsector
  546.           Type, description = Type-info and hex value of the type, type-info:
  547.                               Prim = Primary (active, accessible)
  548.                               Hide = Hidden  (primary or special)
  549.                               Log  = Logical volume in an extended partition
  550.                               Lhid = Logical volume, currently hidden
  551.           Format            = The filesystem format string found in the
  552.                               bootrecord for this partition or --none--
  553.           Creator           = The OEM identification string from the bootrec
  554.                               of "fdisk" if no valid bootrecord is found
  555.           Label Info        = The volumelabel as found in the bootrecord, or
  556.                               the «BM-label» of the current Bootmgr selection
  557.           BM-Name           = The name for this partition as registered in
  558.                               the OS/2 boot-manager information area's
  559.           LVM Volume, Part  = The full LVM volume and partition names
  560.                               (replaces BM-name when LVM info present on disk)
  561.           Size Mb           = The gross size of the partition in megabytes
  562.                                                                               
  563.  
  564.                 An example of a list fragment for verbose form (FAT) is:
  565.  
  566. DFS partition  Id : 3
  567.  Physical disk nr : 1   Cyl: 263 H:255 S:63 = Fixed      P-Table MBR,   entry:2
  568.  System Indicator : 06
  569.  Type description : FAT >32Mb
  570.  FileSyst. format : FAT16
  571.  Partition   type : Primary
  572.  Part. visibility : Visible
  573.  Creator OEM-name : MSWIN4.0
  574.  Partition Label  : FAT_BOOT_2
  575.  Boot capability  : Bootable by OS/2 boot-manager as: WIN95/NT
  576.  Bootsec checksum : D0B8A5A4
  577.  Partition  start : Cyl:   17  H:   0  S:  1  first PSN : 00042AD1 on cyl:   17
  578.  Partition    end : Cyl:   62  H: 254  S: 63  last  PSN : 000F717E on cyl:   62
  579.  Bootsect. offset : 00042AD1 =  273105 Dec
  580.  Partition   size : 000B46AE =     361 Mb         Cylinder size: 3EC1 = 8033 Kb
  581.  Cluster     size : 00000010 =       8 Kb, in 16 sector(s)  of 512 bytes
  582.  Free space drive : C:       156.1 Mb of    360.6 Mb on file-system: FAT
  583. Bootsec. checksum : D0B8A5A4
  584.  
  585. Size of FAT entry : 16  Bits  FAT label in Root : FAT_BOOT_2
  586. Largest ClusterNr : 0000B453  Number of sectors : 000B46AE =     361 Mb
  587. 1st FAT start LSN : 00000001  2nd FAT start LSN : 000000B7
  588. RootDirectory LSN : 0000016D  Root-size sectors : 0000002E =      23 Kb
  589. Rel Cluster-0 LSN : 0000017B  1st DataClust LSN : 0000019B
  590. EA data fragments : 0         EA header sectors : 00000000 =       0 b
  591.  
  592.  
  593.  VOL [drv]    = Show all volumes, or select one using drive-letter
  594.  
  595.  Purpose:       Work with logical volumes including floppies and CD-rom
  596.  
  597.  Parameters:    drv     optional   Drive-letter for the volume to open
  598.  
  599.  Output:        Either the list of volumes or the default display for the
  600.                 first sector of the volume (usualy a boot-sector).
  601.  
  602.  Remarks:       Network or other "virtual" file-systems are not supported
  603.                 for 'open' like 'vol X:', but they are listed, including
  604.                 their network sharename. (OS/2 version only)
  605.  
  606.  
  607.  DISKGEO [?|c h s]= Force specified geometry on opened physical disk, ?=adjust
  608.  
  609.  Purpose:       Show current or force different geometry to be used for
  610.                 interpreting and analysing the current physical disk
  611.  
  612.  Parameters:    none    Display the geometry currently in use, including
  613.                         possible overrides by previous 'diskgeo' commands
  614.  
  615.                 c h s   Overrule current geometry by the values specified
  616.                         for cylinders, heads and sectors.
  617.  
  618.                         The value '?' can be specified for the cylinder value
  619.                         and will cause a re-calculation for the cylinder count
  620.                         based on heads/sectors and the size of the disk at
  621.                         the time it was first selected.
  622.  
  623.  Output:        The resulting geometry for the physical disk currently open
  624.  
  625.  Remarks:       You can keep the current value for one of the items by
  626.                 specifying zero (0) or nothing for the override
  627.  
  628.  Example:       'diskgeo 0 255'   will set the number of heads to 255
  629.                 'diskgeo ? . 32'  will set the number of sectors to 32 and
  630.                                   calculate the right number of cylinders
  631.                                   for that geometry and disksize
  632.  
  633.                                                                               
  634.  CHECK   [dr/nr]  = Report all detected file-system errors using SLT info
  635.  
  636.  Purpose:       Check file-system integrity using SLT info (chkdsk function)
  637.  
  638.  Parameters:    drive-letter or partition-nr to check, default opened partition
  639.  
  640.  Output:        Verbose list of all SLT entries that have an error flagged
  641.                 This will include path+filename when available and textual
  642.                 explanation of the error(s)
  643.  
  644.  Remarks:       The reported arrors are the same as listed with the SLT command
  645.                 'check' is an alias for "SLT * 0 * +fffd"
  646.                 The SLT will be rebuild on each invocation of the "check" cmd.
  647.  
  648.  
  649.  IM   img         = Open a file with a FS-image (.img) for analysis
  650.  
  651.  Purpose:       Work with a saved binary image
  652.  
  653.  Parameters:    img     Filename for the image, default extention is '.img'
  654.  
  655.  Output:        The default display for the first sector of the image
  656.  
  657.  Remarks:       File-system type is derived from first (boot) sector
  658.  
  659.  
  660.  SIM img  [f s z] = Save to FS-image, from LSN [f], size [s]; z = LZW compress
  661.  
  662.  Purpose:       Save specified sectors as a binary image for use with 'IM'
  663.  
  664.  Parameters:    img     Filename for the image, default extention is '.img'
  665.  
  666.                         When prefixed with [lpt.exe], the data is actualy
  667.                         written to named pipe \pipe\xxx.img to LPT.EXE wich
  668.                         will be started in a separate session automatically
  669.                         This allows saving the image on a different PC that
  670.                         is attached using a parallel (laplink) cable.
  671.  
  672.                 f       Start LSN for save, default is 0
  673.                 s       Size of the saved image in sectors, default is 256
  674.                         '$' can be used to save all sectors of the disk/volume
  675.  
  676.                 z       Option to enable LZW compression on the image-file
  677.  
  678.  Output:        none
  679.  
  680.  Remarks:       When '.' is specified for s, sector 'f' upto 'this' is saved
  681.                 When '.' is specified for f, the start-sector is 'this'
  682.                 When '.' is specified for both, only the 'this' sector is saved
  683.  
  684.  WRIM img   [f s] = Write FS-image to disk-sectors start at LSN [f], size [s]
  685.  
  686.  Purpose:       Write sectors back from an image to opened partition or volume
  687.  
  688.  Parameters:    img     Filename for the image, default extention is '.img'
  689.  
  690.                         When prefixed with [lpt.exe], the data is actualy
  691.                         read from named pipe \pipe\xxx.img from LPT.EXE wich
  692.                         will be started in a separate session automatically
  693.                         This allows retrieving the image from a different PC
  694.                         that is attached using a parallel (laplink) cable.
  695.  
  696.                 f       Start LSN for write, default is 0
  697.                 s       Size of the saved image in sectors, default is 1
  698.                         '$' can be used to write all sectors to the disk/volume
  699.  
  700.  Output:        none
  701.  
  702.  Remarks:       '.' can be specified for the f and s parameters, see 'sim' cmd
  703.  
  704.                 LZW compressed image-files created by SIM will be recognized
  705.                 and automatically un-compressed on the fly.                   
  706.  
  707.  WIPE pat   [f s] = Wipe disk/vol/part area with pattern at LSN [f], size [s]
  708.  
  709.  Purpose:       This will wipe an entire volume or disk, or a specified part
  710.                 of it, using the specified pattern.
  711.  
  712.  Parameters:    pat     The pattern to use for wiping, it can be any lenth
  713.                         from a single byte upto 256 bytes.
  714.                         default: DfsWiped
  715.  
  716.                         It can be specified as a mix of ASCII and HEX.
  717.                         The starting mode is ASCII, switching to
  718.                         HEX and back is done with the ' character.
  719.                         Note that there can be NO SPACES in this definition,
  720.                         if you need spaces, use the hex '20' value instead.
  721.  
  722.                 f       First sector-number to be wiped, hexadecimal
  723.                         .  = current sector 'this'
  724.                         default: 0
  725.  
  726.                 s       Size to wipe, in sectors, hexadecimal
  727.                         .  = upto current sector 'this'
  728.                         $  = upto end of current volume/disk
  729.                         default: $
  730.  
  731.  
  732.  Output:        Progress indicator with one dot for each wiped megabyte
  733.  
  734.  Remarks:       A disk, partition or volume needs to be opened first.
  735.                 You can easily call DFS (or DFSDOS) from the commandline
  736.                 specifying a 'wipe' for the entire volume or disk.
  737.  
  738.  Example:       wipe '00' 0 1
  739.                 set bootsector to zeroes, clearing boot-code and, when the
  740.                 current object is a complete disk, the partition-table
  741.  
  742.                 wipe
  743.                 wipe entire vol/disk/partition with the default pattern
  744.  
  745.                 dfsdos part d n#wipe#q
  746.                 From the dos commandline, select partition D: and wipe
  747.                 it completely using the default pattern
  748.  
  749.                 dfsdos disk 1#wipe 'ff'#q
  750.                 From the dos commandline, select physical disk 1 and wipe
  751.                 it completely using hexadecimal pattern 0xff
  752.  
  753.                 dfs disk 2#wipe DFS'20'was'20'here 0 1#q
  754.                 From the OS/2 commandline, select physical disk 2 and wipe
  755.                 the master-boot record with the string "DFS was here"
  756.                 Note the use of '20' to get the parameter completely
  757.                 specified without using the space-character.
  758.                                                                               
  759.  
  760.  FS   fs-name     = Force analysis using specified file-system knowledge
  761.  
  762.  Purpose:       Use specific FS knowledge if the default is not correct
  763.  
  764.  Parameters:    fs-name File-system name, like FAT or HPFS
  765.  
  766.  Output:        none
  767.  
  768.  Remarks:       none
  769.  
  770.  
  771.  EXPORT     [fn] = Export  LSN's in sector list, to   file [fn]
  772.  
  773.  Purpose:       Save an LSN-list in a file for modification or later use
  774.  
  775.  Parameters:    fn      Destination filename, default is dfslistX.lsn
  776.  
  777.  
  778.  Output:        none
  779.  
  780.  Remarks:       The file has one LSN per line, editable with a text-editor.
  781.  
  782.  
  783.  IMPORT      [fn] = Import  LSN's to sector list, from file [fn]
  784.  
  785.  Purpose:       Read an LSN-list from a file, exported and/or modified
  786.  
  787.  Parameters:    fn      Source filename, default is dfslistX.lsn
  788.  
  789.  
  790.  Output:        none
  791.  
  792.  Remarks:       The file needs one LSN per line, editable with a text-editor.
  793.                 It can be the result of an export, derived from a log-file
  794.                 or created completely by hand.
  795.                 The verbose format resulting from a "list +" or "list +f"
  796.                 and the "delshow" is also valid. (use "log" cmd to capture)
  797.                 This is often more convenient than bare LSN lists because
  798.                 the verbose format contains info like path/filename.
  799.  
  800.  DIRFIND [l][dir] = Put [l] levels of directory-contents in the sector-list
  801.  
  802.  Purpose:       Find non-deleted files in a directory and optionaly it's
  803.                 subdirecties upto the number of levels specified.
  804.  
  805.  Parameters:    l           optional   number of directory levels to include
  806.                                        in the list, or 's' for all levels
  807.  
  808.                 dir         optional   directory specification, starting from
  809.                                        the root-directory
  810.  
  811.  Output:        Sector list in memory to be used in following operations
  812.  
  813.  Remarks:       List can be manipulated as usual, best viewed with "list +f"
  814.  
  815.  Example:       dirfind s \os2
  816.                 This will put the whole \os2 tree in the sector-list
  817.                                                                               
  818.  
  819.  BASE   [sn [sl]] = Show (and set) physical base limits start and end values
  820.  
  821.  Purpose:       Force a different partition start sector-nr
  822.  
  823.  Parameters:    sn      Sector-number to use as start for partition ==> LSN 0
  824.                 sl      Sector-number to use as end for partition (optional)
  825.  
  826.  Output:        Display of current physical start and end values (after set)
  827.  
  828.  Remarks:       Can be used if start of partition / partition-tables are bad
  829.                 Try to find the PSN for the first sector of the partition
  830.                 and use the "base" cmd followed by an "FS xxxx" command
  831.  
  832.  
  833.  PSN  xx      = Analyse & display sector using PSN xx
  834.  
  835.  
  836.  Purpose:       Display sector using Physical Sector Number addressing
  837.  
  838.  Parameters:    xx = 1 to 8 hexadecimals
  839.  
  840.  Output:        Sector display, format selected based on sector-contents
  841.  
  842.  Remarks:       The SN is specified in hexadecimal format, however the first
  843.                 digit needs to be decimal to avoid misinterpretation.
  844.                 Prefixing the SN with '0' will avoid any conflicts.
  845.  
  846.                 Output that scrolls of the screen can be repeated using
  847.                 the 't' command. (display 'this' sector)
  848.  CHS c  h  s  = Analyse & display sector using CHS specication
  849.  
  850.  
  851.  Purpose:       Display sector using Cylinder, Head and Sector addressing
  852.  
  853.  Parameters:    c       mandatory  The zero-based decimal Cylinder number
  854.                                    Range 1 to disk-specific maximum and
  855.                                    usualy below 1024.
  856.  
  857.                 h       mandatory  The zero-based decimal Head number
  858.                                    Range 0 to disk-specific maximum but
  859.                                    never more than 255
  860.  
  861.                 s       mandatory  The one-based decimal Sector number
  862.                                    Range 1 to disk-specific maximum but
  863.                                    never more than 63
  864.  
  865.  Output:        Sector display, format selected based on sector-contents
  866.  
  867.  Remarks:       Output that scrolls of the screen can be repeated using
  868.                 the 't' command. (display 'this' sector)
  869.                                                                               
  870.  
  871.       xx      = Analyse & display sector, SN xx; xx = 1 to 8 hexadecimals
  872.  
  873.  
  874.  Purpose:       Display a sector in the most usefull format
  875.  
  876.  Parameters:    none
  877.  
  878.  Output:        Sector display, format selected based on sector-contents
  879.  
  880.  Remarks:       The SN is specified in hexadecimal format, however the first
  881.                 digit needs to be decimal to avoid misinterpretation.
  882.                 Prefixing the SN with '0' will avoid any conflicts.
  883.  
  884.                 Logical addressing (LSN) is actualy used, however when a
  885.                 physical disk is selected the offset for logical addressing
  886.                 is set to 0. The result is that LSN's equal PSN's.
  887.  
  888.                 Output that scrolls of the screen can be repeated using
  889.                 the 't' command. (display 'this' sector)
  890.  
  891.  
  892.  
  893.  H,h [xx [s]] = Hex-dump sector or half-sector, LSN xx, s sectors/bytes
  894.  
  895.  Purpose:       Display current or specified sector in hex-dump format
  896.  
  897.  Parameters:    xx      optional   LSN of sector to dump
  898.  
  899.                 s       optional   size to dump:  1..63   specifies sectors
  900.                                                  64..xxx  specifies bytes
  901.                                    Default is 512 bytes for the 'H' command
  902.                                           and 256 bytes for the 'h' command
  903.  
  904.  Output:        Hex-dump of the sector
  905.                 On every line 16 bytes of data will be displayed, each line
  906.                 containing:
  907.                   - the relative offset in the record (4 hex digits)
  908.                   - 16 bytes in hexadecimal; separator after 8 bytes
  909.                   - the same 16 bytes represented as ASCII
  910.  
  911.  Remarks:       The ASCII representation is filtered, non-printable
  912.                 characters are represented with a PERIOD character
  913.  
  914.  
  915.  
  916.  T a|h [s]    = This LSN, display in Ascii or Hex;  s sectors/bytes
  917.  
  918.  Purpose:       Display current sector in ASCII, EA, HEX or default format
  919.  
  920.  Parameters:    a|h     optional   Specifies display format as:
  921.                                       a = ASCII
  922.                                       h = HEX
  923.                                    none = default (based on sector-contents)
  924.  
  925.                 s       optional   size to dump:  1..63   specifies sectors
  926.                                                  64..xxx  specifies bytes
  927.  
  928.  Output:        Sector display in requested format
  929.  
  930.  Remarks:
  931.  
  932.                                                                               
  933.  FIND[op] t [str] = Find using [op]tions, sectors of type t containing [str]
  934.  
  935.  Purpose:       Perform a sector search starting from the current LSN
  936.                 until a sector of the specified type and optionaly
  937.                 (not) containing a specified ASCII/HEX string is found.
  938.  
  939.  Parameters:    op      optional   Search and display options, default is '+'
  940.                           *      = Repeat find, building a list (find all ...)
  941.                           %      = No sector-spanning,     => fast text-search
  942.                           [      = Freespace only          => fast undelete
  943.                           ]      = Allocated space only    => fast file-grep
  944.                           !      = No progress output while searching (faster)
  945.                           +      = Verbose output even when repeating
  946.                           -      = Search towards lower sector numbers
  947.                           ~      = Search sector-1 head 0/1 only, bootsectors
  948.                           $      = Use case-insensitive string compare
  949.                           ^      = Inverse, search sectors NOT containing ...
  950.                           @[pos] = compare at sector position [pos] only
  951.                                    (with type dependant defaults for [pos])
  952.  
  953.                              Note: Use no spaces between 'find' and options!
  954.  
  955.                 t       optional   Types of sector wanted, default is any KNOWN
  956.                                    specify multiple types in a single string
  957.  
  958.                     DFS generic sector types
  959.                     '*' = any sector           '~' = No contents shown
  960.                     'r' = Master   Boot Rec    'e' = Extended Boot Rec
  961.                     'b' = Fsys boot sector     'R' = Fsys reserved sec
  962.                     '!' = any known type       't' = Text format  data
  963.                     'h' = Hex  format  data    'H' = Unidentified data
  964.                     '$' = Free space           'w' = Wiped by DFSee...
  965.                     'T' = Tpack# compressed    '.' = <Past-partition!>
  966.  
  967.                     For an up-to-date list, use the '???" command
  968.  
  969.                 str     optional   A string of bytes that have to be present
  970.                                    in the wanted sector.
  971.                                    When the '$' string option is not given, it
  972.                                    can be specified as a mix of ASCII and HEX.
  973.                                    The starting mode is ASCII, switching to
  974.                                    HEX and back is done with the ' character.
  975.                                    Leading whitespace is skipped, in HEX mode
  976.                                    spaces can be used to improve readability.
  977.  
  978.                         Example 1: last'0d0a'first
  979.  
  980.                                    This will search for the word "last"
  981.                                    followed by a carriage-return line-feed
  982.                                    combination and the word first
  983.  
  984.                         Example 2: 'e9bd13 0d4023 49 42 4d 3a38 2e'
  985.  
  986.                                    This will search for a byte sequence,
  987.                                    in this case the start of COMMAND.COM
  988.  
  989.  Output:        Sector display, format selected based on sector-contents,
  990.                 or a single line with position and type info when repeating
  991.  
  992.  
  993.  Remarks:       This command is also very usefull to find a specific fragment
  994.                 of disassembled code anywhere on the disk, to resolve the
  995.                 name of an EXE, DLL or device driver causing traps or hangs.
  996.  
  997.                 Backward search can be usefull on HPFS to find the preceding
  998.                 fnode when looking at some random file-data.
  999.                 Note: the 'id' command will do this more reliably but depends
  1000.                       on the sector-lookup-table to be filled.
  1001.  
  1002.                 The find command is often called by other commands to
  1003.                 implement the actual search (like "delfind" and "bsfind")
  1004.                                                                               
  1005.  
  1006.  BSFIND   [types] = Find boot-sectors on head 0/1 sector 1 only (fast)
  1007.  
  1008.  Purpose:       Find MBR, EBR or fsys-boot-sectors on a disk
  1009.  
  1010.  Parameters     types   optional   type of sectors to look for (default 'bre')
  1011.  
  1012.  Output:        Sector display, format selected based on sector-contents,
  1013.                 or a single line with position and type info when repeating
  1014.  
  1015.  Remarks:       This command is intended to collect info for 'unfdisk' type
  1016.                 of recovery in the fastest way possible.
  1017.                 It only inspects sector-1 on head 0 and 1 on each cylinder.
  1018.                 This makes it DEPENDANT on the geometry currently being used
  1019.                 on the disk. You could try using different geometries with
  1020.                 the 'diskgeo' command if the actual geometry is uncertain.
  1021.  
  1022.                 Afterwards, a usefull detailed list can be made with 'list +d'
  1023.  
  1024.  
  1025.  EDIT pos  str    = Update the current sector at 'pos' to the value of 'str'
  1026.  
  1027.  Purpose:       Make (small) modifications to sector contents
  1028.  
  1029.  Parameters     pos     mandatory  Hexadecimal offset, start of edit-area
  1030.  
  1031.  
  1032.                 str     mandatory  A string to be placed at the specified
  1033.                                    position in the current sector.
  1034.                                    The syntax for this string is exactly the
  1035.                                    same as for the find ('f") command.
  1036.                                    So ASCII and binary specifications are
  1037.                                    possible.
  1038.  
  1039.  Output:        Hex-dump BEFORE and AFTER for the changed sector area
  1040.  
  1041.  Remarks:       The edit command itself does NOT write the new contents
  1042.                 back to disk. Use the 'write' command to do that.
  1043.                 The 'show' command can be used to view the sector before
  1044.                 writing back or making more changes. It is simular to the
  1045.                 'H' and 'h' command, but it does not read from the disk,
  1046.                 it just displays the current sector buffer contents.
  1047.  
  1048.  
  1049.  SHOW  [s]    = Hex-dump current sector (or half-sector), s sectors/bytes
  1050.  
  1051.  Purpose:       Display current (last read, edited) sector in hex-dump format
  1052.  
  1053.  Parameters:    s       optional   size to dump:  1..63   specifies sectors
  1054.                                                  64..xxx  specifies bytes
  1055.                                    Default is 512 bytes for the 'SHOW' command
  1056.                                           and 256 bytes for the 'show' command
  1057.  
  1058.  Output:        Hex-dump of the sector, see the 'h' and 'H' commands
  1059.  
  1060.  Remarks:       The main difference with 'h' and 'H' are that the current
  1061.                 contents of the sector-buffer (possibly changed by an 'edit')
  1062.                 are shown. 'h' and 'H' will first read a sector from disk.
  1063.  
  1064.                                                                               
  1065.  WRITE   xx   = Write back the sector-buffer using current or specified LSN
  1066.  
  1067.  Purpose:       Update a sector on the disk, possible after editing it
  1068.  
  1069.  Parameters:    xx      mandatory  sector-number specification (LSN)
  1070.                                    '.' is the current sector ('This')
  1071.  
  1072.  Output:        none
  1073.  
  1074.  Remarks:       Only one sector (512 bytes) will be written.
  1075.                 Writing back changed data to the disk can cause BIG TROUBLE
  1076.                 when you don't know EXACTLY what you are doing.
  1077.                 Use it with extreme care (and maintain backups if possible :-)
  1078.  
  1079.  
  1080.  
  1081.  LIST [opt] [str] = Display LSN's in the sector list, using options/string
  1082.  
  1083.  Purpose:       Display one of the sector-number lists maintained by DFS
  1084.  
  1085.  Parameters     opt     optional   + = Use verbose output, one line per LSN
  1086.                                   +f = verbose including PATH info on Fnode
  1087.                                   +d = display sector contents as well
  1088.                                   +c = One line LSN info + a command per LSN
  1089.                                   +g = Show lsn -> psn -> CHS using diskgeo
  1090.  
  1091.                 str     optional   Wildcard select-string, only valid with "+f"
  1092.                                    multiple wildcards '*' and '?' can be used.
  1093.                                    Useful on a (large) list of deleted fnodes!
  1094.  
  1095.                                    Command to execute for each LSN in the
  1096.                                    list when the "+c" option is used
  1097.  
  1098.  
  1099.  Output:        List of sector numbers in compact, verbose or special format
  1100.  
  1101.  Remarks:       List also available for REXX in the dfs_sn. stem variable
  1102.                 Lists can be imported and exported to files, see import/export
  1103.  
  1104.  
  1105.  SAVETO [dir][l] = Save filedata for (current) dir+entry LSN to a file
  1106.  
  1107.  Purpose:       Recover a file based on it's directory entry and the FAT, by
  1108.                 a low-level sector-by-sector copy of its data to a new file.
  1109.  
  1110.  Parameters:    dir         optional   Path to save the file copy, default a:\
  1111.  
  1112.                 l           optional   LSN (dir+entry) of the file to recover
  1113.  
  1114.                 rename      optional   new name for destination file
  1115.  
  1116.  Output:        Progress is reported with one RED or GREEN dot for each sector
  1117.  
  1118.  Remarks:       Only the file contents is recovered, date&time and attributes
  1119.                 are lost.
  1120.                 If no directory is specified it will default to the last one
  1121.                 used for saveto. This directory should be on ANOTHER drive!
  1122.  
  1123.  
  1124.  DELSHOW   [w;t] = Show delfind list, optional wildcard and min/max threshold
  1125.  
  1126.  Purpose:       Display a list of deleted Fnodes
  1127.  
  1128.  Parameters:    w           optional   wildcard selection for display
  1129.  
  1130.                 t           optional   +nn = Minimum allocation-OK percentage
  1131.                                        -nn = Maximum allocation-OK percentage
  1132.  
  1133.  Output:        LSN list in fnode format (as "list f+f *;1" command)
  1134.  
  1135.  Remarks:       Default wildcard is '*', default percentage is 0
  1136.                 Minimum wil list all values larger, maximum all values 'upto'
  1137.                 Wildcards are real (UNIX style) wildcards using '*' and '?'
  1138.                 Wildcards can appear at multiple places in the path string.
  1139.  
  1140.  Example        delshow *;100          All files perfectly recoverable                                                           
  1141.  Example        delshow *.ini;50       All *.ini files at least halfway OK
  1142.  Example        delshow *;-100         All files not fully recoverable
  1143.  
  1144.  
  1145.  RECOVER d [w;t] = Undelete files from the delfind list, to dir [d], and
  1146.  DELSAVE d [w;t]   with optional wildcard [w] and min/max threshold  [t]
  1147.  
  1148.  Purpose:       Undelete multiple files using (a selection from) a list
  1149.  
  1150.  Parameters:    d           optional   Path to save the file copy
  1151.  
  1152.                 w           optional   wildcard selection for display
  1153.  
  1154.                 t           optional   +nn = Minimum allocation-OK percentage
  1155.                                        -nn = Maximum allocation-OK percentage
  1156.  
  1157.  Output:        Progress is reported with output like the "ca" command,
  1158.                 error messages will be given as appropriate
  1159.                 All files are recovered one by one using the "saveto"
  1160.                 command automatically on each selected LSN from the list.
  1161.  
  1162.  Remarks:       See "saveto" and "delshow" command
  1163.                 LSN list is the find-result list as shown with "delshow"
  1164.                 It can be edited using "export" or "log" + "delshow" and
  1165.                 imported again using "import", to make specific selections
  1166.  
  1167.                 If a path for the deleted file can be resolved, it will
  1168.                 also be included in the saved copy. If the directories
  1169.                 do not exist they will be created.
  1170.                 This means a whole directory-tree can be undeleted in
  1171.                 one operation, while retaining the structure.
  1172.  
  1173.  
  1174.  DELWIPE [w;t][p] = Wipe sectors in list with pattern [p], wildcard [w], and
  1175.  WIPELST [w;t][p]   threshold [t]. WIPELST is a synonym.
  1176.  
  1177.  Purpose:       Wipe sectors in the (delete) list with a pattern
  1178.                 This makes deleted files INVISIBLE for future undelete commands
  1179.  
  1180.  Parameters:    w           optional   wildcard selection for display or '!'
  1181.  
  1182.                 t           optional   +nn = Minimum allocation-OK percentage
  1183.                                        -nn = Maximum allocation-OK percentage
  1184.  
  1185.                                        default: *;-100 ==> all except 100% ones
  1186.  
  1187.                 p           optional   The pattern to use for wiping, it can
  1188.                                        be any lenth upto 256 bytes
  1189.                                        default: DfsWiped
  1190.  
  1191.  Output:        Progress is reported with one line per file (file-info list),
  1192.                 or a single dot per sector when selection overruled with '!'
  1193.  
  1194.  Remarks:       '!' as first parameter will overrule the normal file-display
  1195.                 and validation, and wipe EACH SECTOR in the list.
  1196.                 Wiping file-list sectors (from delfind), is intended to clean
  1197.                 the disk from obsolete file-info (Fnode's), making 'delfind'
  1198.                 returning less deleted files the next time.
  1199.                 The files wiped CAN NEVER BE UNDELETED ANYMORE!
  1200.                 See also "wipe" and "delshow" command
  1201.  
  1202.  
  1203.  MEM  [c|lsn] [#] = Store LSN in MEMory list at loc #, or limit mem list-size
  1204.  
  1205.  Purpose:       Add an LSN to the LSN memory list for later use with .NNN
  1206.  
  1207.  Parameters:    c       optional   Clear command, limit list-size to # entries
  1208.  
  1209.                 lsn     optional   LSN to add to the list, special values are:
  1210.                                    x, u, d, t for Xtra, Up, Down and This
  1211.  
  1212.                 #       optional   memory location to store lsn, or limit
  1213.  
  1214.  Output:        none
  1215.  
  1216.  Remarks:       The LSN memory can be listed using "list" [+f]
  1217.                                                                               
  1218.  
  1219.  SORT [+|-][u]    = Sort the LSN list using specified options
  1220.  
  1221.  Purpose:       Sort the list ascending/descending, remove duplicates
  1222.  
  1223.  Parameters:    +|-     optional   Sort ascending (+) or descending (-)
  1224.                                    default is ascending
  1225.  
  1226.                 u       optional   Make list unique by removing all duplicates
  1227.  
  1228.  Output:        none
  1229.  
  1230.  
  1231.  TRANS l|b|c|p xx = Translate and display value 'xx' as Lsn, Bios, Chs and Psn
  1232.  
  1233.  Purpose:       Translate value xx to 4 possible representations
  1234.  
  1235.  Parameters:    l|b|c|p optional   type specifier for input value (xx)
  1236.                                    l = lsn, logical sector number
  1237.                                    b = bio, 3 hex-byte CHS, as in part-table
  1238.                                    c = chs, 3 decimal values; cyl, head, sector
  1239.                                    p = psn, physical sector number
  1240.  
  1241.                 xx      optional   input value(s) to translate
  1242.  
  1243.                                    The default is the 'this' value (as lsn)
  1244.  
  1245.  Output:        One line with all 4 possible representations of the value 'xx'
  1246.  
  1247.  Remarks:       This function is usefull to calculate values for partition-
  1248.                 table entries or CHS values.
  1249.                 The same functionality is used in the 'list +g' command
  1250.                 against each sectornumber in the list.
  1251.  
  1252.  
  1253.  .NNN        [id] = Display numbered FS-entity marked .NNN from a sector list
  1254.  
  1255.  Purpose:       Display one of the entries from the list last shown
  1256.                 It can be applied on Directory- as well as Allocation-lists
  1257.                 The number (NNN) to use is displayed to the left of the list
  1258.  
  1259.  Parameters:    NNN                The zero-based decimal entry number to show
  1260.  
  1261.                 id      optional   Identifier for LSN list (see list command)
  1262.  
  1263.  Output:        Sector display, format selected based on sector-contents
  1264.  
  1265.  
  1266.  Enter        = down in hierachy (Enter = down)
  1267.  
  1268.  Purpose:       Display the next, most likely wanted, sector
  1269.  
  1270.  Parameters:    none
  1271.  
  1272.  Output:        Sector display, format selected based on sector-contents
  1273.  
  1274.  
  1275.  u            = up in hierachy
  1276.  
  1277.  Purpose:       Display the sector that is higher in the hierarchy (parent)
  1278.  
  1279.  Parameters:    none
  1280.  
  1281.  Output:        Sector display, format selected based on sector-contents
  1282.  
  1283.  
  1284.  x            = Extra LSN
  1285.  
  1286.  Purpose:       Display the sector marked as eXtra
  1287.  
  1288.  Parameters:    none
  1289.  
  1290.  Output:        Sector display, format selected based on sector-contents
  1291.  
  1292.  
  1293.                                                                               
  1294.  SLT [t i s m]   = Show SLT for 'type', at index i, size s, error-mask m
  1295.  
  1296.  Purpose:       Display (selection of) the Sector Lookup Table
  1297.  
  1298.  Parameters:    t       optional   Sector-types to include in the displayed
  1299.                                    list. Default is all types ('*')
  1300.                                    Types are same as specified for 'f' cmd
  1301.  
  1302.                 i       optional   Start index in the SLT to display,
  1303.                                    '+' and '-' show next/previous screenfull
  1304.                                    'a' will show entire SLT
  1305.  
  1306.                 s       optional   Number of entries to display, default will
  1307.                                    result in one screenfull; '*' = rest of SLT
  1308.  
  1309.                 m       optional   Error filtering mask, * = all errors
  1310.                                    4-digit Hexadecimal value, each set bit
  1311.                                    will include a specific error value.
  1312.                                    When prefixed with a '+' sign, the ouput
  1313.                                    will be verbose (error-text & path+filename)
  1314.  
  1315.  Output:        One line for each entry in the SLT, containing:
  1316.                         LSN        Start LSN for a range of sectors
  1317.                         size       Number of sectors in the range
  1318.                         ref        Other sector refering to this range (fnode)
  1319.                         type       Type of the sectors in the range
  1320.                         error      4-digit Hexadecimal error value:
  1321.  
  1322.                   0x00000001  Linked to some structure, but not in bitmap
  1323.                   0x00000002  Allocated in bitmap, but no known link
  1324.                   0x00000004  HPFS shortname does not match DIR name
  1325.                   0x00000008  Fnode is a directory but DirFlag is not set
  1326.                   0x00000010  Fnode datalength greater than Dir-entry size
  1327.                   0x00000020  Fnode datalength smaller than Dir-entry size
  1328.                   0x00000040  Fnode datalength greater than allocated size
  1329.                   0x00000080  Fnode datalength smaller than allocated size
  1330.                   0x00000100  Checksum value is incorrect
  1331.                   0x00001000  LSN does not point to valid dirblock
  1332.                   0x00002000  LSN does not point to valid Fnode
  1333.                   0x00004000  LSN does not point to valid Allocation sector
  1334.                   0x00008000  LSN is too large for this volume
  1335.  
  1336.  Remarks:       Sector ranges might overlap, the smallest matching range will
  1337.                 hold the best identification for a specific sector.
  1338.                 The start-index will default to the position of the sector
  1339.                 last searched using the 'i' cmd.
  1340.                 If needed the SLT will be built in a background thread.
  1341.  
  1342.  
  1343.  ID [xx]      = Identify, using sector lookup table
  1344.  
  1345.  Purpose:       Display the type for a specific sector and one major reference
  1346.  
  1347.  Parameters:    xx      optional   LSN of sector to identify, default is
  1348.                                    the current sector
  1349.  
  1350.  Output:        One line specifying corresponding SLT entry, followed by
  1351.                 a line specifying the type of the sector itself and a
  1352.                 sector display of the 'ref' sector, in a format based
  1353.                 on sector-contents
  1354.  
  1355.  Remarks:       This function is extremely usefull to relate file-data sectors
  1356.                 from fragmented files to the Fnode for the file.
  1357.                 It will tell you exactly to wich file a certain sector belongs.
  1358.                                                                               
  1359.  LOG       [file] = Log (append) to 'file' (.log); (No file => stop logging)
  1360.  
  1361.  Purpose:       Close current LOG, open new and capture DFS output in it
  1362.  
  1363.  Parameters:    File specification
  1364.                 If no parameter is specified, logging is stopped.
  1365.  
  1366.  Output:        Concatenated output of DFS commands given after the
  1367.                 'log' command, upto next 'log' or 'q' command.
  1368.                 ANSI control characters for colors and cursor-positioning
  1369.                 are not written to the logfile.
  1370.  
  1371.  Remarks:       There is no check on available space on the destination
  1372.                 drive, file may end up empty if disk(ette) is full.
  1373.                 The same logfile specification can be used more than once,
  1374.                 output will be concatenated.
  1375.                 On each 'log' command the current logfile will be closed.
  1376.  
  1377.  
  1378.  TRACE [lvl]  = Set trace level for DFS internal functions
  1379.  
  1380.  Purpose:       Investigate unexpected behaviour and debug DFS
  1381.  
  1382.  Parameters:    lvl     optional   Trace level; 0 = no trace
  1383.  
  1384.  Output:        The resulting trace-level, after this the output will be
  1385.                 normal output mixed with extra trace information showing
  1386.                 API return-codes and DFS internal variables
  1387.  
  1388.  Remarks:       Only available in the special DFSTRACE.EXE version
  1389.  
  1390.  
  1391.  PRIO  [lvl]  = Set relative priority of the DFS main thread
  1392.  
  1393.  Purpose:       Increase (search) speed with +, or decrease system impact
  1394.  
  1395.  Parameters:    lvl     optional   Prority level; + and ++ = high(est),
  1396.                                                   - and -- = low(est)
  1397.  
  1398.  Output:        The resulting prio-level
  1399.  
  1400.  Remarks:       When running on low(est) priority in the background, DFS
  1401.                 will almost come to a halt.
  1402.  
  1403.  q                = Quit DFSee OS2: 3.05 30-08-99-99 (c) 1994-1999; Jan van Wijk
  1404.  
  1405.  Purpose:       Exit DFS program
  1406.  
  1407.  Remarks:       Opened physical disk and logfile will be closed on exit
  1408.                 Asynchronious running threads will be aborted.
  1409.  
  1410.  
  1411.  CD [path]    = Change current Directory
  1412.  
  1413.  Purpose:       Change both the current directory and the current drive
  1414.  
  1415.  Parameters:    path    optional   Absolute or relative path specification
  1416.  
  1417.  Output:        The resulting current drive and directory
  1418.  
  1419.  Remarks:       '.' and '..' can be used in the relative path specification
  1420.                                                                               
  1421.  RUN mf [arg] = Run a REXX macro from DFS
  1422.  
  1423.  Purpose:       Execute a REXX script using the 'DFS' environment
  1424.  
  1425.  Parameters:    mf      mandatory  Macro file specification
  1426.  
  1427.                 arg     optional   Arguments to the REXX macro
  1428.  
  1429.  Output:        Any output from the REXX macro including (OS/2) commands
  1430.                 executed from the macro.
  1431.  
  1432.  Remarks:       DFS commands can be issued from within the macro, this
  1433.                 is the default environment (Address DFS).
  1434.                 Commands for CMD.EXE must be addressed using 'Address Cmd'
  1435.  
  1436.                 The following REXX variables will be available after
  1437.                 each executed DFS command from a macro:
  1438.  
  1439.                 rc            The returncode from the DFS command
  1440.  
  1441.                 dfs_disknr    Physical disk number currently open
  1442.                 dfs_partid    Partition-id for selection with "part"
  1443.                 dfs_drive     The opened drive letter, including a colon.
  1444.                 dfs_afsys     The attached filesystem, like "HPFS" or "FAT"
  1445.                 dfs_sect      The last retrieved sector(s), binary buffer
  1446.                 dfs_type      Type of last retrieved sector, this is a string
  1447.                               starting with the type-character (see 'F' cmd)
  1448.                               followed by a textual description.
  1449.  
  1450.                 dfs_this      SN of the last retrieved sector
  1451.                 dfs_down      SN of most likely sector to retrieve now
  1452.                 dfs_up        SN of sector up in hierarchy
  1453.                 dfs_next      SN of next in sequence
  1454.                 dfs_prev      SN of previous in sequence
  1455.                 dfs_down      SN of up in hierarchy
  1456.  
  1457.                 dfs_number    The number of disks or partitions resolved,
  1458.                               from the commands "disk" and "part 0" or
  1459.                               "part" respectively.
  1460.  
  1461.                 dfs_sn.0      Number of sector-numbers in the SN stem variable
  1462.                 dfs_sn.n      nth sector-number in the SN stem variable, coming
  1463.                               from DFS output for directories and allocation.
  1464.                               They correspond to the '.NNN' command
  1465.  
  1466.                               Note: SN's are in an 8-digit Hexadecimal format
  1467.  
  1468.  
  1469.                 REXX is dynamically loaded, when the run-command is exectuted
  1470.                 It requires REXX.DLL and REXXAPI.DLL in the libpath.
  1471.  
  1472.  
  1473.  COPYOUTPUT [stem-name]      Copy output from last-command to REXX stem-var
  1474.  
  1475.  Purpose:       Allow output to be captured and processed from REXX
  1476.  
  1477.  Parameters:    stem    optional   name of stem variable, ending in a '.'
  1478.                         default:   "dfs_output."
  1479.  
  1480.  Output:        none
  1481.  
  1482.  Remarks:       The <stem>.0 will hold the number of lines
  1483.                 <stem>.1 through <stem>.n the actual cmd-output
  1484.  
  1485.                 ==> This command is temporarily disabled in version 2.73 to
  1486.                     avoid a trap ona 'vol' command on HPFS while logging
  1487.                                                                               
  1488.  
  1489.  SCAN [wr [NoId]] = Scan bad-sectors; use read/Write verify; No automatic id
  1490.  
  1491.  Purpose:       Identify bad sectors on a physical disk or logical volume
  1492.  
  1493.  Parameters:    write   optional   'w' to use full read/write/verify sequence
  1494.  
  1495.                 NoId    optional   'n' to disable automatic SLT lookup
  1496.  
  1497.  Output:        Progress indication based on sector-numbers, and one line for
  1498.                 each bad-sector found, plus an SLT display of a related sector
  1499.                 like the fnode, if automatic SLT display is enabled.
  1500.  
  1501.  Remarks:       For REXX, the dfs_sn.0 stem variable will hold the number of
  1502.                 bad-sectors found and dfs_sn.1 through dfs_sn.n the actual
  1503.                 bad sector numbers (can be shown with the 'list' command)
  1504.  
  1505.                 Without the write option, only a single 'read' will be done
  1506.                 for each sector, this can be executed on a running system
  1507.                 with open files on the disk/volume to be checked.
  1508.  
  1509.                 With the write option a "read/write-inverse/read/write-normal"
  1510.                 sequence is done for each sector with contents checking.
  1511.                 The contents of each sector will stay the same, so the function
  1512.                 can be safely executed on formatted disks with live data.
  1513.                 This sequence takes at least 4 times more time to complete
  1514.                 and also, for safety, the disk will be locked. This means that
  1515.                 the write option can only be used when the complete physical
  1516.                 disk is not being used.
  1517.  
  1518.  Remarks:       Also available for REXX in the dfs_sn. stem variable
  1519.  
  1520.  
  1521.  SCREEN [arg] = Switch output to the screen on or off
  1522.  
  1523.  Purpose:       Allow output to logfile only
  1524.  
  1525.  Parameters:    arg     optional   'on' or 'off' to switch mode
  1526.  
  1527.  Output:        none
  1528.  
  1529.  Remarks:       The returncode (rc from REXX) will indicate the setting for
  1530.                 screen output: 0 indicates screen switched on
  1531.                                1 indicates screen switched off
  1532.  
  1533.  
  1534.  SEP separ    = Specify a different separator character for multiple commands
  1535.  
  1536.  Purpose:       Allow use of the current separator-character in commands,
  1537.                 while still allowing multiple commands to be specified in
  1538.                 a single commandline.
  1539.  
  1540.  Parameters:    separ   mandatory  One character being the new separator
  1541.  
  1542.  Output:        none
  1543.  
  1544.  Remarks:       If part of a multi-command itself, the 'sep; command needs
  1545.                 to be terminated with the current (old) separator.
  1546.                 The rest of the multi-command uses the new value.
  1547.  
  1548.  Example:       dfs sep ~#log inifiles~part d~fos2.###~q
  1549.  
  1550.  
  1551.  WIN   [col][row] = Reset display to windowing mode, optional resize display size
  1552.  NOWIN [col][row] = Reset display to cmd-line  mode, optional resize display size
  1553.  
  1554.  Purpose:       Switch to desired mode, either classic command-line based (NOWIN),
  1555.                 or windowed using a large scroll-buffer and command-history (WIN)
  1556.  
  1557.  Parameters:    col     optional   The number of columns to use in the display
  1558.                 row     optional   The number of rows    to use in the display
  1559.  
  1560.  Output:        Screen refresh in selected mode, and display of screen sizes
  1561.  
  1562.  Remarks:       To set the screen size, the underlying OS command 'mode xx,yy'
  1563.                 is used. Operating system limits regarding size still apply.
  1564.  
  1565.  Example:       win 132 43
  1566.  
  1567.                                                                               
  1568. Command reference, FDISK specific commands
  1569. ------------------------------------------
  1570.  
  1571. Active filesystem : FDISK, specific commands are:
  1572.  
  1573.  DISK|WALK  [disk]           [!] = Select disk, show the MBR, walk EBR chain
  1574.  CLEANUP    [disk              ] = Cleanup partition-chain, fix minor errors
  1575.  DELETE     pid [disk   [clean]] = Delete one or more partitions, clean=zero
  1576.  DFSIBMGR   [disk              ] = Create new bootmanager image for 'create'
  1577.  DOS2OS     pid [disk          ] = Change FAT-BR bootcode from DOS to OS/2
  1578.  FIXEXT     [disk  [to  [from]]] = Fix ext-partition types to standard value
  1579.  NEWMBR     [disk       [clean]] = Refresh MBR bootcode, [clean] = delete all
  1580.  PLIST      p|f|e|m|b [disk [e]] = Part-list on: part|free|ebr|mbr|boot [ebr]
  1581.  SETACCESS  pid [hide|vis|multi] = Make partition 'pid' accessible or hidden
  1582.  SETBOOT    opt[:opt-parameters] = Bootmanager setup and reboot => 'setboot ?'
  1583.  SETNAME    pid        [BM-name] = Set or reset bootmanager name for partition
  1584.  SETTYPE    pid  disk new  [old] = Change partition-type from old to new value
  1585.  STARTABLE  pid          [multi] = Make partition 'pid' startable (bootable)
  1586.  TYPE       [system-type       ] = Show system-type description (for 00..ff)
  1587.  
  1588.  CREATE  plt  type  [size  [loc  [pos  [BM-name]]]] = Create a new partition
  1589.  CR      plt  : Primary/Logical identifier;          log | prim | l | p
  1590.          type : System-type for new partition;       hex | symbolic-name
  1591.          size : Desired size for the partition;      number[[,d|x]m|c|s] | *
  1592.          loc  : Location to place new partition;    @freespace-id | disk | *
  1593.          pos  : Position in loc-area;     [+|-|@|{|}]number[[,d|x]m|c|s] | *
  1594.      BM-name  : Add to the bootmanager-menu using this name
  1595.  
  1596.  For an up-to-date list of commands, use the '?' command
  1597.  
  1598.  FDISK specific sector types (see ??? command)
  1599.                'X' = Unidentified data
  1600.  
  1601.  
  1602.  
  1603.  WALK       [disk]           [!] = Select disk and walk MBR/EBR chain, reset
  1604.  
  1605.  Purpose:       Show all partitioning information for the specified disk
  1606.  
  1607.  Parameters:    dsknr   optional   disk nr, default is current if open or 1
  1608.                 !       optional   reset previously forced geometry
  1609.  
  1610.  Output:        Disk Geometry, MBR and all linked EBR's in partition format
  1611.  
  1612.  Remarks:       The dfs_number variable for REXX will be set to nr-of-disks
  1613.                 See also: DISK command
  1614.  
  1615.                                                                               
  1616.  PLIST     p|f|e|m|b|w|l [d [r]] = list: part|free|ebr|mbr|boot|walk|lvm
  1617.  
  1618.  Purpose:       Show one of several lists of partition related information
  1619.  
  1620.  Parameters:    type    optional   type of list wanted: p|f|e|m|b|w|l
  1621.  
  1622.                             part   normal partitions
  1623.                             free   freespace area's
  1624.                             ebr    EBR-chain
  1625.                             mbr    MBR partition-table entries
  1626.                             boot   Bootsectors for all partitions
  1627.                             walk   MBR's and all EBR's (as WALK cmd)
  1628.                             lvm    LVM volume information sectors
  1629.  
  1630.                 d       optional   Disk to operate on, default is all disks
  1631.  
  1632.                 r       optional   Flag to include extra-info on related
  1633.                                    sectors like EBR and/or LVM.
  1634.  
  1635.  Output:        The list of the requested type with info on start- and
  1636.                 end-sector numbers, sizes and more.
  1637.  
  1638.  Remarks:       none
  1639.  
  1640.  
  1641.  CLEANUP    [disk              ] = Cleanup partition-chain, fix minor errors
  1642.  
  1643.  Purpose:       Cleanup minor inconsistencies in partition-chain, like remove
  1644.                 of 'empty' extended partitions and recalculation of the total
  1645.                 size of the extended-container.
  1646.  
  1647.  Parameters:    disk    optional   Disk to operate on, default is all disks
  1648.  
  1649.  Output:        Progress information and confirmation messages
  1650.  
  1651.  Remarks:       Inconsistencies can be caused by several operations, using
  1652.                 DFSee, other FDISK versions or Partition Magic.
  1653.                 Resizing and deleting with PQmagic or a 'delete' with DFSee
  1654.                 can cause 'empty' extended containers.
  1655.  
  1656.  
  1657.  DFSIBMGR   [disk              ] = Create new bootmanager image for 'create'
  1658.  
  1659.  Purpose:       Create a DFSIBMGR.IMG image-file from the bootmanager installed
  1660.                 on the specified disk, to be used later on 'create' commands
  1661.                 when creating new bootmanager partitions.
  1662.  
  1663.  Parameters:    disk    mandatory  Disk to get the bootmanager image from
  1664.  
  1665.  Output:        Progress information
  1666.  
  1667.  Remarks:       The 'create' command will automatically search for an image
  1668.                 with this name when a type 0x0a = BMGR partition is created.
  1669.                                                                               
  1670.  
  1671.  FIXEXT     [disk  [to  [from]]] = Fix ext-partition types to standard value
  1672.  
  1673.  Purpose:       Change non-standard values (0x0f) back to the standard 0x05
  1674.                 value so operating systems like DOS and OS/2 cann access the
  1675.                 logical volumes inside this extended-partition container.
  1676.  
  1677.  Parameters:    disk    optional   Disk to operate on, default is all disks
  1678.  
  1679.                 to      optional   New system-type for EBR, default is 0x05
  1680.  
  1681.                 from    optional   Existing system-type, default is 0x0f
  1682.  
  1683.  Output:        Progress information and confirmation messages
  1684.  
  1685.  Remarks:       The non-standard type 0x0f is introduced by Win9x combined
  1686.                 with the FAT32 filesystem. These allow partitions larger
  1687.                 then 2Gb and spanning the 8Gb BIOS limit (1024 cylinders).
  1688.                 Using the 0x0f type prevents older operating systems to
  1689.                 access, and possibly damage, the new partitions.
  1690.  
  1691.                 When all FAT16 partition are below cylinder 1024, there
  1692.                 seems to be NO VALID REASON to use this type, and it can
  1693.                 be safely changed back to 0x05 to allow access by DOS,
  1694.                 OS/2 and others.
  1695.  
  1696.                 I can NOT GUARANTEE full cooperation with multiple
  1697.                 operating systems, but my experiences are positive.
  1698.  
  1699.  NEWMBR     [disk       [clean]] = Refresh MBR bootcode, [clean] = delete all
  1700.  
  1701.  Purpose:       Create or refresh the boot-code in the master boot record
  1702.  
  1703.  Parameters:    disk    optional   Disk to operate on, default is all disks
  1704.  
  1705.                 clean   optional   Make the partition-table empty, effectively
  1706.                                    deleting all existing partitions
  1707.  
  1708.  Output:        Progress information and confirmation messages
  1709.  
  1710.  Remarks:       none
  1711.  
  1712.  
  1713.  SETNAME    pid        [BM-name] = Set or reset bootmanager name for partition
  1714.  
  1715.  Purpose:       Set or clear the name for a partition, adding it to the menu
  1716.  
  1717.  Parameters:    pid     mandatory  Partition id, see PART and MAP display
  1718.  
  1719.                 BM-name optional   When specified, this is the name to be
  1720.                                    used in the bootmanager menu. (length 8)
  1721.  
  1722.                                    When not specified, the partition will
  1723.                                    be removed from the menu by clearing the
  1724.                                    name in the bootmanager administration.
  1725.  
  1726.  Output:        Progress information and confirmation messages
  1727.  
  1728.  Remarks:       none
  1729.                                                                               
  1730.  
  1731.  SETTYPE    pid  disk new  [old] = Change partition-type from old to new
  1732.  
  1733.  Purpose:       Change the system-type for a partition to a new value
  1734.  
  1735.  Parameters:    pid     mandatory  Partition id, see PART and MAP display
  1736.  
  1737.                 disk    Disknr, * or 0, used for selection verification
  1738.  
  1739.                 new     mandatory  New system-type, hexadecimal or symbolic
  1740.  
  1741.                         The most used system-types are:
  1742.  
  1743.                         hex   sym
  1744.  
  1745.                         01   FAT12 =   FAT12
  1746.                         04   FAT16 =   FAT16 < 32 Mb
  1747.                         05   EXT   =   Extended partion (chain)
  1748.                         06   FAT   =   FAT16 > 32 Mb
  1749.                         07   IFS   =   Installable File system
  1750.                         07   HPFS  =   IFS, HPFS (alias)
  1751.                         07   NTFS  =   IFS, NTFS (alias)
  1752.                         0a   BMGR  =   OS/2 Bootmanager
  1753.                         0b   FAT32 =   Primary  FAT32 I13
  1754.                         0f   BIGX  =   Large extended (PQMAGIC 4.0)
  1755.                         82   SWAP  =   Linux swap partition
  1756.                         83   EXT2  =   Linux EXT2 data partition
  1757.                         eb   BEOS  =   BeOS filesystem
  1758.                         fe   PS2S  =   PS/2 system partition
  1759.  
  1760.                 old     optional   Existing system-type, for verification
  1761.  
  1762.  Output:        Progress information and confirmation messages
  1763.  
  1764.  Remarks:       Only the type of the partition in the partition-table will
  1765.                 be changed. The actual internal format of the partition is
  1766.                 not affected by this operation.
  1767.  
  1768.                 Note that the 05 an 0f (extended) types cannot not be used
  1769.                 by the 'SETTYPE' command, but they can be used in 'FIXEXT'
  1770.  
  1771.                 You can get an overview of all types with the 'TYPE' command.
  1772.  
  1773.  
  1774.  SETACCESS  pid [hide|vis|multi] = Make partition 'pid' accessible or hidden
  1775.  
  1776.  Purpose:       .
  1777.  
  1778.  Parameters:    pid     mandatory  Partition id, see PART and MAP display
  1779.  
  1780.                 hide    optional   Make this partition hidden (invisible)
  1781.                 vis     optional   Make this partition visible, hide others
  1782.                 multi   optional   Make this partition visible, but do allow
  1783.                                    multiple visible primary partitions per disk
  1784.  
  1785.  Output:        Progress information and confirmation messages
  1786.  
  1787.  Remarks:       The partition will be made visible (types 01 .. 0f).
  1788.                 All other primaries on the same disk will be made hidden,
  1789.                 except when the 'multi' parameter was given.
  1790.                                                                               
  1791.  SETBOOT    opt[:params]         = Bootmanager setup and reboot options
  1792.  
  1793.  Purpose:       Configure BMGR; Set partition to boot, and (optional) boot
  1794.  
  1795.  Parameters:    opt     mandatory  Option letter/word for the setboot action
  1796.  
  1797.                 params  optional   Depending on the selected option:
  1798.  
  1799.                       q:disk       (query BM settings on 'disk')
  1800.                       t:timeout    (seconds or NO)
  1801.                       m:mode       (normal or advanced)
  1802.                       x:num        (set system-index to 'num')
  1803.                  [0..5]:name       (set system 0..5 to 'name')
  1804.                     ibd:d          (reboot from drive d)
  1805.                     iba:BM-name    (reboot from BM-name)
  1806.                       n:d          (set next-boot to drive d)
  1807.                       b            ([shutdown] and reboot now)
  1808.  
  1809.  
  1810.       System-indexes 0..5 have the following meaning:
  1811.  
  1812.       0  default system,  Booted when no other selection is made from the
  1813.                           menu, or when the timeout is set to NO.
  1814.  
  1815.    1..3  fallback range   On a failing boot on one of these systems, the
  1816.                           next boot will be of the next lower-number
  1817.                           system (fallback scenario)
  1818.  
  1819.       4  force-reboot     Indicates the system-name to boot next time,
  1820.                           without display of the menu (forced).
  1821.                           This is used by the /iba:name option.
  1822.                           The name is automatically cleared on the next boot.
  1823.  
  1824.       5  last-booted      The system-name last booted using bootmanager.
  1825.                           This will also be the default when the default
  1826.                           system itself (0) is not set.
  1827.  
  1828.  Output:        Progress information and confirmation messages
  1829.  
  1830.  Remarks:       For the reboot options, an external program is needed that
  1831.                 does the actual reboot. The name for this program is the
  1832.                 same as for DFSEE, with 'X.exe' added to name.
  1833.                 So, for DOS this would be DFSDOSX.exe, for OS/2 it is DFSX.exe
  1834.                 and for NT it is DFSNTX.exe. It will be searched for in the
  1835.                 same path as DFSee was found and in the current directory.
  1836.                 A parameter with value "reboot" is passed to the program.
  1837.  
  1838.                 - The reboot from DFS.EXE requires DOS.SYS to be loaded!
  1839.                 - The reboot from DFSDOS will probably NOT work on Win9x
  1840.                   using the internal reboot function, copying the DFSNTX.EXE
  1841.                   to DFSDOSX.EXE should work for Win9x however.
  1842.  
  1843.  
  1844.  STARTABLE  pid          [multi] = Make partition 'pid' startable (bootable)
  1845.  
  1846.  Purpose:       Make the selection partition the 'active' one to be booted
  1847.  
  1848.  Parameters:    pid     mandatory  Partition id, see PART and MAP display
  1849.  
  1850.                 multi   optional   Allow multiple primary partitions per disk
  1851.  
  1852.  Output:        Progress information and confirmation messages
  1853.  
  1854.  Remarks:       The partition status will be set to 'active' (0x80) and,
  1855.                 if needed the partition will be made visible.
  1856.                 All other primaries on the same disk will be made hidden,
  1857.                 except when the 'multi' parameter was given.
  1858.                                                                               
  1859.  CREATE  plt  type  [size  [loc  [pos  [BM-name]]]] = Create a new partition
  1860.  
  1861.  Purpose:       Create one new partition in an area that is now freespace
  1862.  
  1863.  Parameters     plt     mandatory  Primary/Logical identifier;
  1864.  
  1865.                                    log  | l   Logical partition
  1866.  
  1867.                                    prim | p   Primary partition
  1868.  
  1869.  
  1870.                 type    mandatory  System-type for new partition;
  1871.  
  1872.                                    hex        Hexa-decimal value 0..0xff
  1873.  
  1874.                                    symbolic   A name from the pre-defined
  1875.                                               set of partition-types.
  1876.                                               (see SETTYPE for a list)
  1877.  
  1878.  
  1879.                 size    optional   Desired size for the partition;
  1880.  
  1881.                                    *          Use maximum size for the
  1882.                                               selected freespace-area
  1883.  
  1884.                           number[[,d|x]m|c|s] Specific value, hex or decimal.
  1885.                                               Megabytes, Cylinders or Sectors.
  1886.                                               Default: decimal Megabytes
  1887.  
  1888.  
  1889.                 loc     optional   Location to place new partition;
  1890.  
  1891.                                    *          Use first 'matching' area
  1892.  
  1893.                                    @fsp-id    Specific freespace area
  1894.  
  1895.                                    disk       Use first matching area on
  1896.                                               the specified disk
  1897.  
  1898.  
  1899.  
  1900.  
  1901.                 pos     optional   Position in loc-area;
  1902.  
  1903.                                    *          Default position (at start)
  1904.  
  1905.                [+|-|@|{|}]number[[,d|x]m|c|s] Specific value, hex or decimal
  1906.                                               Megabytes, Cylinders or Sectors.
  1907.                                               Default: decimal Megabytes
  1908.                                               Prefix modifiers are:
  1909.                                    +          Relative to start or area
  1910.                                    -          Relative to end of area
  1911.                                    @          Absolute from start of disk
  1912.                                    {          Relative, before 1024-cyl limit
  1913.                                    }          Relative, after  1024-cyl limit
  1914.  
  1915.                                               Note: The corresponding value
  1916.                                                     with the prefix can be 0
  1917.                                                     or empty
  1918.  
  1919.             BM-name     optional   Add to the bootmanager-menu using this name
  1920.  
  1921.  
  1922.  Output:        Progress information and confirmation messages
  1923.  
  1924.  Remarks:       none
  1925.  
  1926.                                                                               
  1927.  DELETE     pid     [disk  [clean]]         = Delete on or more partitions
  1928.  
  1929.  Purpose:       Delete one or more partitions.
  1930.  
  1931.  Parameters     pid   : Partition-id for 1 partition or '*' for all partitions
  1932.                 disk  : Physical disk number for 1 disk or '*' for all disks
  1933.                 clean : Zero out complete table-entry, not just the system-type
  1934.  
  1935.  Output:        Progress information and confirmation messages
  1936.  
  1937.  Remarks:       The partition will by default be deleted by changing the
  1938.                 system-type to hex '00'. This is the minimum required change.
  1939.                 This allows for relatively easy recovery or rollback.
  1940.                 The 'clean' option forces the complete table-entry, 16-bytes
  1941.                 to be set to all zeroes.
  1942.  
  1943.                 Note that the extended-boot-records (EBR) are NEVER removed
  1944.                 from the EBR chain by the delete command. Even if an EBR
  1945.                 remains empty, it is left in the chain. Most operating systems
  1946.                 have no problems with a setup like this.
  1947.  
  1948.                 You can use the 'cleanup' command to clean this up when needed.
  1949.                 A subsequent 'CREATE' will also clean the EBR-chain up.
  1950.  
  1951.  
  1952.  TYPE       [system-type       ] = Show system-type description (for 00..ff)
  1953.  
  1954.  Purpose:       Show short description for one, or all known system types
  1955.  
  1956.  Parameters:    type    optional   one system type to query
  1957.  
  1958.  Output:        Single line when one type queries, or 4 descriptions per
  1959.                 line covering all known system-types from 00 through ff
  1960.  
  1961.  Remarks:       none
  1962.  
  1963.  
  1964.  DOS2OS     pid [disk]           = Change FAT-BR bootcode from DOS to OS/2
  1965.  
  1966.  Purpose:       Replace DOS based bootcode by OS/2 based bootcode for FAT
  1967.  
  1968.  Parameters     pid   : Partition-id for 1 partition or '*' for all partitions
  1969.                 disk  : Physical disk number for 1 disk or '*' for all disks
  1970.  
  1971.  Output:        Progress information and confirmation messages
  1972.  
  1973.  Remarks:       This command is intended to prepare a partition for booting
  1974.                 OS/2 (FAT only), from a pure DOS environment.
  1975.                 Step 1) Partition using DFSee FDISK (make at least 1 FAT)
  1976.                 Step 2) reboot, to make DOS assign a drive-letter
  1977.                 Step 3) Format the FAT partition using std DOS FORMAT
  1978.                 Step 4) Use DFSEE DOS2OS command to make it OS/2 bootable
  1979.                 Step 5) xcopy a saved set of OS/2 files to the partition,
  1980.                         including OS2BOOT, OS2LDR etc
  1981.                 Step 6) Boot that partition as OS/2 (direct or through BMGR)
  1982.  
  1983.                                                                               
  1984. Command reference, FAT specific commands
  1985. ----------------------------------------
  1986.  
  1987. Active filesystem : FAT, specific commands are:
  1988.  
  1989.  \path-spec      = find and show file/directory relative to root (see find)
  1990.  ALLOC     [+|-] = Display allocation map for FAT, more [+] or less [-] detail
  1991.  CL              = Translate and display 'this' LSN as a cluster nr
  1992.  CL clust  [cmd] = Translate specified cluster-nr to LSN, display using 'cmd'
  1993.  FATSELECT [fat] = Select fat to be used (cached), fat = 1 or 2; default is 1
  1994.  FATSHOW  [*|nr] = Display contents of the FAT from memory, [nr] entries
  1995.  SPACE   [clust] = Show allocation for specified cluster or current LSN 'this'
  1996.  
  1997.  For an up-to-date list of commands, use the '?' command
  1998.  
  1999.  FAT specific sector types  (see ??? command)
  2000.              '1' = First  FAT area      '2' = Second FAT area
  2001.              '3' = Start 12-Bits FAT    '4' = Start 16-Bits FAT
  2002.              '8' = Start 32-Bits FAT
  2003.              '\' = Root directory
  2004.              'd' = Sub  directory       'D' = Directory data
  2005.              'I' = File data
  2006.              'X' = Bad sector-area
  2007.  
  2008.  
  2009.  ALLOC     [+|-] = Display allocation map for FAT, more [+] or less [-] detail
  2010.  
  2011.  Purpose:       Show usage and the distribution of data over the volume.
  2012.  
  2013.  Parameters:    + or -  optional   Show more or less detail by changing the
  2014.                                    the number of Kb represented by each char
  2015.  
  2016.  Output:        A single bitmap-graphic for the entire volume
  2017.  
  2018.  Remarks:       Boot-sector, both FAT's and the Root-directory are represented
  2019.                 in the first display=line using colors. The size of FAT/Root
  2020.                 is proportional to their real size and the percentage of used
  2021.                 entries in the root-directory is shown at the end of the line
  2022.  
  2023.  
  2024.  CL              = Translate and display 'this' LSN as a cluster nr
  2025.  
  2026.  Purpose:       Find out what cluster-nr corresponds to current LSN
  2027.  
  2028.  Parameters:    none
  2029.  
  2030.  Output:        The cluster number, or an error message when invalid
  2031.  
  2032.  
  2033.  
  2034.  CL clust  [cmd] = Translate specified cluster-nr to LSN, display using 'cmd'
  2035.  
  2036.  Purpose:       Display data using a cluster-nr instead of an LSN
  2037.  
  2038.  Parameters:    clust   mandatory  The cluster-nr of interest
  2039.  
  2040.                 cmd     optional   DFS generic command to execute with clust
  2041.                                    as its first and only parameter (like 'H')
  2042.  
  2043.  Output:        The output for the cmd, when no explicit cmd is specified this
  2044.                 will be the DFS default for the corresponding LSN, usualy a
  2045.                 display of that sector(s) in an appropriate format.
  2046.                                                                               
  2047.  FATREAD   [fat] = Read fat from disk into memory, fat = 1 or 2; default is 1
  2048.  
  2049.  Purpose:       Update the in-memory FAT from the disk-FAT
  2050.  
  2051.  Parameters:    fat     optional   Number of the disk-FAT, either 1 or 2
  2052.  
  2053.  Output:        none
  2054.  
  2055.  Remarks:       FAT12, FAT16 and FAT32 formats are supported
  2056.  
  2057.  
  2058.  FATWRITE  [fat] = Write-back fat memory to disk,  fat = 1 or 2; default is 1
  2059.  
  2060.  Purpose:       Update the on-disk FAT with the possibly changed in-memory FAT
  2061.  
  2062.  Parameters:    fat     optional   Number of the disk-FAT, either 1 or 2
  2063.  
  2064.  Output:        Message indicating success or failure
  2065.  
  2066.  Remarks:       This is a potentialy dangerous operation, also usualy both
  2067.                 FATs on the disk need to be in-sync. So 2 writes are needed.
  2068.  
  2069.  
  2070.  FATSHOW         = Display contents of the FAT from memory
  2071.  
  2072.  Purpose:       List all FAT-entries separately for analysis
  2073.  
  2074.  Parameters:    none
  2075.  
  2076.  Output:        A list of FAT-entries with 8 values in each line, <free>
  2077.                 <bad> and <eof> values are shown as such.
  2078.  
  2079.  
  2080.  SPACE   [clust] = Show allocation for specified cluster or current LSN 'this'
  2081.  
  2082.  Purpose:       Show size and fragmentation of allocated space for a cluster
  2083.  
  2084.  Parameters:    clust   optional   Cluster number
  2085.  
  2086.  Output:        A list of allocation-chunks with LSN's and sizes
  2087.  
  2088.  Remarks:       none
  2089.                                                                               
  2090.  
  2091.  
  2092. Command reference, NTFS specific commands
  2093. -----------------------------------------
  2094.  
  2095. Active filesystem : NTFS, specific commands are:
  2096.  
  2097.  CL              = Translate and display 'this' LSN as a cluster nr
  2098.  CL clust  [cmd] = Translate specified cluster-nr to LSN, display using 'cmd'
  2099.  FIXBOOT         = Recover NTFS bootsector from the spare-copy, if available
  2100.  MFT             = Translate and display 'this' LSN as an MFT record nr
  2101.  MFT  mft-recnr  = Calculate LSN for MFT record-nr and perform default display
  2102.  MIR [mft-recnr] = Calculate LSN for MFT-mirror record-nr, do default display
  2103.  MFTEXT          = Find all external MFT records (continuation for base-MFT)
  2104.  
  2105.  For an up-to-date list of commands, use the '?' command
  2106.  
  2107.  NTFS specific sector types  (see ??? command)
  2108.  
  2109.              'f' = MFT regular File     'z' = MFT deleted File
  2110.              'D' = MFT regular Dir      'y' = MFT deleted Dir
  2111.              'd' = Directory index
  2112.  
  2113.              For an up-to-date list, use the '???" command
  2114.  
  2115.  
  2116.  CL              = Translate and display 'this' LSN as a cluster nr
  2117.  
  2118.  Purpose:       Find out what cluster-nr corresponds to current LSN
  2119.  
  2120.  Parameters:    none
  2121.  
  2122.  Output:        The cluster number, or an error message when invalid
  2123.  
  2124.  
  2125.  
  2126.  CL clust  [cmd] = Translate specified cluster-nr to LSN, display using 'cmd'
  2127.  
  2128.  Purpose:       Display data using a cluster-nr instead of an LSN
  2129.  
  2130.  Parameters:    clust   mandatory  The cluster-nr of interest
  2131.  
  2132.                 cmd     optional   DFS generic command to execute with clust
  2133.                                    as its first and only parameter (like 'H')
  2134.  
  2135.  Output:        The output for the cmd, when no explicit cmd is specified this
  2136.                 will be the DFS default for the corresponding LSN, usualy a
  2137.                 display of that sector(s) in an appropriate format.
  2138.                                                                               
  2139.  
  2140.  
  2141.  FIXBOOT         = Recover NTFS bootsector from the spare-copy (saved by format)
  2142.  
  2143.  Purpose:       Fix corrupted bootsector for an NTFS partition
  2144.  
  2145.  Parameters:    none
  2146.  
  2147.  Output:        Progress and confirmation info
  2148.  
  2149.  Remarks:       This will locate the copy of the bootsector saved by format,
  2150.                 and when found copy it to the bootsector location (sector 0)
  2151.  
  2152.                 The partition-table info (type and size) must still be valid!
  2153.  
  2154.  
  2155.  MFT             = Translate and display 'this' LSN as an MFT record nr
  2156.  
  2157.  Purpose:       Calculate and display the MFT-record number from current LSN
  2158.  
  2159.  Parameters:    none
  2160.  
  2161.  Output:        The mft-record number, or 0xFFFFFFFF when not in an MFT record
  2162.  
  2163.  
  2164.  MFT [mft-recnr] = Calculate LSN for MFT record-nr and perform a default display
  2165.  
  2166.  Purpose:       Display a sector, probably an MFT-record, by specifying its
  2167.                 MFT number. The logical sector-number is based on the MFT-0
  2168.                 pointer in the boot-record an a calculated sectors-per-mft.
  2169.  
  2170.  Parameters:    mft-recnr          The record number for the MFT record
  2171.                                    0 is the first MFT, regarding the MFT itself
  2172.  
  2173.  Output:        Display of the MFT record contents, or an error message
  2174.  
  2175.  
  2176.  MIR [mft-recnr] = Calculate LSN for MFT-mirror record-nr, do default display
  2177.  
  2178.  Purpose:       Display a sector by specifying its MFT number as an index
  2179.                 in the MFT-mirror area. (effect as 'MFT' command)
  2180.  
  2181.  Parameters:    mft-recnr          The record number for the MFT record
  2182.  
  2183.  Output:        Display of the MFT record contents, or an error message
  2184.  
  2185.  Remarks:       The MFT mirror area only contains a subset (usually 16 records)
  2186.                 The main purpose for the MFT mirror is as a backup for the
  2187.                 important (system) files like the MFT and root directory.
  2188.  
  2189.  
  2190.  MFTEXT          = Find all external MFT records (continuation for base-MFT)
  2191.  
  2192.  Purpose:       Quickly find all MFT records that are continuations for others
  2193.  
  2194.  Parameters:    none
  2195.  
  2196.  Output:        Standard find-progress, and one line per hit
  2197.  
  2198.  Remarks:       Continuation MFT records link back to the base-MFT, this link
  2199.                 will be recorded in the 'up' shortcut. (command 'u')
  2200.                 From the base MFT-record, the first external continuation MFT
  2201.                 will be recorded in the 'xtra' shortcut (command 'x')
  2202.  
  2203.                 Existence of a continuation record is a sure sign for very
  2204.                 heavy fragmentation of the file in question.
  2205.  
  2206.  
  2207.  NTFS remarks:
  2208.  
  2209.  Date and time-information in the NTFS filesystem is stored as a time-offset
  2210.  in units of 100ns starting at 1st of januari 1601. It is  a 64 bit number.
  2211.  The date and time is stored as a Universal Coordinated Time (GMT) and
  2212.  displayed as such by DFSee. If you want timestamps to correspond to your
  2213.  local timezone, you can set the 'TZDFSEE' environment variable to a signed
  2214.  number of minutes, being the offset to GMT.
  2215.  
  2216.  
  2217.                                                                               
  2218. Command reference, HPFS specific commands
  2219. -----------------------------------------
  2220.  
  2221. Active filesystem : HPFS, specific commands are:
  2222.  
  2223.  \path-spec      = find and show file/directory relative to root (see find)
  2224.  ALLOC  [+]      = Show data-band allocation bitmaps, compact or [+] verbose
  2225.  ALBIT a [lsn s] = Set/reset allocation bit in bitmap for lsn-range
  2226.  AUTOBASE [t][l] = find the start of an HPFS partition by searching sectors
  2227.                    of types [t], default 'spad'; [l] is last valid sector
  2228.  BITMAP [xx,s,D] = Show bitmap at LSN xx, size s, in alloc or [D]ir format
  2229.  CA   [lsn][opt] = Check Allocation integrity for (current) fnode lsn
  2230.  CHECK   [drive] = Check filesystem integrity for drive-letter (CHKDSK)
  2231.  DELFIND [s] [o] = Find deleted files, name start with [s], using options [o]
  2232.  DIRMAP          = Show directory band allocation and usage map
  2233.  FINDROOT    [n] = find the Root directory without using the superblock
  2234.                    starting the search at LSN [n]
  2235.  FIXBOOT         = Create HPFS bootsector from template and partition-table
  2236.  FIXBS   [clear] = Update bad-sector table with LSN's from DFS badsec-list
  2237.  FIXCP           = Update superblock with found LSN for codepage info
  2238.  FIXCS           = Calculate checksums and write super- and spare-block
  2239.  FIXROOT         = Update superblock with found LSN for root-directory
  2240.  GETBS           = Read HPFS bad-sector table into DFS badsec-list
  2241.  PATH        [n] = Show all path-components for current fnode, upto root
  2242.  
  2243.  For an up-to-date list of commands, use the '?' command
  2244.  
  2245.  HPFS specific sector types  (see ??? command)
  2246.  
  2247.              'I' = File data            'E' = EA data
  2248.              'A' = ACL data             'B' = Boot area
  2249.              's' = HPFS superblock      'p' = HPFS spareblock
  2250.              'H' = Hotfix table         'h' = Hotfix data
  2251.              'x' = Bad sector-list      'X' = Bad sector
  2252.              'S' = Spare dirblocks
  2253.              'D' = Directory   Fnode    'y' = Deleted Dir Fnode
  2254.              'f' = File        Fnode    'z' = Deleted FileFnode
  2255.              'a' = Allocation  block    'Z' = Deleted All-block
  2256.              'd' = Directory block      'P' = Dir-band (free)
  2257.              'Q' = Dir-band bitmap      'c' = Codepage info
  2258.              't' = Codepage data        'i' = HPFS386 User-id
  2259.              'm' = Bitmap Tables        'M' = Bitmap data
  2260.  
  2261.              For an up-to-date list, use the '???" command
  2262.  
  2263.  
  2264.  AUTOBASE [t][l] = find the start of an HPFS partition by searching sectors
  2265.  
  2266.  Purpose:       Force a different partition start sector-nr for HPFS partition
  2267.  
  2268.  Parameters:    t       One or more sector-types to use in the search
  2269.                         default is "spad", Super, Spare, Alloc and Dirblock
  2270.                         f for fnode can also be used but is less reliable
  2271.                 sl      Sector-number to use as end for partition (optional)
  2272.  
  2273.  Output:        Search progress and final result when HPFS partition found
  2274.  
  2275.  Remarks:       Can be used if start of partition / partition-tables are bad
  2276.                 Use the "fs hpfs" command first to force HPFS mode.
  2277.                                                                               
  2278.  
  2279.  ALLOC  [+]      = Show data-band allocation bitmaps, compact or [+] verbose
  2280.  
  2281.  Purpose:       Show usage and the distribution of data over the volume.
  2282.  
  2283.  Parameters:    none
  2284.  
  2285.  Output:        A single bitmap-graphic for the entire volume or for each
  2286.                 allocation-band when verbose format is selected
  2287.  
  2288.  Remarks:       System-reserved and Directory-band are indicated with 'S'
  2289.                 and 'R' respectively. Other area's are filled in according
  2290.                 to the degree of usage (allocation)
  2291.  
  2292.  
  2293.  DIRMAP          = Show directory band allocation and usage map
  2294.  
  2295.  Purpose:       Show usage of the pre-allocated directory-band
  2296.  
  2297.  Parameters:    none
  2298.  
  2299.  Output:        A single bitmap-graphic showing the allocation of the
  2300.                 pre-allocated directory band.
  2301.  
  2302.  Remarks:       If 100% is allocated more directory information will be
  2303.                 allocated elsewhere on the volume.
  2304.  
  2305.  BITMAP [xx s D] = Show bitmap at LSN xx, size s, in alloc or [D]ir format
  2306.  
  2307.  Purpose:       Show a bitmape located at specified LSN, alloc or DIR format
  2308.  
  2309.  Parameters:    xx      mandatory  LSN of a bitmap sector
  2310.  
  2311.                 s       optional   size to dump:  1..63   specifies sectors
  2312.                                                  64..xxx  specifies bytes
  2313.                                    Default is 4 sectors (default bitmap size)
  2314.  
  2315.                 D       optional   Directory-format flag
  2316.  
  2317.  Output:        One bitmap-graphic for the specified bitmap LSN.
  2318.  
  2319.  Remarks:       Specifying an LSN that is not a bitmap-LSN will result in
  2320.                 a garbage bitmap display.
  2321.  
  2322.  
  2323.  ALBIT a lsn s   = Set/reset allocation bit in bitmap for lsn-range
  2324.  
  2325.  Purpose:       Manualy set or reset allocation bits in the bitmap
  2326.  
  2327.  Parameters:    a       mandatory  's', 'a' or '1' will set to "allocated",
  2328.                                    others will set to "free" state.
  2329.  
  2330.                 lsn     optional   Start LSN for the range, default is 'this'
  2331.  
  2332.                 s       optional   size for the LSN-range, default is 1
  2333.  
  2334.  Output:        none
  2335.  
  2336.  Remarks:       This is a potentialy dangerous operation.
  2337.                                                                               
  2338.  
  2339.  \path-spec      = find and show file/directory specified by path-spec
  2340.  
  2341.  Purpose:       Locate the fnode for a known file- or directory
  2342.  
  2343.  Parameters:    path-spec          full path specification with no intervening
  2344.                                    space after the '\' command character
  2345.  
  2346.                               or   absolute- or relative path specification
  2347.                                    with an intervening space. If the path
  2348.                                    does not start with a '\' it is relative
  2349.                                    to the current directory (see CD cmd).
  2350.  
  2351.  Output:        Searchlist starting at the ROOT directory upto the requested
  2352.                 file or directory. It is either followed by an error message
  2353.                 if the path-spec was not found or by the display of the
  2354.                 corresponding fnode information.
  2355.  
  2356.  Remarks:       The search algorithm depends on the ROOT fnode being known.
  2357.                 When the superblock is corrupt this fnode can be resolved
  2358.                 using the 'findroot' command.
  2359.  
  2360.  
  2361.  
  2362.  PATH     [n]    = Show all path-components for current fnode, upto root
  2363.  
  2364.  Purpose:       Show the directory-branch that contains current file/dir
  2365.  
  2366.  Parameters:    n           optional   Start LSN for the search
  2367.  
  2368.  Output:        One line for each found 'parent' directory, upto the root
  2369.  
  2370.  Remarks:
  2371.  
  2372.  
  2373.  CA   [lsn][opt] = Check Allocation for (current) fnode lsn
  2374.  
  2375.  Purpose:       Check allocation integrity for current fnode
  2376.  
  2377.  Parameters:    lsn         optional   LSN of the fnode
  2378.                 opt         optional   Options:  v   = Verbose, show progress
  2379.  
  2380.  Output:        Σ           Start of an allocation-sector (heavily fragmented)
  2381.                 »           Start of one file-extent (fragmented file)
  2382.                 ·           One sector, green small dot is allocation OK
  2383.                 ■           One sector, red big dot is allocation error
  2384.  
  2385.                 Also a summary is given with the number of (failed) sectors
  2386.  
  2387.  Remarks:       Fnode maybe for a regular file (sectors must be ALLOCATED)
  2388.                 or for a deleted file (sectors must be FREE)
  2389.  
  2390.                                                                               
  2391.  FINDROOT [n]    = find the Root directory without using the superblock
  2392.  
  2393.  Purpose:       Find the fnode for the ROOT directory, even if parts of
  2394.                 the volume, including the superblock, are damaged.
  2395.  
  2396.  Parameters:    n           optional   Start LSN for the search
  2397.  
  2398.  Output:        Search-list starting at the first fnode encountered upto
  2399.                 the fnode for the ROOT directory when found.
  2400.  
  2401.  Remarks:       Specifying a startlsn might be needed if reading at the
  2402.                 start of the volume results in device errors, or if some
  2403.                 fnodes in the sequence are corrupted.
  2404.  
  2405.  
  2406.  FIXROOT         = Write the root-LSN found with the 'findroot' command back
  2407.  
  2408.  Purpose:       Fix bad Root-LSN pointer, after CHKDSK bugs or other corruption
  2409.  
  2410.  Parameters:    none
  2411.  
  2412.  Output:        none
  2413.  
  2414.  Remarks:       It is better to lock the physical disk before writing to it
  2415.  
  2416.  
  2417.  FIXBOOT         = Create HPFS bootsector from template and partition-table
  2418.  
  2419.  Purpose:       Fix corrupted bootsector for a HPFS partition
  2420.  
  2421.  Parameters:    none
  2422.  
  2423.  Output:        Progress and confirmation info
  2424.  
  2425.  Remarks:       This will create a valid bootsector based on WARP version 4
  2426.                 bootsector code and size-info from the partition table.
  2427.                 Only the bootsector is written, to make the partition boot
  2428.                 properly, it might be needed to run 'sysinsx' afterwards
  2429.  
  2430.                 The partition-table info (type and size) must still be valid!
  2431.  
  2432.  
  2433.  FIXCP           = Write the CodePage-LSN found with the '0#f c' command back
  2434.  
  2435.  Purpose:       Fix bad CodePage-LSN pointer
  2436.  
  2437.  Parameters:    none
  2438.  
  2439.  Output:        none
  2440.  
  2441.  Remarks:       It is better to lock the physical disk before writing to it
  2442.  
  2443.                                                                               
  2444.  FIXBS  [clear]  = Update bad-sector table with LSN's from DFS badsec-list
  2445.  
  2446.  Purpose:       Replace the internal HPFS bad-sector list with the DFS
  2447.                 bad-sector list, or clear the liste completely.
  2448.  
  2449.  Parameters:    clear   optional   Make internal and DFS bad-sector list empty
  2450.  
  2451.  Output:        none
  2452.  
  2453.  Remarks:       The list can be the result of the "scan", "getbs", "mem" or
  2454.                 "import" cmd, allowing modification off-line with an editor.
  2455.                 The OS/2 chkdsk command will give erronous results on
  2456.                 "reserved for system use" until the next reboot.
  2457.                 It is better to lock the physical disk before writing to it
  2458.                 See 'lock' and 'unlock' commands
  2459.  
  2460.  GETBS           = Read HPFS bad-sector table into DFS badsec-list
  2461.  
  2462.  Purpose:       Replace the DFS bad-sector list with the internal HPFS one
  2463.  
  2464.  Parameters:    none
  2465.  
  2466.  Output:        none
  2467.  
  2468.  Remarks:       none
  2469.  
  2470.  
  2471.  CS           = Calculate HPFS style checksum on last-read sector
  2472.  
  2473.  Purpose:       Show / check checksum on HPFS sector (super/spare)
  2474.  
  2475.  Parameters:    none
  2476.  
  2477.  Output:        Checksum value
  2478.  
  2479.  Remarks:       Only meaningfull for superblock (10) and spareblock (11)
  2480.                 These checksums are also stored by HPFS in the spareblock.
  2481.  
  2482.  FIXCS           = Calcualte checksums and write super- and spare-block
  2483.  
  2484.  Purpose:       (re)calculate the checksum for superblock and spareblock
  2485.                 and write them both back to the disk
  2486.  
  2487.  Parameters:    none
  2488.  
  2489.  Output:        none
  2490.  
  2491.  Remarks:       none
  2492.  
  2493.                                                                               
  2494.  SAVETO [dir][l] = Save filedata connected to (current) fnode to a file
  2495.  
  2496.  Purpose:       Recover a file if the fnode can still be found, by making
  2497.                 a low-level sector-by-sector copy of its data to a new file.
  2498.                 (basic functionality to be used for undelete operations)
  2499.  
  2500.  Parameters:    dir         optional   Path to save the file copy, default a:\
  2501.  
  2502.                 l           optional   LSN of the fnode of the file to recover
  2503.                                        default is the current LSN (This)
  2504.  
  2505.                 rename      optional   new name for destination file, allowing
  2506.                                        long-filenames to fit 8.3 names (floppy)
  2507.  
  2508.  Output:        Progress is reported with output like the "ca" command,
  2509.                 error messages will be given as appropriate
  2510.  
  2511.  Remarks:       Only the file contents is recovered, date&time and attributes
  2512.                 are lost. On HPFS EA's are recovered as well.
  2513.                 If no directory is specified it will default to the last
  2514.                 directory given, or "A:" when it is the first time
  2515.                 If the directory does not exist it will be created
  2516.  
  2517.                 Make sure that this is on a DIFFERENT drive, otherwise it
  2518.                 might overwrite the data you are recovering or still need
  2519.                 to recover later.
  2520.  
  2521.  
  2522.  DELFIND [s] [o] = Find deleted files, name start with [s], using options [o]
  2523.  
  2524.  Purpose:       Find deleted files, with name starting at current LSN
  2525.  
  2526.  Parameters:    s           optional   shortname, first part of filename wanted
  2527.                 o           optional   options    ! = fastest but silent search
  2528.  
  2529.  Output:        Find-result list (as "find* z") on screen and in memory
  2530.  
  2531.  Remarks:       List can be manipulated as usual, best viewed with "delshow"
  2532.  
  2533.  
  2534.                                                                               
  2535. Diagram of an example HPFS structure
  2536.  
  2537.  Basic HPFS data-structure for Root-directory with AUTOEXEC.BAT, README file,
  2538.  an OS2 subdirectory and lots of other files. The README file has it's data
  2539.  allocated in 2 alloc-chunks.
  2540.  
  2541.  ╔═════════╗                  ╔══════════════════╗       ╔═══════╗
  2542.  ║SUPER    ║              ┌──>║ DIR block        ║   ┌──>║ FNODE ║
  2543.  ║         ║              │   ║                  ║   │   ║       ║
  2544.  ║         ║    ╔═══════╗ │   ║┌────────────────┐║   │   ║       ║  ╔══════════
  2545.  ║Root LSN ────>║ FNODE ║ │   ║│*Special**Start*│║   │   ║ ALLOC ──>║ DIR block
  2546.  ╚═════════╝    ║       ║ │   ║│entry FNODE  LSN│║   │   ╚═══════╝  ║
  2547.                 ║       ║ │   ║│BtreeDownPtr LSN│║   │              ║┌─────────
  2548.                 ║ ALLOC ──┘   ║└────────────────┘║   │              ║│8514.RC
  2549.                 ╚═══════╝     ║┌────────────────┐║   │              ║│entry FNO
  2550.                               ║│OS2 (subdir)    │║   │              ║│BtreeDown
  2551.                               ║│entry FNODE  LSN├────┘              ║└─────────
  2552.  ┌─────────────────────────────┤BtreeDownPtr LSN│║                  ║┌─────────
  2553.  │                            ║└────────────────┘║                  ║│ANSI.EXE
  2554.  │                            ║┌────────────────┐║
  2555.  │                            ║│Special-end     │║
  2556.  │  ╔══════════════════╗      ║│entry FNODE  LSN│║       ╔══════════════════╗
  2557.  └─>║ DIR block        ║      ║│BtreeDownPtr LSN├───────>║ DIR block        ║
  2558.     ║┌────────────────┐║      ║└────────────────┘║       ║┌────────────────┐║
  2559.     ║│*Special**Start*│║      ╚══════════════════╝       ║│*Special**Start*│║
  2560.     ║│entry FNODE  LSN│║                                 ║│entry FNODE  LSN│║
  2561.     ║│BtreeDownPtr LSN│║     ╔═══════╗                   ║│BtreeDownPtr LSN│║
  2562.     ║└────────────────┘║  ┌─>║ FNODE ║                   ║└────────────────┘║
  2563.     ║┌────────────────┐║  │  ║       ║                   ║┌────────────────┐║
  2564.     ║│AUTOEXEC.BAT    │║  │  ║       ║  ╔═══════════     ║│PP... filename  │║
  2565.     ║│entry FNODE  LSN├───┘  ║ ALLOC ──>║┌──────────     ║│entry FNODE  LSN│║
  2566.     ║│BtreeDownPtr LSN│║     ╚═══════╝  ║│ 1st data-     ║│BtreeDownPtr LSN│║
  2567.     ║└────────────────┘║                ║└──────────     ║└────────────────┘║
  2568.     ║┌────────────────┐║                                 ║┌────────────────┐║
  2569.     ║│OS1.. filename  │║                                 ║│README filename │║
  2570.     ║│entry FNODE  LSN│║      ┌───────────────────────────┤entry FNODE  LSN│║
  2571.     ║│BtreeDownPtr LSN│║      │                          ║│BtreeDownPtr LSN│║
  2572.     ║└────────────────┘║      │                          ║└────────────────┘║
  2573.     ║┌────────────────┐║      │                          ║┌────────────────┐║
  2574.     ║│**Special**End**│║      │                          ║│XXX... filename │║
  2575.     ║│entry FNODE  LSN│║      │                          ║│entry FNODE  LSN│║
  2576.     ║│BtreeDownPtr LSN│║      │                          ║│BtreeDownPtr LSN│║
  2577.     ║└────────────────┘║      │                          ║└────────────────┘║
  2578.     ╚══════════════════╝      │                          ║┌────────────────┐║
  2579.                               │                          ║│**Special**End**│║
  2580.                               │                          ║│entry FNODE  LSN│║
  2581.                               │                          ║│BtreeDownPtr LSN│║
  2582.                               │                          ║└────────────────┘║
  2583.                               │                          ╚══════════════════╝
  2584.                               │
  2585.                               │                    ╔════════════════════════╗
  2586.                               │               ┌───>║┌──────────────────────┐║
  2587.                               │               │    ║│ 1st data-sector      │║
  2588.                               │               │    ║└──────────────────────┘║
  2589.                               │               │    ║┌──────────────────────┐║
  2590.                               │  ╔═══════╗    │    ║│ 2nd data-sector      │║
  2591.                               └─>║ FNODE ║    │    ║└──────────────────────┘║
  2592.                                  ║       ║    │    ╚════════════════════════╝
  2593.                                  ║       ─────┘
  2594.                                  ║ ALLOC ║         ╔════════════════════════╗
  2595.                                  ║       ─────────>║┌──────────────────────┐║
  2596.                                  ╚═══════╝         ║│ 3rd data-sector      │║
  2597.                                                    ║└──────────────────────┘║
  2598.     (c) 1995                                       ║┌──────────────────────┐║
  2599.     J. v. Wijk                                     ║│ 4th data-
  2600.                                                                               
  2601. Examples of DFS usage
  2602. ---------------------
  2603.  
  2604.  1) Resolve original name of FILExxxx.CHK files (created by CHKDSK)
  2605.  
  2606.     When CHKDSK recovers files it will place in a FOUND.xxx directory in
  2607.     the root-directory. This directory contains one or more recovered files
  2608.     with names like FILE0001.CHK
  2609.     The original name of the file is still in the Fnode, it can be shown
  2610.     using the following dhpfs commands (assuming drive c:) :
  2611.  
  2612.     Command                            Explanation
  2613.  
  2614.     DFS disks                          Start DFS and scan physical disks
  2615.     part id                            Select partition 'id' (must be HPFS)
  2616.     \found.000\file0001.chk            Search and display Fnode for .CHK
  2617.  
  2618.     Now 15 characters of the original name are shown as "Fnode Name String"
  2619.  
  2620.  
  2621.  2) Show freespace area's (HPFS)
  2622.       "slt $"
  2623.  
  2624.  
  2625.  3) Undelete a file; Find the fnode using:
  2626.       "find z"               find the next deleted fnode
  2627.       "find z   shortname"   next deleted named shortname (case-sensitive)
  2628.       "find$@ z shortname"   next deleted named shortname (case-insensitive)
  2629.  
  2630.       Add a '*' to the find command to do a repeated search (see 'find' cmd)
  2631.  
  2632.     Use "saveto" command to copy the data for the deleted file to a directory.
  2633.  
  2634.     Notes: - It's best to use a different drive to avoid overwriting
  2635.  
  2636.  
  2637.  4) Save and restore (parts of) a disk
  2638.  
  2639.     The "sim" command can be used to save a complete disk, including partition
  2640.     information to one (very large!) file on a different (network) drive.
  2641.     The save the entire unit (opened disk/partition or volume) use:
  2642.     "sim img-name 0 $"
  2643.  
  2644.     It can be restored using the "wrim" command, if and only if the destination
  2645.     disk has exactly the same geometry as the source disk (heads, sectors cyl).
  2646.     This could be used to clone one workstation to multiple machines.
  2647.                                                                              
  2648.  
  2649.  5) List all "undeletable" files
  2650.  
  2651.     Find the FNODES for possibly deleted files using
  2652.       "find* z" or for specific files:  "find*$@ z shortname"
  2653.  
  2654.     Now list them, including PATH and recovery reliability using:
  2655.       "list f+f"
  2656.  
  2657.     Or list just a subset using any combination of wildcards:
  2658.       "list f+f *\testdir\data?.txt
  2659.  
  2660.     Use the .NNN command to select a file to undelete, and then use the
  2661.     "saveto [destination-path]" command to actualy undelete it.
  2662.  
  2663.     ==> use the "delfind", "delshow" and "delsave" to work on multiple files
  2664.  
  2665.  
  2666.  6) Update the bad-sector list with the results of a DFS-scan
  2667.  
  2668.     Find all sectors that are unreadable:
  2669.       "scan"
  2670.  
  2671.     Optionaly: list, export/modify/import the resulting bad-sector list
  2672.       "list  +f"                   (list, including PATH if sector is Fnode)
  2673.       "export b badguys"           (Place in an ASCII file badguys.lsn)
  2674.       Now edit it off-line, save as 'modified.lsn'
  2675.       "import b modified"
  2676.  
  2677.     Now replace the internal bad-sector list with the new modified one:
  2678.       "fixbs"
  2679.  
  2680.  
  2681.  7) Save a list of currently deleted files on an HPFS volume:
  2682.  
  2683.     Find deleted files (could take quite a while!):
  2684.       "find* z"
  2685.  
  2686.     Save the deleted-Fnode LSN's in a file:
  2687.       "export deleted"
  2688.  
  2689.     Optionaly, also save PATH info and recovery chances using a logfile:
  2690.       "log deleted"
  2691.       "list f+f"
  2692.       "log"
  2693.  
  2694.       - This will result in a (possibly large!) deleted.log with one line
  2695.         per deleted file with size, recovery percentage and PATH+filename
  2696.  
  2697.  
  2698.  8) Show the list of free diskspace area's for HPFS volumes
  2699.     "slt $ a"
  2700.  
  2701.  
  2702.  9) Show all detected anomalies in the SLT (like allocation errors)
  2703.     "slt * * * +"
  2704.  
  2705.  
  2706. 10) Display the FAT for a diskette in drive A:
  2707.     "dfs vol a"
  2708.     "fatshow"
  2709.  
  2710.  
  2711. 11) Display the FAT Root-directory for partition C:
  2712.     "dfs part C"
  2713.     "root"
  2714.                                                                              
  2715.  
  2716. 12) Save the master-boot-sector on a different PC connected with a parallel
  2717.     laplink cable and running the LPT tool (see www.fsys.demon.nl):
  2718.     "dfs disk 1"
  2719.     "sim [lpt.exe]d:\images\mbr.img 0 1"
  2720.  
  2721.  
  2722. 13) Restore the master-boot-sector from a different PC connected with LPT:
  2723.     "dfs disk 1"
  2724.     "wrim [lpt.exe]d:\images\mbr.img 0 1"
  2725.  
  2726.  
  2727. 14) Collect information to perform a manual un-fdisk (find all boot sectors):
  2728.     "log unfdisk"
  2729.     "disk 1"
  2730.     "find* erb"
  2731.     "list +d"
  2732.     "export unfdisk"
  2733.  
  2734.  
  2735. 15) Recover a 'lost' NTFS partition where the boot-sector is damaged and
  2736.     the partition is not recognized by NT anymore (assuming 3rd partition):
  2737.     "part 3"
  2738.     "fs NTFS"
  2739.     "fixboot"
  2740.                                                                              
  2741.  
  2742. 16) Automatically FDISK a workstation using a batch- or command-file like:
  2743.  
  2744.     echo DFSee FDISK generic workstation >  dfsfdisk.log
  2745.     dfsdos fdisk! newmbr                 1  clean
  2746.     dfsdos fdisk! create primary bmgr
  2747.     dfsdos fdisk! startable 1
  2748.     dfsdos fdisk! create logical fat  6  1  -1,c MAINT
  2749.     dfsdos fdisk! create primary hpfs *  1  +0   WARP
  2750.  
  2751.     This will create a disk with bootmanager (image prepared with DFSIBMGR)
  2752.     a small maintanance partition at the end of the disk minus 1 cylinder
  2753.     and a primary partition filling the rest of the disk.
  2754.  
  2755.  
  2756. 17) Automatically FDISK a server-machine using a batch- or command-file like:
  2757.  
  2758.     echo DFSee FDISK RAID  server          >  dfsfdisk.log
  2759.     dfsdos fdisk! newmbr                   *  clean
  2760.     dfsdos fdisk! create primary bmgr
  2761.     dfsdos fdisk! startable 1
  2762.     dfsdos fdisk! create primary hpfs 300  1  0  SYSTEM
  2763.     dfsdos fdisk! create logical fat  200  1
  2764.     dfsdos fdisk! create logical hpfs *    1  0  RESTORE
  2765.     dfsdos fdisk! create logical hpfs *    2
  2766.     dfsdos fdisk! create logical fat  *    3
  2767.     dfsdos fdisk! setboot 0:SYSTEM
  2768.     dfsdos fdisk! setboot m:advanced
  2769.  
  2770.                                                                              
  2771. Known limitations and bugs
  2772. --------------------------
  2773.  
  2774. - There is only recognition for BeFS, the BEOS journalling filesystem
  2775.  
  2776. - There is recognition for NTFS, and most of the MFT record display
  2777.  
  2778. - FAT32 is implemented and tested using Henk Kelders OS2FAT32.IFS, no
  2779.   support for the special OS2FAT32 EA's is there yet.
  2780.  
  2781. - Allocation integrity checks do not check the allocation for EA's
  2782.  
  2783. - Accessing (large ?) partition using the 'vol' command in the DFSDOS version
  2784.   seems to be unreliable. Wrong data is sometimes returned.
  2785.   On a diskette (vol a:) everything seems to be OK, so I recommend using
  2786.   only the 'part x' command for accessing hard-disk partitions and use
  2787.   the 'vol' command only for floppies. (DFSDOS restriction only)
  2788.  
  2789. - LZW compression on the SIM/WRIM commands does not work yet in combination
  2790.   with the (OS/2 only) LPT tool using I/O through a named-pipe.
  2791.  
  2792. - LZW compression seems to be UNRELIABLE on large images!
  2793.  
  2794. - Automatic reboot (in SETBOOT) doesn't work with DFSDOS and Win9x
  2795.  
  2796.                                                                              
  2797. Considered improvements
  2798. -----------------------
  2799.  
  2800.  Rewrite of this documentaion in a description, command-reference and
  2801.  technical info on filesystems (possibly in HTML)
  2802.  
  2803.  More automatic detection of inconsistencies (like CHKDSK, FST, HVA, CHKPART)
  2804.    This will show HPFS problems like CHKDSK does, but in more detail and
  2805.    maybe some more types of inconsistencies.
  2806.  
  2807.  Real coverage of other file-systems besides HPFS like FAT, EXT2, NTFS ...
  2808.    VFAT date/time info and long filenames added in            ver 2.56
  2809.    FAT32 functionality added/fixed in                         ver 2.65
  2810.    NTFS  functionality expanded in version                    ver 2.80
  2811.  
  2812.  
  2813.  Generic edit and write capability,
  2814.  
  2815.    This will allow recovery operations without using other (third-party)
  2816.    utilities. The user interface needs to support screen-editing for this.
  2817.  
  2818.    Note: Some write enabled commands have been implemented starting with 1.90
  2819.          Improved volume/disk locking implemented in version 2.25
  2820.          Basic edit and write capability added in version 2.50
  2821.          Writing to a 'volume' and from the DFSDOS version in 2.55
  2822.  
  2823.  Recovery for missing/damaged bootsector resulting in FDISK
  2824.  display of "unformatted". (Note: implemented for HPFS and NTFS as of 2.82)
  2825.  
  2826.  Recovery for a 'quick format' on HPFS (unformat)
  2827.  
  2828.  Recovery for repartitioning (un-fdisk)
  2829.  Save and restore complete partitioning schemes using diskarea's or diskette
  2830.  
  2831.  LINUX version, port being investigated, low priority.
  2832.  
  2833.  More FDISK and some FORMAT capabilities, creating FAT or HPFS partitions
  2834.  This will allow unattended, batch-like installation procedures
  2835.  to be started from DOS diskettes.
  2836.  FDISK query command(s) to determine disk-sizes, nr-of-partitions etc.
  2837.  from the command-line or a batch-file (in RC / errorlevel)
  2838.  
  2839.  Save and restore complete partitioning info to/from a file or harddisk area.
  2840.  
  2841.  More complete Logical Volume Manager support (LVM) and support for the
  2842.  Journalled File System (JFS) for OS/2 Warpserver for e-bussines (Aurora)
  2843.