TYPE (DOS command)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
type
The BW-DOS TYPE command
The BW-DOS TYPE command
Operating systemRT-11, OS/8, TOPS-10, TOPS-20, VMS, CP/M, MP/M, TRIPOS, AmigaDOS, DOS, FlexOS, PC-MOS, SpartaDOS X, 4690 OS, OS/2, Windows, ReactOS, AROS, SymbOS
TypeCommand

In computing, type is a command in various command-line interpreters (shells) such as COMMAND.COM, cmd.exe, 4DOS/4NT and Windows PowerShell used to display the contents of specified files on the computer terminal. The analogous Unix command is cat.

Implementations[edit]

Description of the TYPE command of RT-11SJ displayed on a VT100.

The command is available in the operating systems DEC RT-11,[1] OS/8,[2] TOPS-10,[3] TOPS-20,[4] VMS, Digital Research CP/M,[5] MP/M,[6][7] MetaComCo TRIPOS,[8] AmigaDOS,[9] DOS, FlexOS,[10] TSL PC-MOS,[11] SpartaDOS X,[12] IBM/Toshiba 4690 OS,[13] IBM OS/2, Microsoft Windows,[14] ReactOS,[15] AROS,[16] and SymbOS.[17]

On MS-DOS, the command is available in versions 1 and later.[18] DR DOS 6.0 also includes an implementation of the TYPE command.[19]

It is also available in the open source MS-DOS emulator DOSBox and the EFI shell.[20]

In Windows PowerShell, type is a predefined command alias for the Get-Content Cmdlet which basically serves the same purpose. TYPE originated as an internal command in 86-DOS.

The command-syntax and feature set between operating systems and command shell implementations can differ as can be seen in the following examples.

DEC RT-11[edit]

In Digital Equipment Corporation's RT-11, the command accepts up to six input file specifications. Multiple file specifications are separated with commas.

The default filetype is .LST. Wildcards are accepted in place of filenames or filetypes.

Syntax[edit]

The command-syntax on RT-11 is:

TYPE[/options] filespecs
  • COPIES:n – Specify the number of times the file will be typed
  • DELETE – Delete the file after typing it
  • LOG – Log the names of the files typed
  • NEWFILES – Only files dated with the current system date will be typed
  • NOLOG – Suppress the log of the files typed
  • QUERY – Require confirmation before typing each file
  • WAIT – Wait for user response before proceeding with the type

Examples[edit]

TYPE/COPIES:3 REPORT
TYPE/NEWFILES *.LST

DR CP/M, MP/M, FlexOS[edit]

In Digital Research CP/M, the command expands tabs and line-feed characters (CTRL-I), assuming tab positions are set at every eighth column.

The command does not support wildcard characters on FlexOS.[10]

Syntax[edit]

The command-syntax on CP/M is:

TYPE ufn

Note: ufn = unambiguous file reference

In MP/M, the command has a pause mode. It is specified by entering a 'P' followed by two decimal digits after the filename. The specified number of lines will be displayed and then the command will pause until a carriage return is entered.[6]

Examples[edit]

A>TYPE FILE.PLM
A>TYPE B:X.PRN
0A>TYPE CODE.ASM P23

TSL PC-MOS[edit]

The Software Link's PC-MOS includes an implementation of TYPE. Like the rest of the operating system, it is licensed under the GPL v3.[21] It supports an option to display the file content in hexadecimal form.[11]

Syntax[edit]

The command-syntax on PC-MOS is:

.TYPE filename [/h]
  • filename – The name of the file to display
  • /h – Display content in hexadecimal form

Examples[edit]

[A:\].TYPE FILE.BIN /h

Microsoft Windows, ReactOS[edit]

The command supports wildcard characters. In Microsoft Windows it includes the filename in the output when typing multiple files.

Syntax[edit]

The command-syntax on Microsoft Windows and ReactOS is:

type [Drive:][Path]FileName
  • [Drive:][Path]FileName – This parameter specifies the location and name of the file or files to view. Multiple file names need to be separated with spaces.
  • /? – This parameter displays help for the command.

Examples[edit]

C:\>type "my report.txt"
C:\>type *.txt

See also[edit]

References[edit]

  1. ^ http://paleoferrosaurus.com/beta/documents/rt11help.html#TYPE
  2. ^ "Concise Command Language" (CCL)."OS/8 Handbook" (PDF). April 1974. Retrieved 28 November 2017.
  3. ^ TOPS-10 Operating System Commands Manual (pdf). Digital Equipment Corporation. August 1980. Retrieved 2019-02-17.
  4. ^ "TOPS-20 Command manual" (PDF).
  5. ^ http://www.cpm.z80.de/manuals/cpm22-m.pdf
  6. ^ a b Digital Research (July 1981) [1979]. MP/M - Multi-Programming Monitor Control Program - User's Guide (PDF) (4 ed.). Pacific Grove, CA, USA: Digital Research. Archived (PDF) from the original on 2017-01-04. Retrieved 2017-01-04.
  7. ^ Digital Research (1981-09-25). MP/M-86 Operating System - User's Guide (PDF) (1 ed.). Pacific Grove, CA, USA: Digital Research. Archived (PDF) from the original on 2017-01-04. Retrieved 2017-01-04.
  8. ^ https://www.pagetable.com/docs/amigados_tripos/tripos_manuals.pdf
  9. ^ https://archive.org/details/1988-rugheimer-spanik-amigados-quick-reference
  10. ^ a b FlexOS User's Guide Version 1.3 (PDF). 1.3 (1 ed.). Digital Research. November 1986. 1073-2003-001. Archived (PDF) from the original on 2019-03-30. Retrieved 2019-04-23.
  11. ^ a b PC-MOS User Guide
  12. ^ SpartaDOS X 4.48 User Guide
  13. ^ https://archive.org/details/4690OSV6r2UsersGuide/page/n169
  14. ^ Microsoft TechNet Type article
  15. ^ https://github.com/reactos/reactos/blob/master/base/shell/cmd/type.c
  16. ^ http://aros.sourceforge.net/documentation/users/shell/index.php
  17. ^ http://www.symbos.de/appinfo.htm?00025
  18. ^ Wolverton, Van (2003). Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition. Microsoft Press. ISBN 0-7356-1812-7.
  19. ^ DR DOS 6.0 User Guide Optimisation and Configuration Tips
  20. ^ "EFI Shells and Scripting". Intel. Retrieved 2013-09-25.
  21. ^ Jansen, Roeland (8 February 2018). "pcmos386v501: PC-MOS/386 v5.01 final release including cdrom driver sources" – via GitHub.

Further reading[edit]

External links[edit]