DELTREE

DELTREE (short for delete tree) is a command line command in some Microsoft operating systems that recursively deletes an entire subdirectory of files.

Background

When IBM and Microsoft introduced PC-DOS 1.0 / MS-DOS 1.0, subdirectories were not yet supported. This state of affairs was remedied with the release of DOS 2.0, which introduced support for subdirectories and directory nesting; however, it had no built-in facility for deleting entire subdirectory trees.[1] Through the release of MS-DOS 5.0, removing nested subdirectories required removing all of the files in the lowest subdirectories, then removing the subdirectory itself, then repeating the process up the directory tree. By 1991 at least one competing product, DR-DOS, had introduced a well-received utility that enabled recursive file deletion.[2] With the introduction of MS-DOS 6.0, Microsoft regained parity by adding the DELTREE command.[3]

Implementation and use

DELTREE was implemented as an external command, with its functionality kept in a separate file outside of COMMAND.COM.[4] Normal operation prompted the user for verification that the specified directories were indeed intended to be removed, but this safeguard could be suppressed with a command-line option.[3] Unlike most other commands that operated on the file system, multiple directories could be passed to the command at one time.[5] An undocumented feature allowed the user to append a trailing "/" character to a directory name in order to preserve the directory but remove everything underneath it.[6] In theory, deleted material could be recovered.[5]

Use in malware and sabotage

DELTREE was designed to ignore all file and directory attributes, such as hidden, read-only and system.[6] The command was described as "potentially dangerous" and "capable of wiping out hundreds of files at a time".[3] Combined with the PURGE command (which prevented data recovery), it became an example of a worst-case payload for malware[7] as well as figuring in one of the early computer sabotage trials.[8][9]

Obsolescence

DELTREE was retained throughout all Windows versions based upon MS-DOS, including Windows 95, Windows 98, Windows 98 SE and Windows ME. (For Windows versions before Windows 95, the presence of DELTREE depended on the version of the MS-DOS that was already present on the machine.)

DELTREE was not shipped in Windows NT-based operating systems, including Windows NT, Windows 2000, Windows XP, Windows Server, Windows Vista, Windows 7, and Windows 8. Instead, the RD or RMDIR (remove directory) command removes a subdirectory along with all its files if the /S command-line switch is given, and does so without prompting if the /Q command-line switch is given as well.[10]

See also

References

  1. Dickinson, John (May 28, 1985). "Stalking the Elusive Subdirectory Path". PC Magazine. p. 231.
  2. Glass, Brett (July 8, 1991). "MS-DOS 5: Reigning OS improves its value". InfoWorld. pp. 6466.
  3. 1 2 3 Cooper, Jim (2002). Using MS-DOS 6.22 (3rd ed.). Que. pp. 120121. ISBN 0-7897-2573-8.
  4. Crayton, Christopher (2008). The A+ Exams Guide: Preparation Guide for the CompTIA Essentials. CompTIA. p. 336. ISBN 978-1-58450-566-2.
  5. 1 2 Mueller, John Paul (2007). Windows Administration at the Command Line for Windows Vista, Windows 2003, Windows XP, and Windows 2000. Wiley. pp. 2829. ISBN 978-0-470-04616-6.
  6. 1 2 Rubenking, Neil J. (November 19, 1996). "User-to-User". PC Magazine. p. 247.
  7. Glass, Brett (May 2, 1994). "How to safely defuse an ANSI bomb; video scan converters". InfoWorld. p. 40.
  8. Gaudin, Sharon (2000). "Case Study of Insider Sabotage: The Tim Lloyd/Omega Case" (PDF). Computer Security Journal. 16 (3): 18.
  9. Lange, Michele C. S.; Nimsger, Kristin (2004). Electronic Evidence and Discovery: What every Lawyer Should Know. ABA. p. 15. ISBN 1-59031-334-8. The case was litigated as United States v. Lloyd, 269 F.3d 228 (3rd Cir. 201).
  10. No DELTREE Command? - MalekTips
This article is issued from Wikipedia - version of the 12/4/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.