TYPE (DOS command)

{{for|the Unix command that looks up command names|type (Unix)}}

{{Infobox software

| name = type

| logo =

| screenshot = Bwdos.png

| screenshot size =

| caption = The BW-DOS TYPE command

| developer = Various open-source and commercial developers

| released =

| latest release version =

| latest release date =

| operating system = RT-11, OS/8, RSX-11, TOPS-10, TOPS-20, VMS, CP/M, MP/M, CDOS, TRIPOS, HDOS, AmigaDOS, DOS, MSX-DOS, FlexOS, PC-MOS, SpartaDOS X, 4690 OS, OS/2, Windows, AROS, ReactOS, SymbOS

| platform = Cross-platform

| genre = Command

| license = PC-MOS: GPLv3
AROS: AROS Public
ReactOS: GPLv2

| website =

}}

In computing, {{mono|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 {{mono|cat}}.

Implementations

File:RT-11 help.jpg displayed on a VT100.]]

The command is available in the operating systems DEC RT-11,{{Cite web|url=http://paleoferrosaurus.com/beta/documents/rt11help.html#TYPE|title=RT-11 HELP FILE|website=paleoferrosaurus.com|access-date=2018-07-16|archive-date=2018-07-17|archive-url=https://web.archive.org/web/20180717041552/http://paleoferrosaurus.com/beta/documents/rt11help.html#TYPE|url-status=dead}} OS/8,"Concise Command Language" (CCL).{{cite web

|url=http://bitsavers.trailing-edge.com/pdf/dec/pdp8/os8/OS8_Handbook_Apr1974.pdf

|title=OS/8 Handbook |date=April 1974 |access-date=28 November 2017}} RSX-11,{{Cite book |title=RSX A Guide for Users |date=1987 |author=John F. Pieper |publisher=Digital Equipment Corporation |url=http://www.rsx11m.com/rsxguide.pdf |isbn=0-932376-90-8 |access-date=2020-09-19}} TOPS-10,{{Cite book |title=TOPS-10 Operating System Commands Manual |date=August 1980 |publisher=Digital Equipment Corporation |url=http://scandocs.trailing-edge.com/tops10-aa-0916d-tb.pdf |access-date=2019-02-17 |archive-date=2020-08-09 |archive-url=https://web.archive.org/web/20200809145058/http://scandocs.trailing-edge.com/tops10-aa-0916d-tb.pdf |url-status=dead }} TOPS-20,{{cite web

|url=http://www.textfiles.com/bitsavers/pdf/dec/pdp10/TOPS20/V6.1/AA-FP65A-TM_tops20CmdsRef.pdf

|title=TOPS-20 Command manual

|access-date=2018-07-18

|archive-date=2020-08-09

|archive-url=https://web.archive.org/web/20200809103116/http://www.textfiles.com/bitsavers/pdf/dec/pdp10/TOPS20/V6.1/AA-FP65A-TM_tops20CmdsRef.pdf

|url-status=dead

}} VMS, Digital Research CP/M,{{cite web |url= http://www.cpm.z80.de/manuals/cpm22-m.pdf|title=Manual|website=www.cpm.z80.de |access-date=2020-09-19}} MP/M,{{cite book |author=Digital Research |author-link=Digital Research |title=MP/M - Multi-Programming Monitor Control Program - User's Guide |date=July 1981 |orig-year=1979 |edition=4 |publisher=Digital Research |location=Pacific Grove, CA, USA |url=http://www.cpm.z80.de/manuals/mpm1ug01.pdf |access-date=2017-01-04 |url-status=live |archive-url=https://web.archive.org/web/20170104231702/http://www.cpm.z80.de/manuals/mpm1ug01.pdf |archive-date=2017-01-04}}{{cite book |author=Digital Research |author-link=Digital Research |title=MP/M-86 Operating System - User's Guide |date=1981-09-25 |edition=1 |publisher=Digital Research |location=Pacific Grove, CA, USA |url=http://bitsavers.informatik.uni-stuttgart.de/pdf/digitalResearch/mpm-86/MPM-86_Users_Guide_Sep81.pdf |access-date=2017-01-04 |url-status=live |archive-url=https://web.archive.org/web/20170104172228/http://bitsavers.informatik.uni-stuttgart.de/pdf/digitalResearch/mpm-86/MPM-86_Users_Guide_Sep81.pdf |archive-date=2017-01-04}} MetaComCo TRIPOS,{{cite web |url=https://www.pagetable.com/docs/amigados_tripos/tripos_manuals.pdf |title= Manual |website=www.pagetable.com |access-date=2020-09-19}} Heath Company HDOS,{{cite web |title=Software Reference Manual HDOS SYSTEM Chapter 2 General Operations |language=en |author=Heath Company |author-link=Heath Company |url=http://sebhc.lesbird.com/documentation/software/HDOS-2/HDOS_Reference_Chapter2.pdf |access-date=2020-02-08 |archive-date=2017-08-07 |archive-url=https://web.archive.org/web/20170807205702/http://sebhc.lesbird.com/documentation/software/HDOS-2/HDOS_Reference_Chapter2.pdf |url-status=dead }} AmigaDOS,{{Cite book|url=https://archive.org/details/1988-rugheimer-spanik-amigados-quick-reference|title=AmigaDOS quick reference|first1=Hannes|last1=Rügheimer|first2=Christian|last2=Spanik|date=September 19, 1988|publisher=Grand Rapids, Mi : Abacus|isbn=9781557550491|via=Internet Archive}} DOS, FlexOS,{{cite book |title=FlexOS User's Guide Version 1.3 |date=November 1986 |id=1073-2003-001 |edition=1 |version=1.3 |publisher=Digital Research |url=http://www.bitsavers.org/pdf/digitalResearch/flexos/1073-2003_FlexOS_Users_Guide_V1.3_Nov86.pdf |access-date=2019-04-23 |url-status=live |archive-url=https://web.archive.org/web/20190330205506/http://www.bitsavers.org/pdf/digitalResearch/flexos/1073-2003_FlexOS_Users_Guide_V1.3_Nov86.pdf |archive-date=2019-03-30}} TSL PC-MOS,{{Cite web|url=https://github.com/roelandjansen/pcmos386v501|title=roelandjansen/pcmos386v501|website=GitHub|date=2 January 2022}} SpartaDOS X,

[http://sdx.atari8.info/sdx_files/4.48/SDX448_User_Guide.pdf SpartaDOS X 4.48 User Guide] IBM/Toshiba 4690 OS,{{cite web |url= https://archive.org/details/4690OSV6r2UsersGuide/page/n169|title= Users guide |website= archive.org|format=PDF|access-date=2020-09-19}} IBM OS/2, Microsoft Windows,{{Cite web|url=https://technet.microsoft.com/en-us/library/bb491026.aspx|title=Microsoft TechNet Type article|date=11 September 2009 }} ReactOS,{{Cite web|url=https://github.com/reactos/reactos|title=reactos/reactos|website=GitHub|date=3 January 2022}} AROS,{{Cite web|url=https://aros.sourceforge.io/documentation/users/shell/index.php|title=AROS Research Operating System|website=aros.sourceforge.io}} and SymbOS.{{cite web |url= http://www.symbos.de/appinfo.htm?00025|title=Data sheet |website=www.symbos.de|access-date=2020-09-19}}

The type command is supported by Tim Paterson's SCP 86-DOS.{{cite book |title=86-DOS - Disk Operating System for the 8086 - User's Manual |edition=Preliminary |version=Version 0.3 |date=1980 |publisher=Seattle Computer Products, Inc. |location=Seattle, Washington, USA |url=http://www.patersontech.com/Dos/docs/86_Dos_usr_03.pdf |access-date=2019-07-14 |url-status=dead |archive-url=https://web.archive.org/web/20190714004434/http://www.patersontech.com/dos/docs/86_Dos_usr_03.pdf |archive-date=2019-07-14}} (59 pages) On MS-DOS, the command is available in versions 1 and later.{{Cite book|author-last=Wolverton|author-first=Van|title=Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition|date=2003|publisher=Microsoft Press|isbn=0-7356-1812-7}} DR DOS 6.0 also includes an implementation of the {{code|TYPE}} command.[https://www.4corn.co.uk/archive/docs/DR%20DOS%206.0%20User%20Guide-opt.pdf DR DOS 6.0 User Guide Optimisation and Configuration Tips]

It is also available in the open source MS-DOS emulator DOSBox and the EFI shell.{{cite web

| url = http://software.intel.com/en-us/articles/efi-shells-and-scripting/

| title = EFI Shells and Scripting

| publisher = Intel

| access-date = 2013-09-25

}}

In Windows PowerShell, {{mono|type}} is a predefined command alias for the {{mono|Get-Content}} Cmdlet which basically serves the same purpose. {{mono|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 =

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 ==

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 ==

TYPE/COPIES:3 REPORT

TYPE/NEWFILES *.LST

= DR CP/M, MP/M, FlexOS =

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.

== Syntax ==

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.

== Examples ==

A>TYPE FILE.PLM

A>TYPE B:X.PRN

0A>TYPE CODE.ASM P23

= TSL PC-MOS =

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.{{cite web|url=https://github.com/roelandjansen/pcmos386v501|title=pcmos386v501: PC-MOS/386 v5.01 final release including cdrom driver sources|first=Roeland|last=Jansen|date=8 February 2018|via=GitHub}}

It supports an option to display the file content in hexadecimal form.

== Syntax ==

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 ==

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

= Microsoft Windows, OS/2, ReactOS =

File:ReactOS-0.4.13 type command 667x434.png type command]]

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

== Syntax ==

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 ==

C:\>type "my report.txt"

C:\>type *.txt

See also

References

{{Reflist}}

Further reading

  • {{Cite book|author-last=Townsend|author-first=Carl|title=Practical Guide to CP/M|date=1983|publisher=Dilithium Press|isbn=978-0880560771}}
  • {{Cite book|author1=Kathy Ivens|author2=Brian Proffit|year=1993|title=OS/2 Inside & Out|publisher=Osborne McGraw-Hill|isbn=9780078818714}}
  • {{Cite book|author=John Paul Mueller|year=2007|title=Windows Administration at the Command Line for Windows Vista, Windows 2003, Windows XP, and Windows 2000|publisher=John Wiley & Sons|isbn=978-0470165799}}