<<

Hidden Programs in Windows XP

Posted on May 17, 2007by abhishek2434 Below are the lists of some of the Hidden Programs in the Windows XP . Go to start and select Run. There typing the command on right side of the list will open the application in the left side. SQL Client Configuration – cliconfg System Configuration Editor – sysedit System Configuration Utility – msconfig System File Checker Utility (Scan Immediately)- sfc /scannow System File Checker Utility (Scan Once At Next Boot)- sfc /scanonce System File Checker Utility (Scan On Every Boot) – sfc /scanboot System File Checker Utility (Return to Default Setting)- sfc /revert System File Checker Utility (Purge File Cache)- sfc /purgecache System File Checker Utility (Set Cache Size to size x)-sfc/cachesize=x System Information- msinfo32 System Properties – sysdm.cpl Task Manager – taskmgr TCP Tester – tcptest Telnet Client – telnet Tweak UI (if installed) – tweakui User Account Management- nusrmgr.cpl Utility Manager – utilman Windows Address Book – wab Windows Address Book Import Utility – wabmig Windows Backup Utility (if installed)- ntbackup Windows Explorer – explorer Windows Firewall- firewall.cpl Windows Magnifier- magnify Windows Management Infrastructure – wmimgmt.msc Windows Media Player – wmplayer Windows Messenger – msmsgs Windows Picture Import Wizard (need camera connected)- wiaacmgr Windows System Security Tool – syskey Windows Update Launches – wupdmgr Windows Version (to show which version of windows)- winver Windows XP Tour Wizard – tourstart Wordpad – write Password Properties – password.cpl Performance Monitor – perfmon.msc Phone and Modem Options – telephon.cpl Phone Dialer – dialer Pinball Game – pinball Power Configuration – powercfg.cpl Printers and Faxes – control printers Printers Folder – printers Private Character Editor – eudcedit Quicktime (If Installed)- QuickTime.cpl Quicktime Player (if installed)- quicktimeplayer Real Player (if installed)- realplay Regional Settings – intl.cpl Registry Editor – regedit Registry Editor – regedit32 Remote Access Phonebook – rasphone Remote Desktop – mstsc Removable Storage – ntmsmgr.msc Removable Storage Operator Requests – ntmsoprq.msc Resultant Set of Policy (XP Prof) – rsop.msc Scanners and Cameras – sticpl.cpl Scheduled Tasks – control schedtasks Security Center – wscui.cpl Services – services.msc Shared Folders – fsmgmt.msc Shuts Down Windows – shutdown Sounds and Audio – mmsys.cpl Spider Solitare Card Game – spider Malicious Removal Tool – mrt Microsoft Access (if installed) – access.cpl Microsoft Chat – winchat Microsoft Excel (if installed) – excel Microsoft Frontpage (if installed)- frontpg Microsoft Movie Maker – moviemk Microsoft Paint – mspaint Microsoft Powerpoint (if installed)- powerpnt Microsoft Word (if installed)- winword Microsoft Syncronization Tool – mobsync Minesweeper Game – winmine Mouse Properties – control mouse Mouse Properties – main.cpl Nero (if installed)- nero Netmeeting – conf Network Connections – control netconnections Network Connections – ncpa.cpl Network Setup Wizard – netsetup.cpl Notepad – notepad Nview Desktop Manager (If Installed)- nvtuicpl.cpl Object Packager – packager ODBC Data Source Administrator- odbccp32.cpl On Screen Keyboard – osk Opens AC3 Filter (If Installed) – ac3filter.cpl Outlook Express – msimn Paint – pbrush IP Configuration (Display Connection Configuration) – ipconfi/all IP Configuration (Display DNS Cache Contents)- ipconfig /displaydns IP Configuration (Delete DNS Cache Contents)- ipconfig /flushdns IP Configuration (Release All Connections)- ipconfig /release IP Configuration (Renew All Connections)- ipconfig /renew IP Configuration(RefreshesDHCP&Re-RegistersDNS)-ipconfig/registerdns IP Configuration (Display DHCP Class ID)- ipconfig/showclassid IP Configuration (Modifies DHCP Class ID)- ipconfig /setclassid Java Control Panel (If Installed)- jpicpl32.cpl Java Control Panel (If Installed)- javaws Keyboard Properties – control keyboard Local Security Settings – secpol.msc Local Users and Groups – lusrmgr.msc Logs You Out Of Windows – logoff….. Accessibility Controls – access.cpl Accessibility Wizard – accwiz Add Hardware – Wizardhdwwiz.cpl Add/Remove Programs – appwiz.cpl Administrative Tools control – admintools Adobe Acrobat (if installed) – acrobat Adobe Designer (if installed)- acrodist Adobe Distiller (if installed)- acrodist Adobe ImageReady (if installed)- imageready Adobe Photoshop (if installed)- photoshop Automatic Updates – wuaucpl.cpl Bluetooth Transfer Wizard – fsquirt Calculator – calc Certificate Manager – certmgr.msc Character Map – charmap Check Disk Utility – chkdsk Clipboard Viewer – clipbrd Command Prompt – cmd Component Services – dcomcnfg Computer Management – compmgmt.msc Control Panel – control Date and Time Properties – timedate.cpl DDE Shares – ddeshare Device Manager – devmgmt.msc Direct X Control Panel (If Installed)- directx.cpl Direct X Troubleshooter- dxdiag Disk Cleanup Utility- cleanmgr Disk Defragment- dfrg.msc Disk Management- diskmgmt.msc Disk Partition Manager- diskpart Display Properties- control desktop Display Properties- desk.cpl Display Properties (w/Appearance Tab Preselected)- control color Dr. Watson System Troubleshooting Utility- drwtsn32 Driver Verifier Utility- verifier Event Viewer- eventvwr.msc Files and Settings Transfer Tool- migwiz File Signature Verification Tool- sigverif Findfast- findfast.cpl Firefox (if installed)- firefox Folders Properties- control folders Fonts- control fonts Fonts Folder- fonts Free Cell Card Game- freecell Game Controllers- joy.cpl Group Policy Editor (XP Prof)- gpedit.msc Hearts Card Game- mshearts Help and Support- helpctr HyperTerminal- hypertrm Iexpress Wizard- iexpress Indexing Service- ciadv.msc Internet Connection Wizard- icwconn1 Internet Explorer- iexplore Internet Properties- inetcpl.cpl Internet Setup Wizard- inetwiz

September 1, 2005 LEVEL: Advanced Windows Hidden Extra Programs Useful applications hidden in Windows XP (or not installed by default). Private Character Editor (Eudcedit) Location = tag">C:\Windows\System32\charmap.exe Create and edit custom characters (fonts). This is a simple and limited, but quite nice font editor. IExpress 2.0 (Iexpress) Location = C:\Windows\System32\iexpress.exe Creates simple installation file (Self Extraction Directive). Windows Media Player 6.4 (Mplayer2) Location = C:\Windows\ServicePackFiles\i386\mplayer2.exe Plain old media player, if you don’t like new Media Player V.9.0 or V.10.0. Windows 2000-style User Accounts management utility Location: C:\WINDOWS\system32\control.exe (switch: userpasswords2) (Start > Run > Open = control userpasswords2) To create shortcut, enter the following into the respecting text fields: Target = C:\WINDOWS\system32\control.exe userpasswords2 Start In = %HOMEDRIVE%%HOMEPATH% Group Policy Management Console (gpedit.msc) Location: Control Panel > Administrative Tools > Local Security Policy, or Start > Run > Open = gpedit.msc (not with exactly the same features). Access to computer, group and user's security settings. Some cool features, not available otherwise, can be turned on or off here. System Configuration Utility (msconfig) Location: Somewhere in C:\Windows\ folder (search for msconfig.exe). Good program for editing the boot-up order, Startup group, system.ini, win.ini and boot.ini files. This is a left-over program from Windows 98 times. The file could be in few places depending on the original o/s installation. If you can't find it, you can borrow the msconfig.exe file from a friend and it to your C:\Windows\ folder. The program should work just fine. © Copyright 2005, Vladimir Sokolov, SoSol Consulting You may copy, print and use the Document only for your personal use. YOU MAY NOT distribute the Document in any form and for any purpose without author's explicit permission. Page 1 Sysoc.inf Location = C:\Windows\Inf\Sysoc.inf List of Windows components (showing in Control Panel > Add/remove Programs > Add/Remove Windows Components). This is a plain text file, so you can open and edit it with Notepad. To un-hide individual component delete HIDE, but leave commas. Utilities installed in System Information: (Start > Programs > Accessories > System Tools > System Information > Tools [menu]) Net Diagnostics Network Diagnostics scans your system to gather information about your hardware, software, and network connections. System Restore Allows you to restore system files (automatic full restore or manual restore of individual files). Note: System Restore (Control Panel > System > System Restore) must be turned on. SoSol believes that this is not a good idea. DirectX Diagnostic Tool (dxdiag) Excellent utility for extracting a detailed computer configuration (hardware and software). Dr Watson Can also run from: Start > Run > Open = drwtsn32 This is a program error debugger. Dr. Watson logs information needed by technical support to diagnose a program error. I personally find this utility worthless and most definitely wouldn't run it automatically (as a service). However, you can use Dr Watson to view individual errors or to change settings how the errors are logged. © Copyright 2005, Vladimir Sokolov, SoSol Consulting You may copy, print and use the Document only for your personal use. YOU MAY NOT distribute the Document in any form and for any purpose without author's explicit permission. Page 2

A ansi. | append | arp | assign | assoc | at | atmadm | attrib B backup | batch | bootcfg | break cacls | call | cd | chcp | chdir | chkdsk | chkntfs | choice | cipher | cls | cmd | color | command | C comp | compact | control | convert | copy | ctty date | debug | defrag | | delete | deltree | | disable | diskcomp | | diskpart | D doskey | dosshell | driveparm E echo | edit | edlin | emm386 | enable | endlocal | erase | exit | expand | extract F fasthelp | fc | | find | findstr | fixboot | fixmbr | for | forfiles | | ftp | ftype G goto | gpupdate | graftabl H help | himem.sys | hostname I if | ifhlp.sys | ipconfig J None

K keyb L label | lh | listsvc | loadfix | loadhigh | lock | logoff | logon M map | md | mem| | mode | more | move | msav | msbackup | msd | mscdex | mwbackup N nbtstat | net | netsh | netstat | nlsfunc | nslookup O None P path | pathping | pause | ping | popd | power | print | prompt | pushd

Q qbasic R rd | reg | | rename | rmdir | robocopy | route | runas scandisk | scanreg | set | setlocal | setver | sfc | share | shift | shutdown | smartdrv | sort | start | S subst | switches | sys | systeminfo | systemroot T taskkill | tasklist | telnet | | title | tracert | tree | tskill | U undelete | unformat | unlock V | verify | vol

W wmic X xcopy Y None Z None ADDUSERS Add or list users to/from a CSV file ADmodcmd Active Directory Bulk Modify ARP Address Resolution Protocol ASSOC Change file extension associations• ASSOCIAT One step file association AT Schedule a command to run at a specific time ATTRIB Change file attributes b BCDBOOT Create or repair a system partition BCDEDIT Manage Boot Configuration Data BITSADMIN Background Intelligent Transfer Service BOOTCFG Edit Windows boot settings BROWSTAT Get domain, browser and PDC info c CACLS Change file permissions CALL Call one batch program from another• CERTREQ Request certificate from a certification authority CD Change Directory - move to a specific Folder• CHANGE Change Terminal Server Session properties CHKDSK Check Disk - check and repair disk problems CHKNTFS Check the NTFS CHOICE Accept keyboard input to a CIPHER Encrypt or Decrypt files/folders CleanMgr Automated cleanup of Temp files, recycle bin CLEARMEM Clear memory leaks CLIP Copy STDIN to the Windows clipboard CLS Clear the screen• CLUSTER Windows Clustering CMD Start a new CMD shell CMDKEY Manage stored usernames/passwords COLOR Change colors of the CMD window• COMP Compare the contents of two files or sets of files COMPACT Compress files or folders on an NTFS partition COMPRESS Compress individual files on an NTFS partition CON2PRT Connect or disconnect a Printer CONVERT Convert a FAT drive to NTFS COPY Copy one or more files to another location• CSCcmd Client-side caching (Offline Files) CSVDE Import or Export Active Directory data d DATE Display or set the date• DEFRAG Defragment hard drive DEL Delete one or more files• DELPROF Delete user profiles DELTREE Delete a folder and all subfolders DevCon Device Manager Command Line Utility DIR Display a list of files and folders• DIRUSE Display disk usage DISKPART Disk Administration DISKSHADOW Volume Shadow Copy Service DNSSTAT DNS Statistics DOSKEY Edit command line, recall commands, and create macros DriverQuery Display installed device drivers DSACLs Active Directory ACLs DSAdd Add items to active directory (user group computer) DSGet View items in active directory (user group computer) DSQuery Search for items in active directory (user group computer) DSMod Modify items in active directory (user group computer) DSMove Move an Active directory Object DSRM Remove items from Active Directory e ECHO Display message on screen• ENDLOCAL End localisation of environment changes in a batch file• ERASE Delete one or more files• EVENTCREATE Add a message to the Windows event log EXIT Quit the current script/routine and set an errorlevel• EXPAND Uncompress files EXTRACT Uncompress CAB files f FC Compare two files FIND Search for a text string in a file FINDSTR Search for strings in files FOR /F Loop command: against a set of files• FOR /F Loop command: against the results of another command• FOR Loop command: all options Files, Directory, List• FORFILES Batch process multiple files FORMAT Format a disk FREEDISK Check free disk space (in ) FSUTIL File and Volume utilities FTP File Transfer Protocol FTYPE File extension file type associations• g GETMAC Display the Media Access Control (MAC) address GLOBAL Display membership of global groups GOTO Direct a batch program to jump to a labelled line• GPRESULT Display Resultant Set of Policy information GPUPDATE Update Group Policy settings h HELP Online Help i iCACLS Change file and folder permissions IF Conditionally perform a command• IFMEMBER Is the current user a member of a Workgroup IPCONFIG Configure IP k KILL Remove a program from memory l LABEL Edit a disk label LOCAL Display membership of local groups LOGEVENT Write text to the event viewer LOGMAN Manage Performance Monitor LOGOFF Log a user off LOGTIME Log the date and time in a file m MAPISEND Send email from the command line MBSAcli Baseline Security Analyzer MEM Display memory usage MD Create new folders• MKLINK Create a (linkd) • MODE Configure a system device MORE Display output, one screen at a time MOUNTVOL Manage a volume mount point MOVE Move files from one folder to another• MOVEUSER Move a user from one domain to another MSG Send a message MSIEXEC Installer MSINFO32 System Information MSTSC Terminal Server Connection (Remote Desktop Protocol) MV Copy in-use files n NET Manage network resources NETDOM Domain Manager NETSH Configure Network Interfaces, Windows Firewall & Remote access NETSVC Command-line Service Controller NBTSTAT Display networking statistics (NetBIOS over TCP/IP) NETSTAT Display networking statistics (TCP/IP) NOW Display the current Date and Time NSLOOKUP Name server lookup NTBACKUP Backup folders to tape NTRIGHTS Edit user account rights o OPENFILES Query or display open files p PATH Display or set a search path for executable files• PATHPING Trace route plus network latency and packet loss PAUSE Suspend processing of a batch file and display a message• PERMS Show permissions for a user PERFMON Performance Monitor PING Test a network connection POPD Return to a previous directory saved by PUSHD• PORTQRY Display the status of ports and services POWERCFG Configure power settings PRINT Print a text file PRINTBRM Print queue Backup/Recovery PRNCNFG Display, configure or rename a printer PRNMNGR Add, delete, list printers set the default printer PROMPT Change the command prompt• PsExec Execute process remotely PsFile Show files opened remotely PsGetSid Display the SID of a computer or a user PsInfo List information about a system PsKill Kill processes by name or process ID PsList List detailed information about processes PsLoggedOn Who's logged on (locally or via resource sharing) PsLogList Event log records PsPasswd Change account password PsPing Measure network performance PsService View and control services PsShutdown Shutdown or reboot a computer PsSuspend Suspend processes PUSHD Save and then change the current directory• q QGREP Search file(s) for lines that match a given pattern Query Process Display processes (TS/Remote Desktop) Query Session Display all sessions (TS/Remote Desktop) Query TermServer List all servers (TS/Remote Desktop) Query User Display user sessions (TS/Remote Desktop) r RASDIAL Manage RAS connections RASPHONE Manage RAS connections RECOVER Recover a damaged file from a defective disk REG Registry: Read, Set, Export, Delete keys and values REGEDIT Import or export registry settings REGSVR32 Register or unregister a DLL REGINI Change Registry Permissions REM Record comments (remarks) in a batch file• REN Rename a file or files• REPLACE Replace or update one file with another Reset Session Delete a Remote Desktop Session RD Delete folder(s)• RMTSHARE Share a folder or a printer ROBOCOPY Robust File and Folder Copy ROUTE Manipulate network routing tables RUN Start | RUN commands RUNAS Execute a program under a different user account RUNDLL32 Run a DLL command (add/remove print connections) s SC Service Control SCHTASKS Schedule a command to run at a specific time SCLIST Display Services SET Display, set, or remove session environment variables• SETLOCAL Control the visibility of environment variables• SETX Set environment variables SFC System File Checker SHARE List or edit a file share or print share ShellRunAs Run a command under a different user account SHIFT Shift the position of batch file parameters• SHORTCUT Create a windows shortcut (.LNK file) SHOWGRPS List the Workgroups a user has joined SHOWMBRS List the Users who are members of a Workgroup SHUTDOWN Shutdown the computer SLEEP Wait for x seconds SLMGR Software Licensing Management (Vista/2008) SOON Schedule a command to run in the near future SORT Sort input START Start a program, command or batch file• SU Switch User SUBINACL Edit file and folder Permissions, Ownership and Domain SUBST Associate a path with a drive letter SYSTEMINFO List system configuration t TAKEOWN Take ownership of a file TASKLIST List running applications and services TASKKILL Remove a running process from memory TIME Display or set the system time• TIMEOUT Delay processing of a batch file TITLE Set the window title for a CMD.EXE session• TLIST Task list with full path TOUCH Change file timestamps TRACERT Trace route to a remote host TREE Graphical display of folder structure TSSHUTDN Remotely shut down or reboot a terminal server TYPE Display the contents of a text file• TypePerf Write performance data to a log file u USRSTAT List domain usernames and last login v VER Display version information• VERIFY Verify that files have been saved• VOL Display a disk label• w WAITFOR Wait for or send a signal WHERE Locate and display files in a directory tree WHOAMI Output the current UserName and domain WINDIFF Compare the contents of two files or sets of files WINMSDP Windows system report WINRM Windows Remote Management WINRS Windows Remote Shell WMIC WMI Commands WUAUCLT Windows Update x XCACLS Change file and folder permissions XCOPY Copy files and folders :: Comment / Remark•

List of MS-DOS commands From Wikipedia, the free encyclopedia

Jump to: navigation, search

In the personal computer operating systems MS-DOS and PC DOS, a number of standard system commands were provided for common tasks such as listing files on a disk or moving files. Some commands were built-in to the command interpreter, others existed as external commands on disk. Over the several generations of DOS, commands were added for the additional functions of the operating system. In the current Microsoft Windows operating system a text-mode command prompt window can still be used.

Contents

[hide]

 ACALC  APPEND  ASSIGN  ATTRIB  BACKUP  BASIC, BASICA and GW-BASIC  BREAK  CALL  CHCP  CHDIR or CD  CHKDSK  CHOICE  CLS  COMMAND  COMP  COPY  CTTY  DATE  DEBUG  DEFRAG  DEL or ERASE  DELTREE  DIR  DISKCOMP  DISKCOPY  DOSKEY  DRVLOCK  DYNALOAD  E  ECHO  EDIT  EDLIN  EJECT  EMM386  EXE2BIN  EXIT  FASTOPEN  FC  FDISK  FIND  FOR  FORMAT  GOTO  GRAFTABL  GRAPHICS  HELP  IF  INTERLNK  INTERSVR  JOIN  KEYB  LABEL  LOADFIX  LOADHIGH or LH  MEM  MIRROR  MKDIR or MD  MODE  MORE  MOVE  MSCDEX  MSD  NLSFUNC  PATH  PAUSE  POWER  PRINT  PROMPT  QBASIC  QCONFIG  RECOVER  REM  RENAME or REN  REPLACE  RESTORE  REXX  REXXDUMP  RMDIR or RD  SCANDISK  SET  SETVER  SHARE  SHIFT  SMARTDRV  SORT  SUBST  SYS  TIME  TREE  TRUENAME  TYPE  UNDELETE  UNFORMAT  VER  VERIFY  VOL  XCOPY  See also  External links

Command processing

The command interpreter for DOS runs when no application programs are running. When an application exits, if the transient portion of the command interpreter in memory was overwritten, DOS will reload it from disk. Some commands are internal and built into COMMAND.COM, others are external commands stored on disk. When the user types a line of text at the operating system command prompt, COMMAND.COM will parse the line and attempt to match a command name to a built-in command or to the name of an executable program file or batch file on disk. If no match is found, an error message is printed and the command prompt is refreshed.

External commands were too large to keep in the command processor or were less frequently used. Such utility programs would be stored on disk and loaded just like regular application programs but were distributed with the operating system. Copies of these utility command programs had to be on an accessible disk, either on the current drive or on the command path set in the command interpreter.

In the list below, commands that can accept more than one filename, or a filename including wildcards (* and ?), are said to accept a filespec parameter. Commands that can accept only a single filename are said to accept a filename parameter. Additionally, command line switches, or other parameter strings, can be supplied on the command line. Spaces and symbols such as a "/" or a "-" may be used to allow the command processor to parse the command line into file names, file specifications, and other options.

The command interpreter preserves the case of whatever parameters are passed to commands but the command names themselves and filenames are case-insensitive.

While many commands are the same across many DOS systems (MS-DOS, PC DOS, DR-DOS, FreeDOS, etc.) some differ in command syntax or name.

List of DOS Commands

[edit] ACALC

External - PC DOS 7

Calculates the value of a mathematical expression.

ACALC [/T[:]format] expression

/T Specifies the output format type format D=Decimal (default) B=Binary O=Octal X=heXadecimal A=All (decimal, binary, octal, and hexadecimal) expression Specifies a valid numeric expression.

Numbers prefixed with 'b', 'o', and 'x' are assumed to be binary, octal, and hexadecimal respectively. Decimal numbers are not prefixed.

[edit] APPEND

External - DOS 3.3 and above

Allows programs to open data files in specified directories as if they were in the current directory.

APPEND [[drive:]path[;...]] [/X[:ON | :OFF]] [/PATH:ON | /PATH:OFF] [/E] APPEND ;

[drive:]path Specifies a drive and directory to append. /X:ON Applies appended directories to file searches and application execution. /X:OFF Applies appended directories only to requests to open files. /X:OFF is the default setting. /PATH:ON Applies appended directories to file requests that already specify a path. /PATH:ON is the default setting. /PATH:OFF Turns off the effect of /PATH:ON. /E Stores a copy of the appended directory list in an named APPEND. /E may be used only the first time you use APPEND after starting your system.

Type APPEND ; to clear the appended directory list. Type APPEND without parameters to display the appended directory list.

[edit] ASSIGN

External - DOS 2.0 and above

Further information:

Redirects requests for disk operations on one drive to a different drive.

ASSIGN [x[:]=y[:][...]] ASSIGN /STATUS

x Specifies the drive letter to reassign. y Specifies the drive that x: will be assigned to. /STATUS Displays current drive assignments.

Type ASSIGN without parameters to reset all drive letters to original assignments.

[edit] ATTRIB

External - DOS 3.0 and above

Displays or changes file attributes.

ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [[drive:][path]filename] [/S]

+ Sets an attribute. - Clears an attribute. R Read-only file attribute. A Archive file attribute. S System file attribute. H Hidden file attribute. /S Processes files in all directories in the specified path.

[edit] BACKUP

External - DOS 2.0 and above Backs up one or more files from one disk to another.

BACKUP source destination-drive: [/S] [/M] [/A] [/F[:size]] [/D:date[/T:time]] [/L[:[drive:][path]logfile]]

source Specifies the file(s), drive, or directory to back up. destination-drive: Specifies the drive to save backup copies onto. /S Backs up contents of subdirectories. /M Backs up only files that have changed since the last backup. /A Adds backup files to an existing backup disk. /F:[size] Specifies the size of the disk to be formatted. /D:date Backs up only files changed on or after the specified date. /T:time Backs up only files changed at or after the specified time. /L[:[drive:][path]logfile] Creates a log file and entry to record the backup operation.

[edit] BASIC, BASICA and GW-BASIC

External - DOS 1.0 to DOS 4.0

An implementation of the BASIC programming language for PCs.

IBM computers had Cassette BASIC in ROM; BASIC (Disk BASIC) and BASICA (Advanced BASIC) were extensions to the ROM-based Cassette BASIC.

Microsoft released GW-BASIC for IBM compatible PCs which did not have ROM BASIC. GW- BASIC was a complete BASIC interpreter which was compatible with BASICA. Some OEM releases had BASIC.COM and BASICA.COM as loaders for GW-BASIC.EXE. MS-DOS 5.0 and higher included QBasic instead of GW-BASIC.

[edit] BREAK

Internal - DOS 2.0 and above

Sets or clears extended CTRL+C checking. BREAK [ON | OFF]

Type BREAK without a parameter to display the current BREAK setting.

[edit] CALL

Internal - DOS 3.3 and above

Calls one batch program from another.

CALL [drive:][path]filename [batch-parameters]

batch-parameters Specifies any command-line information required by the batch program.

[edit] CHCP

Internal - DOS 3.3 and above

Displays or sets the active code page number.

CHCP [nnn]

nnn Specifies a code page number.

Type CHCP without a parameter to display the active code page number.

[edit] CHDIR or CD

Internal - DOS 2.0 and above

Displays the name of or changes the current directory.

CHDIR [drive:][path] CHDIR[..] CD [drive:][path] CD[..]

.. Specifies that you want to change to the parent directory.

Type CD drive: to display the current directory in the specified drive. Type CD without parameters to display the current drive and directory. [edit] CHKDSK

External - DOS 1.0 and above

Checks a disk and displays a status report.

CHKDSK [drive:][[path]filename] [/F] [/V]

[drive:][path] Specifies the drive and directory to check. filename Specifies the file(s) to check for fragmentation. /F Fixes errors on the disk. /V Displays the full path and name of every file on the disk.

Type CHKDSK without parameters to check the current disk.

CHKDSK originated as an external command in 86-DOS.

[edit] CHOICE

External - DOS 6.0 and above

Waits for you to choose one of a set of choices.

CHOICE [/C[:]choices] [/N] [/S] [/T[:]c,nn] [text]

/C[:]choices Specifies allowable keys. Default is YN. /N Does not display choices and ? at end of prompt string. /S Treats choice keys as case sensitive. /T[:]c,nn Defaults choice to c after seconds. text Prompts string to display.

ERRORLEVEL is set to offset of key you press in choices.

[edit] CLS

Internal - DOS 2.0 and above

Clears the screen.

CLS

[edit] COMMAND

External - DOS 1.0 and above Starts a new copy of the DOS Command Interpreter.

COMMAND [[drive:]path] [device] [/E:nnnnn] [/P [/MSG]] [/H] [/O] [/Y [/C command | /K command]]

[drive:]path Specifies the directory containing COMMAND.COM file. device Specifies the device to use for command input and output. /E:nnnnn Sets the initial environment size to nnnnn bytes. /P Makes the new Command Interpreter permanent (can't exit). /MSG Stores all error messages in memory (requires /P). /H Loads the Command Interpreter into a UMB if available. /O Disables overwrite prompt on COPY,XCOPY,and MOVE commands. /Y Steps through the batch program specified by /C or /K. /C command Executes the specified command and returns. /K command Executes the specified command and continues running.

The /P and /MSG switches may be used only when COMMAND is started by using the SHELL command in the CONFIG.SYS file.

/O and /Y are only available in DOS 6 and above. /H is only available in PC DOS 7.

COMMAND.COM originated in 86-DOS.

[edit] COMP

External - DOS 1.0 and above

Compares the contents of two files or sets of files.

COMP [data1] [data2] [/D] [/A] [/L] [/N=number] [/C]

data1 Specifies location and name(s) of first file(s) to compare. data2 Specifies location and name(s) of second files to compare. /D Displays differences in decimal format. This is the default setting. /A Displays differences in ASCII characters. /L Displays line numbers for differences. /N=number Compares only the first specified number of lines in each file. /C Disregards case of ASCII letters when comparing files.

To compare sets of files, use wildcards in data1 and data2 parameters.

[edit] COPY

Internal - DOS 1.0 and above

Copies one or more files to another location.

COPY [/A | /B] source [/A | /B] [+ source [/A | /B] [+ ...]] [destination [/A | /B]] [/V] [/Y | /-Y]

source Specifies the file or files to be copied. /A Indicates an ASCII text file. /B Indicates a binary file. destination Specifies the directory and/or filename for the new file(s). /V Verifies that new files are written correctly. /Y Suppresses prompting to confirm you want to overwrite an existing destination file. /-Y Causes prompting to confirm you want to overwrite an existing destination file.

The switch /Y may be preset in the COPYCMD environment variable. To append files, specify a single file for destination, but multiple files for source (using wildcards or file1+file2+file3 format).

/Y and /-Y are only available in DOS 6 and above.

COPY originated as an internal command in 86-DOS.

[edit] CTTY

Internal - DOS 2.0 and above Changes the terminal device used to control your system.

CTTY device

device The terminal device you want to use, such as COM1.

[edit] DATE

External - DOS 1.0 Internal - DOS 1.1 and above

Displays or sets the date.

DATE [date]

Type DATE without parameters to display the current date setting and a prompt for a new one. Press ENTER to keep the same date.

[edit] DEBUG

External - DOS 1.0 and above

Runs Debug, a program testing and editing tool.

DEBUG [[drive:][path]filename [testfile-parameters]]

[drive:][path]filename Specifies the file you want to test. testfile-parameters Specifies command-line information required by the file you want to test.

After Debug starts, type ? to display a list of debugging commands.

DEBUG originated as an external command in 86-DOS.

[edit] DEFRAG

External - DOS 6.0 and above

Further information: Defragmentation

Reorganizes files on disks to optimize performance.

DEFRAG [drive:] [/F] [/Sorder] [/B] [/SKIPHIGH] [/LCD | /BW | /G0] DEFRAG [drive:] [/U] [/B] [/SKIPHIGH] [/LCD | /BW | /G0]

[drive:] Drive letter of disk to be optimized. /F Fully optimizes specified disk. /U Unfragments files, leaving space between files. /S Sort files by specified order. order N By Name (alphabetic) E By extension (alphabetic) D By date & time (earliest first) S By size (smallest first) - Suffix to reverse order /B Restarts your computer after optimization. /SKIPHIGH Prevents Defrag from using extended or upper memory. /LCD Runs Defrag using an LCD color scheme. /BW Runs Defrag using a black and white color scheme. /G0 Disable the graphic mouse and graphic character set.

DEFRAG is a licensed version Norton Utilities Speed Disk.

[edit] DEL or ERASE

Internal - DOS 1.0 and above

Deletes one or more files.

DEL [drive:][path]filename [/P] ERASE [drive:][path]filename [/P]

[drive:][path]filename Specifies the file(s) to delete. Specify multiple files by using wildcards. /P Prompts for confirmation before deleting each file.

/P is only available in DOS 5 and above.

ERASE (but not its DEL) originated as an internal command in 86-DOS. All versions of DR-DOS support the ERA command as an alias to ERASE / DEL and add ERAQ / DELQ shortcuts identical to the DR-DOS ERA / ERASE / DEL command with the /Q (Query) option given to prompt the user for confirmation.

[edit] DELTREE

External - DOS 6.0 and above

Deletes a directory and all the subdirectories and files within it. To Delete one or more directories: DELTREE [/Y] [drive:]path [[drive:]path[...]]

/Y Suppresses prompting to confirm whether you want to delete the subdirectory. [drive:]path Specifies the name of the directory you want to delete.

Note: Use DELTREE with caution. Every file and subdirectory within the specified directory will be deleted.

[edit] DIR

Internal - DOS 1.0 and above

Displays a list of files and subdirectories in a directory.

DIR [drive:][path][filename] [/P] [/W] [/A[[:]attribs]] [/O[[:]sortord]] [/S] [/B] [/L]

[drive:][path][filename] Specifies drive, directory, and files to list. /P Pauses after each full screen of information. /W Uses wide list format. /A Displays files with specified attributes. attribs D Directories R Read-only files H Hidden files S System files A Files ready to archive - Prefix meaning "not" /O Lists by files in sorted order. sortord N By name (alphabetic) S By size (smallest first) E By extension (alphabetic) D By date & time (earliest first) G Group directories first - Prefix to reverse order /S Displays files in specified directory and all subdirectories. /B Uses bare format (no heading information or summary). /L Uses lowercase.

Switches may be preset in the DIRCMD environment variable. Override preset switches by prefixing any switch with - (hyphen)--for example, /-W. To remove the commas from the DIR output, use the NO_SEP environment variable.

Only /P and /W are available prior to DOS 5.

DIR originated as an internal command in 86-DOS.

[edit] DISKCOMP

External - DOS 1.0 and above

Compares the contents of two floppy disks.

DISKCOMP [drive1: [drive2:]] [/1] [/8]

/1 Compares the first side of the disks. /8 Compares only the first eight sectors of each track.

[edit] DISKCOPY

External - DOS 1.0 and above

Copies the contents of one to another.

DISKCOPY [drive1: [drive2:]] [/1] [/V] [/M]

/1 Copies only the first side of the disk. /V Verifies that the information is copied correctly. /M Force multi-pass copy using memory only.

The two floppy disks must be the same type. You may specify the same drive for drive1 and drive2.

[edit] DOSKEY

External - DOS 5.0 and above

Edits command lines, recalls DOS commands, and creates macros.

DOSKEY [/REINSTALL] [/BUFSIZE=size] [/MACROS] [/HISTORY] [/INSERT | /OVERSTRIKE] [macroname=[text]]

/REINSTALL Installs a new copy of Doskey. /BUFSIZE=size Sets size of command history buffer. /MACROS Displays all Doskey macros. /HISTORY Displays all commands stored in memory. /INSERT Specifies that new text you type is inserted in old text. /OVERSTRIKE Specifies that new text overwrites old text. macroname Specifies a name for a macro you create. text Specifies commands you want to record.

UP and DOWN ARROWS recall commands; ESC clears command line; F7 displays command history; ALT+F7 clears command history; F8 searches command history; F9 selects a command by number; ALT+F10 clears macro definitions.

The following are some special codes in Doskey macro definitions: $T Command separator. Allows multiple commands in a macro. $1-$9 Batch parameters. Equivalent to %1-%9 in batch programs. $* Symbol replaced by everything following macro name on command line.

[edit] DRVLOCK

External - PC DOS 5.02 and above

Locks the drive or socket so that media cannot be removed.

DRVLOCK [drive: | socket:] [/ON | /OFF]

/ON Sets the lock on. /OFF Sets the lock off.

DRVLOCK is only included with PC DOS versions.

[edit] DYNALOAD

External - PC DOS 7

Load a after system startup.

DYNALOAD filename [parameters]

filename Specifies the name of the device driver to load. parameters Specifies any parameters for the device driver. [edit] E

External - PC DOS 6.1 and above

Starts PC DOS editor, which creates and changes ASCII files.

E [/Q] [/B] [/S] [/D] [/I] [/C] [/A] [/DM] [/80 |/132] [d:][path][filespec] [=filespec] ['command']

/Q Turns off display of "Loading .." message. /B Displays files in browse (read-only) mode. /S Uses EMS (or hardfile if no EMS is available) to edit files too large for conventional memory. /D Forces file to be loaded from disk. /I Edits STACKER.INI file. /C Edits CONFIG.SYS file. /A Edits AUTOEXEC.BAT file. /DM Disables Mouse. /80 Enables 80 column, 16 color text video (CGA/EGA/MCGA/VGA/SVGA/XGA). /132 Enables 132 column, 16 color text video (XGA). [d:][path][filespec] Specifies drive, directory, and file to edit. = Is shorthand for "same path as last specified" at the DOS prompt, or "same as current file's" at the editor commandline. For example, E \PAS\LANG\FOO.PAS =FOO.BAK will load the two files FOO.PAS and FOO.BAK, both from the directory \PAS\LANG. 'command' Specifies a startup command. For example, E \FOO.PAS 'ALL /IF' will load the file FOO.PAS and then execute the ALL command on this file.

Switches may be preset in the E environment variable.

E is only included with PC DOS versions and replaces the MS-DOS editor EDIT.

[edit] ECHO

Internal - DOS 2.0 and above Displays messages, or turns command-echoing on or off.

ECHO [ON | OFF] ECHO [message]

Type ECHO without parameters to display the current echo setting.

[edit] EDIT

External - MS-DOS 5.0 and above

Starts the MS-DOS editor, which creates and changes ASCII files.

EDIT [[drive:][path]filename] [/B] [/G] [/H] [/NOHI]

[drive:][path]filename Specifies the ASCII file to edit. /B Allows use of a monochrome monitor with a color graphics card. /G Provides the fastest update of a CGA screen. /H Displays the maximum number of lines possible for your hardware. /NOHI Allows the use of a monitor without high-intensity support.

PC DOS 6.1 and later use the E editor.

[edit] EDLIN

External - DOS 1.0 and above

Line-oriented text editor.

EDLIN [:][path]filename [/B]

/B Ignores end-of-file (CTRL+Z) characters.

EDLIN originated as an external command in 86-DOS.

[edit] EJECT

External - PC DOS 5.02 and above

Ejects the media from a drive.

EJECT [drive:] EJECT is only included with PC DOS versions.

[edit] EMM386

External - DOS 5.0 and above

Turns on or off EMM386 expanded memory support.

EMM386 [ON | OFF | AUTO] [W=ON | W=OFF]

ON | OFF | AUTO Activates or suspends EMM386.EXE device driver, or places it in auto mode. W=ON | OFF Turns on or off Weitek coprocessor support.

EMM386.EXE must be loaded as a device driver in CONFIG.SYS in order to use this command.

[edit] EXE2BIN

External - DOS 1.0 and above

Converts .EXE (executable) files to binary format.

EXE2BIN [drive1:][path1]input-file [[drive2:][path2]output-file]

input-file Specifies the .EXE file to be converted. output-file Specifies the binary file to be created.

[edit] EXIT

Internal - DOS 2.0 and above

Quits the COMMAND.COM program (command interpreter).

EXIT

[edit] FASTOPEN

External - DOS 3.3 to DOS 6.3

Decreases the amount of time needed to open frequently used files and directories.

FASTOPEN drive:[[=]n] [drive:[[=]n][ ...]] [/X]

drive: Specifies the you want Fastopen to work with. n Specifies the maximum number of file locations Fastopen retains in its filename cache. /X Creates the filename cache in expanded memory.

[edit] FC

External - DOS 3.3 and above

Compares two files or sets of files and displays the differences between them.

FC [/A] [/C] [/L] [/LBn] [/N] [/T] [/W] [/nnnn] [drive1:][path1]filename1 [drive2:][path2]filename2 FC /B [drive1:][path1]filename1 [drive2:][path2]filename2

/A Displays only first and last lines for each set of differences. /B Performs a binary comparison. /C Disregards the case of letters. /L Compares files as ASCII text. /LBn Sets the maximum consecutive mismatches to the specified number of lines. /N Displays the line numbers on an ASCII comparison. /T Does not expand tabs to spaces. /W Compresses white space (tabs and spaces) for comparison. /nnnn Specifies the number of consecutive lines that must match after a mismatch.

[edit] FDISK

External - DOS 2.0 and above

Configures a hard disk for use with DOS.

FDISK [/STATUS]

/STATUS Displays the status of the fixed disk drive

[edit] FIND

External - DOS 2.0 and above Searches for a text string in a file or files.

FIND [/V] [/C] [/N] [/I] [/S] "string" [[drive:][path]filename[ ...]]

/V Displays all lines NOT containing the specified string. /C Displays only the count of lines containing the string. /N Displays line numbers with the displayed lines. /I Ignores the case of characters when searching for the string. /S Search subdirectories also. "string" Specifies the text string to find. [drive:][path]filename Specifies a file or files to search.

If a pathname is not specified, FIND searches the text typed at the prompt or piped from another command.

/S is only available in PC DOS 7. Also PC DOS 7 allows the use of wildcards in filenames while prior versions do not.

[edit] FOR

Internal - DOS 2.0 and above

Runs a specified command for each file in a set of files.

FOR %variable IN (set) DO command [command-parameters]

%variable Specifies a replaceable parameter. (set) Specifies a set of one or more files. Wildcards may be used. command Specifies the command to carry out for each file. command-parameters Specifies parameters or switches for the specified command.

To use the FOR command in a batch program, specify %%variable instead of %variable.

[edit] FORMAT

External - DOS 1.0 and above Formats a disk for use with DOS.

FORMAT drive: [/V[:label]] [/Q] [/U] [/F:size] [/B | /S] [/C] FORMAT drive: [/V[:label]] [/Q] [/U] [/T:tracks /N:sectors] [/B | /S] [/C] FORMAT drive: [/V[:label]] [/Q] [/U] [/1] [/4] [/B | /S] [/C] FORMAT drive: [/Q] [/U] [/1] [/4] [/8] [/B | /S] [/C]

/V[:label] Specifies the volume label. /Q Performs a quick format. /U Performs an unconditional format. /F:size Specifies the size of the floppy disk to format (such as 160, 180, 320, 360, 720, 1.2, 1.44, 2.88). /B Allocates space on the formatted disk for system files. /S Copies system files to the formatted disk. /T:tracks Specifies the number of tracks per disk side. /N:sectors Specifies the number of sectors per track. /1 Formats a single side of a floppy disk. /4 Formats a 5.25-inch 360K floppy disk in a high- density drive. /8 Formats eight sectors per track. /C Revert to less conservative handling of bad blocks.

/Q and /U are only available in DOS 5 and above. /C is only available in DOS 6 and above.

FORMAT replaced the internal command CLEAR in 86-DOS.

[edit] GOTO

Internal - DOS 2.0 and above

Directs DOS to a labelled line in a batch program.

GOTO label

label Specifies a text string used in the batch program as a label.

You type a label on a line by itself, beginning with a colon.

[edit] GRAFTABL

External - DOS 3.0 and above Enables DOS to display an extended character set in graphics mode.

GRAFTABL [xxx] GRAFTABL /STATUS

xxx Specifies a code page number. /STATUS Displays the current code page selected for use with GRAFTABL.

[edit] GRAPHICS

External - DOS 2.0 and above

Loads a program that can print graphics.

GRAPHICS [type] [[drive:][path]filename] [/R] [/B] [/LCD] [/PRINTBOX:STD | /PRINTBOX:LCD]

type Specifies a printer type. [drive:][path]filename Specifies the file containing information on supported printers. /R Prints white on black as seen on the screen. /B Prints the background in color for COLOR4 and COLOR8 printers. /LCD Prints using LCD aspect ratio. /PRINTBOX:STD | /PRINTBOX:LCD Specifies the print-box size, either STD or LCD.

This command uses the file GRAPHICS.PRO which contains information about the supported printer types.

[edit] HELP

External - DOS 5.0 and above

Displays command help.

HELP [topic]

 MS-DOS versions use QBASIC.EXE and QuickHelp files for its help system.  PC DOS versions use VIEW.EXE and Information Presentation Facility files for its help system.

[edit] IF

Internal - DOS 2.0 and above Performs conditional processing in batch programs.

IF [NOT] ERRORLEVEL number command IF [NOT] string1==string2 command IF [NOT] EXIST filename command

NOT Specifies that DOS should carry out the command only if the condition is false. ERRORLEVEL number Specifies a true condition if the last program run returned an exit code equal to or greater than the number specified. command Specifies the command to carry out if the condition is met. string1==string2 Specifies a true condition if the specified text strings match. EXIST filename Specifies a true condition if the specified filename exists.

[edit] INTERLNK

External - DOS 5.02 and above

Displays status of INTERLNK-INTERSVR redirected drives.

INTERLNK [client=[server]]

client Specifies a client drive to redirect to a server drive. Cancels redirection if no server drive is specified. server Specifies a server drive to redirect to a client drive.

Type INTERLNK with no parameters to show INTERLNK status.

INTERLNK.EXE must be loaded as a device driver in CONFIG.SYS in order to use this command.

[edit] INTERSVR

External - DOS 5.02 and above Provides serial or parallel file transfer and printing capabilities via redirected drives.

INTERSVR [drive:[...]] [/X=drive:[...]] [/LPT[:][n | address]] [/COM[:][n | address]] [/baud:rate] [/v] [/b]

drive: Specifies the drive(s) to redirect (by default, all drives are redirected). /X=drive: Specifies the drive(s) to exclude. /LPT[n] Specifies a port to scan. (/LPT scans all LPT ports). /LPT[address] Specifies a port address to scan. /COM[n] Specifies a port to scan. (/COM scans all COM ports). /COM[address] Specifies a port address to scan. /BAUD:rate Set a maximum serial baud rate. /B Displays the INTERLNK server screen in black and white. /V Prevents conflicts with a computer's timer. Specify this switch if you have a serial connection between computers and one of them stops running when you use INTERLNK.

INTERSVR /RCOPY

Copies INTERLNK files from one computer to another, provided that the computers' serial ports are connected with a 7-wire null-modem cable.

[edit] JOIN

External - DOS 3.1 and above

Joins a disk drive to a directory on another drive.

JOIN [drive1: [drive2:]path] JOIN drive1: /D

drive1: Specifies a disk drive that will appear as a directory on drive2. drive2: Specifies a drive to which you want to join drive1. path Specifies the directory to which you want to join drive1. It must be empty and cannot be the root directory. /D Cancels any previous JOIN commands for the specified drive.

Type JOIN without parameters to list currently joined drives.

[edit] KEYB

External - DOS 3.3 and above

Configures a keyboard for a specific language.

KEYB [xx[,[yyy][,[drive:][path]filename]]] [/E] [/ID:nnn]

xx Specifies a two-letter keyboard code. yyy Specifies the code page for the character set. [drive:][path]filename Specifies the keyboard definition file. /E Specifies that an enhanced keyboard is installed. /ID:nnn Specifies the keyboard in use.

KEYB replaces the commands KEYBFR, KEYBGR, KEYBIT, KEYBSP and KEYBUK from DOS 3.0 to 3.2.

[edit] LABEL

External - DOS 3.0 and above

Creates, changes, or deletes the volume label of a disk.

LABEL [drive:][label]

[edit] LOADFIX

External - DOS 5.0 and above

Loads a program above the first 64K of memory, and runs the program.

LOADFIX [drive:][path]filename

Use LOADFIX to load a program if you have received the message "Packed file corrupt" when trying to load it in low memory.

[edit] LOADHIGH or LH

Internal - DOS 5.0 and above Loads a program into the upper memory area.

LOADHIGH [drive:][path]filename [parameters] LOADHIGH [/L:region1[,minsize1][;region2[,minsize2]...]] [drive:][path]filename [parameters]

/L:region1[,minsize1][;region2[,minsize2]]... Specifies the region(s) of memory into which to load the program. Region1 specifies the number of the first memory region; minsize1 specifies the minimum size, if any, for region1. Region2 and minsize2 specify the number and minimum size of the second region, if any. You can specify as many regions as you want. [drive:][path]filename Specifies the location and name of the program. parameters Specifies any command-line information required by the program.

/L is only available in DOS 6 and above.

[edit] MEM

External - DOS 4.0 and above

Displays the amount of used and free memory in your system.

MEM [/CLASSIFY | /DEBUG | /FREE | /MODULE modulename] [/PAGE]

/CLASSIFY or /C Classifies programs by memory usage. Lists the size of programs, provides a summary of memory in use, and lists the largest memory block available. /DEBUG or /D Displays status of all modules in memory, internal drivers, and other information. /FREE or /F Displays information about the amount of free memory left in both conventional and upper memory. /MODULE or /M Displays a detailed listing of a module's memory use. This option must be followed by the name of a module, optionally separated from /M by a colon. /PAGE or /P Pauses after each full screen of information.

[edit] MIRROR

External - DOS 5.0 and above

Records information about one or more disks.

MIRROR [drive:[ ...]] [/1] [/Tdrive[-entries][ ...]] MIRROR [/U] MIRROR [/PARTN]

drive: Specifies the drive for which you want to save information. /1 Saves only the latest disk information (does not back up previous information). /Tdrive Loads the deletion-tracking program for the specified drive. -entries Specifies maximum number of entries in the deletion-tracking file. /U Unloads the deletion-tracking program. /PARTN Saves hard disk partition information to a floppy diskette.

MIRROR is licensed from Central Point Software PC Tools

[edit] MKDIR or MD

Internal - DOS 2.0 and above

Creates a directory.

MKDIR [drive:]path MD [drive:]path

[edit] MODE

External - DOS 1.0 and above

Configures system devices.

Printer port: MODE LPTn[:] [COLS=c] [LINES=l] [RETRY=r] Serial port: MODE COMm[:] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s] [RETRY=r] Device Status: MODE [device] [/STATUS] Redirect printing: MODE LPTn[:]=COMm[:] Prepare code page: MODE device CP PREPARE=((yyy[...]) [drive:][path]filename) Select code page: MODE device CP SELECT=yyy Refresh code page: MODE device CP REFRESH Code page status: MODE device CP [/STATUS] Display mode: MODE [display-adapter][,n] MODE CON[:] [COLS=c] [LINES=n] Typematic rate: MODE CON[:] [RATE=r DELAY=d]

[edit] MORE

External - DOS 2.0 and above

Displays output one screen at a time.

MORE < [drive:][path]filename command-name | MORE

[drive:][path]filename Specifies a file to display one screen at a time. command-name Specifies a command whose output will be displayed.

[edit] MOVE

External - DOS 6.0 and above

Moves files and renames files and directories.

To move one or more files: MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination To rename a directory: MOVE [drive:][path]dirname1 dirname2

/Y Suppresses prompting to confirm overwriting of the destination. /-Y Causes prompting to confirm overwriting of the destination. The switch /Y may be present in the COPYCMD environment variable. This may be overridden with /-Y on the command line.

[drive:][path]filename1 Specifies the location and name of the file or files you want to move. destination Specifies the new location of the file. Destination can consist of a drive letter and colon, a directory name, or a combination. If you are moving only one file, you can also include a filename if you want to rename the file when you move it. [drive:][path]dirname1 Specifies the directory you want to rename. dirname2 Specifies the new name of the directory.

[edit] MSCDEX

External - DOS 6.0 and above

Loads the CD-ROM support utility.

MSCDEX /D:driver ... [/E] [/K] [/L:letter] [/M:buffers] [/S] [/V]

/D:driver Specifies name of CD-ROM driver /E Load buffers in expanded memory (EMS) /K Load Kanji support /L:letter Specifies first drive letter to use /M:buffers Specifies number of sector buffers /S Load server environment support /V Display verbose memory usage statistics

[edit] MSD

External - MS-DOS 6.0 and above

Provides detailed technical information about your computer.

MSD [/I] [/F[drive:][path]filename] [/P[drive:][path]filename] [/S[drive:][path][filename]]

MSD [/B][/I]

/B Runs MSD using a black and white color scheme. /I Bypasses initial hardware detection. /F[drive:][path]filename Requests input and writes an MSD report to the specified file. /P[drive:][path]filename Writes an MSD report to the specified file without first requesting input. /S[drive:][path][filename] Writes a summary MSD report to the specified file. If no filename is specified, output is to the screen.

MSD is only included with MS-DOS versions, PC DOS uses QCONFIG.

[edit] NLSFUNC

External - DOS 3.3 and above

Loads country-specific information.

NLSFUNC [[drive:][path]filename]

[drive:][path]filename Specifies the file containing country-specific information.

[edit] PATH

Internal - DOS 2.0 and above

Displays or sets a search path for executable files.

PATH [[drive:]path[;...]] PATH ;

Type PATH ; to clear all search-path settings and direct DOS to search only in the current directory. Type PATH without parameters to display the current path.

[edit] PAUSE

Internal - DOS 1.0 and above

Suspends processing of a batch program and displays the message "Press any key to continue...."

PAUSE

PAUSE originated as an internal command in 86-DOS. [edit] POWER

External - DOS 5.02 and above

Reduces power used by your computer.

POWER [ADV[:MAX | REG | MIN] | STD | OFF]

ADV[:MAX | REG | MIN] -- Reduces power by monitoring applications and hardware devices. MAX provides the most power conservation, REG provides average power conservation, and MIN provides the least conservation. STD -- Reduces power by monitoring hardware devices. OFF -- Turns off power management.

POWER.EXE must be loaded as a device driver in CONFIG.SYS in order to use this command.

[edit] PRINT

External - DOS 2.0 and above

Prints a text file while you are using other DOS commands.

PRINT [/D:device] [/B:size] [/U:ticks1] [/M:ticks2] [/S:ticks3] [/Q:qsize] [/T] [[drive:][path]filename[ ...]] [/C] [/P]

/D:device Specifies a print device. /B:size Sets the internal buffer size, in bytes. /U:ticks1 Waits the specified maximum number of clock ticks for the printer to be available. /M:ticks2 Specifies the maximum number of clock ticks it takes to print a character. /S:ticks3 Allocates the scheduler the specified number of clock ticks for background printing. /Q:qsize Specifies the maximum number of files allowed in the print queue. /T Removes all files from the print queue. /C Cancels printing of the preceding filename and subsequent filenames. /P Adds the preceding filename and subsequent filenames to the print queue.

Type PRINT without parameters to display the contents of the print queue.

[edit] PROMPT

Internal - DOS 2.0 and above

Changes the DOS command prompt.

PROMPT [text]

text Specifies a new command prompt.

Prompt can be made up of normal characters and the following special codes:

$Q = (equal sign) $$ $ (dollar sign) $T Current time $D Current date $P Current drive and path $V DOS version number $N Current drive $G > (greater-than sign) $L < (less-than sign) $B | (pipe) $H Backspace (erases previous character) $E Escape code (ASCII code 27) $_ Carriage return and linefeed

Type PROMPT without parameters to reset the prompt to the default setting.

[edit] QBASIC

External - MS-DOS 5.0 and above

Further information: QBASIC

Starts the MS-DOS QBasic programming environment.

QBASIC [/B] [/EDITOR] [/G] [/H] [/MBF] [/NOHI] [[/RUN] [drive:][path]filename]

/B Allows use of a monochrome monitor with a color graphics card. /EDITOR Starts the MS-DOS editor. /G Provides the fastest update of a CGA screen. /H Displays the maximum number of lines possible for your hardware. /MBF Converts the built-in functions MKS$, MKD$, CVS, and CVD to MKSMBF$, MKDMBF$, CVSMBF, and CVDMBF, respectively. /NOHI Allows the use of a monitor without high-intensity support. /RUN Runs the specified Basic program before displaying it. [[drive:][path]filename] Specifies the program file to load or run.

QBASIC replaces GW-BASIC from earlier versions of DOS.

[edit] QCONFIG

External - PC DOS 6.1 and above

Displays detailed technical information about your computer.

QCONFIG [/?][/A][/C][/D][/E][/I][/O[file]][/P][/Q] [key="text"]

/? Displays this help information. /A Displays all Micro Channel adapters supported by QCONFIG. /C Displays additional detail on async ports. /D Displays a detailed listing of hardware. /E Displays current environment. /I Displays CONFIG.SYS & AUTOEXEC.BAT. /O Redirects output to file QCONFIG.OUT. /Ofile Redirects output to file (anyname). /P Pauses the output between screens. /Q Does not display redirect message. key="text" Defines key with text to appear in output (must be last option).

QCONFIG is only included with PC DOS versions and replaces the Microsoft MSD utility.

[edit] RECOVER

External - DOS 2.0 to DOS 5.0 Recovers readable information from a bad or defective disk.

RECOVER [drive:][path]filename RECOVER drive:

[edit] REM

Internal - DOS 1.0 and above

Records comments (remarks) in a batch file or CONFIG.SYS.

REM [comment]

[edit] RENAME or REN

Internal - DOS 1.0 and above

Renames a file or files.

RENAME [drive:][path]filename1 filename2 REN [drive:][path]filename1 filename2

Note that you cannot specify a new drive or path for your destination file.

Use MOVE to move files from one directory to another, or to rename a directory.

RENAME (but not its alias REN) originated as an internal command in 86-DOS.

[edit] REPLACE

External - DOS 3.2 and above

Replaces files.

REPLACE [drive1:][path1]filename [drive2:][path2] [/A] [/P] [/R] [/W] REPLACE [drive1:][path1]filename [drive2:][path2] [/P] [/R] [/S] [/W] [/U]

[drive1:][path1]filename Specifies the source file or files. [drive2:][path2] Specifies the directory where files are to be replaced. /A Adds new files to destination directory. Cannot use with /S or /U switches. /P Prompts for confirmation before replacing a file or adding a source file. /R Replaces read-only files as well as unprotected files. /S Replaces files in all subdirectories of the destination directory. Cannot use with the /A switch. /W Waits for you to insert a disk before beginning. /U Replaces (updates) only files that are older than source files. Cannot use with the /A switch.

[edit] RESTORE

External - DOS 2.0 and above

Restores files that were backed up by using the BACKUP command.

RESTORE drive1: drive2:[path[filename]] [/S] [/P] [/B:date] [/A:date] [/E:time] [/L:time] [/M] [/N] [/D]

drive1: Specifies the drive on which the backup files are stored. drive2:[path[filename]] Specifies the file(s) to restore. /S Restores files in all subdirectories in the path. /P Prompts before restoring read-only files or files changed since the last backup (if appropriate attributes are set). /B Restores only files last changed on or before the specified date. /A Restores only files changed on or after the specified date. /E Restores only files last changed at or earlier than the specified time. /L Restores only files changed at or later than the specified time. /M Restores only files changed since the last backup. /N Restores only files that no longer exist on the destination disk. /D Displays files on the backup disk that match specifications.

[edit] REXX

External - PC DOS 7

Further information: REXX

Execute a REXX program.

REXX filename [parameters]

filename Specifies the name of the REXX program to execute. parameters Specifies any parameters for the REXX program.

[edit] REXXDUMP

External - PC DOS 7

Dump the variables of an active REXX procedure.

REXXDUMP

[edit] RMDIR or RD

Internal - DOS 2.0 and above

Removes (deletes) a directory.

RMDIR [drive:]path RD [drive:]path

[edit] SCANDISK

External - MS-DOS 6.2 and above

Runs the ScanDisk disk-repair program.

To check and repair a drive, use the following syntax: SCANDISK [drive: | /ALL] [/CHECKONLY | /AUTOFIX [/NOSAVE]] [/SURFACE] To check and repair an unmounted DriveSpace compressed volume file, use: SCANDISK drive:\DRVSPACE.nnn [/CHECKONLY | /AUTOFIX[/NOSAVE]] To examine a file for fragmentation, use the following syntax: SCANDISK /FRAGMENT [drive:][path]filename To undo repairs you made previously, use the following syntax: SCANDISK /UNDO [drive:] For [drive:], specify the drive containing your Undo disk.

/ALL Checks and repairs all local drives. /AUTOFIX Fixes damage without prompting. /CHECKONLY Checks a drive, but does not repair any damage. /CUSTOM Configures and runs ScanDisk according to SCANDISK.INI settings. /NOSAVE With /AUTOFIX, deletes lost clusters rather than saving as files. /NOSUMMARY With /CHECKONLY or /AUTOFIX, prevents ScanDisk from stopping at summary screens. /SURFACE Performs a surface scan after other checks. /MONO Configures ScanDisk for use with a monochrome display.

To check and repair the current drive, type SCANDISK without parameters.

Scandisk is only included with MS-DOS versions.

[edit] SET

Internal - DOS 2.0 and above

Displays, sets, or removes DOS environment variables.

SET [variable=[string]]

variable Specifies the environment-variable name. string Specifies a series of characters to assign to the variable.

Type SET without parameters to display the current environment variables.

[edit] SETVER

External - DOS 5.0 and above

Sets the version number that DOS reports to a program.

Display current version table: SETVER [drive:path] Add entry: SETVER [drive:path] filename n.nn Delete entry: SETVER [drive:path] filename /DELETE [/QUIET]

[drive:path] Specifies location of the SETVER.EXE file. filename Specifies the filename of the program. n.nn Specifies the DOS version to be reported to the program. /DELETE or /D Deletes the version-table entry for the specified program. /QUIET Hides the message typically displayed during deletion of version-table entry.

SETVER.EXE must be loaded as a device driver in CONFIG.SYS in order to use this command. While the internal version setting functionality was present in DOS 4, the SETVER command did not appear until DOS 5.

[edit] SHARE

External - DOS 3.0 and above

Installs file-sharing and locking capabilities on your hard disk.

SHARE [/F:space] [/L:locks] [/NOHMA]

/F:space Allocates file space (in bytes) for file-sharing information. /L:locks Sets the number of files that can be locked at one time. /NOHMA Don't load code into the HMA.

/NOHMA is only available in PC DOS 7.

[edit] SHIFT

Internal - DOS 2.0 and above

Changes the position of replaceable parameters in a batch file.

SHIFT

[edit] SMARTDRV

External - DOS 6.0 and above Installs and configures the SMARTDrive disk-caching utility.

SMARTDRV [/X] [[drive[+|-]]...] [/U] [/C | /R] [/L] [/V | /Q | /S] [InitCacheSize [WinCacheSize]] [/E:ElementSize] [/B:BufferSize]

/X Disables write-behind caching for all drives. drive Sets caching options on specific drive(s). The specified drive(s) will have write-caching disabled unless you add +. + Enables write-behind caching for the specified drive. - Disables all caching for the specified drive. /U Do not load CD-ROM caching module. /C Writes all information currently in write-cache to hard disk. /R Clears the cache and restarts SMARTDrive. /L Prevents SMARTDrive from loading itself into upper memory. /V Displays SMARTDrive status messages when loading. /Q Does not display status information. /S Displays additional information about SMARTDrive's status. InitCacheSize Specifies XMS memory (KB) for the cache. WinCacheSize Specifies XMS memory (KB) for the cache with Windows. /E:ElementSize Specifies how many bytes of information to move at one time. /B:BufferSize Specifies the size of the read-ahead buffer.

[edit] SORT

External - DOS 2.0 and above

Sorts input and writes results to the screen, a file, or another device.

SORT [/R] [/+n] < [drive1:][path1]filename1 [> [drive2:][path2]filename2] [command |] SORT [/R] [/+n] [> [drive2:][path2]filename2]

/R Reverses the sort order; that is, sorts Z to A, then 9 to 0. /+n Sorts the file according to characters in column n. [drive1:][path1]filename1 Specifies a file to be sorted. [drive2:][path2]filename2 Specifies a file where the sorted input is to be stored. command Specifies a command whose output is to be sorted.

[edit] SUBST

External - DOS 3.1 and above

Associates a path with a drive letter.

SUBST [drive1: [drive2:]path] SUBST drive1: /D

drive1: Specifies a virtual drive to which you want to assign a path. [drive2:]path Specifies a physical drive and path you want to assign to a virtual drive. /D Deletes a substituted (virtual) drive.

Type SUBST with no parameters to display a list of current virtual drives.

[edit] SYS

External - DOS 1.0 and above

Copies DOS system files and command interpreter to a disk you specify.

SYS [drive1:][path] drive2:

[drive1:][path] Specifies the location of the system files. drive2: Specifies the drive the files are to be copied to.

SYS originated as an external command in 86-DOS.

[edit] TIME

External - DOS 1.0 Internal - DOS 1.1 and above

Displays or sets the system time. TIME [time]

Type TIME with no parameters to display the current time setting and a prompt for a new one. Press ENTER to keep the same time.

[edit] TREE

External - DOS 2.0 and above

Graphically displays the directory structure of a drive or path.

TREE [drive:][path] [/F] [/A]

/F Displays the names of the files in each directory. /A Uses ASCII instead of extended characters.

[edit] TRUENAME

Internal - DOS 4.0 and above

Returns a fully qualified filename.

TRUENAME [drive:][path]filename

This command was undocumented in DOS 3.x.

[edit] TYPE

Internal - DOS 1.0 and above

Displays the contents of a text file.

TYPE [drive:][path]filename

TYPE originated as an internal command in 86-DOS.

[edit] UNDELETE

External - DOS 5.0 and above

Restores files previously deleted with the DEL command.

UNDELETE [[drive:][path]filename] [/DT | /DS | /DOS] UNDELETE [/LIST | /ALL | /PURGE[DRIVE] | /STATUS | /LOAD | /UNLOAD /S[DRIVE] | /T[DRIVE]-entrys ]]

/LIST Lists the deleted files available to be recovered. /ALL Recovers files without prompting for confirmation. /DOS Recovers files listed as deleted by MS- DOS. /DT Recovers files protected by Delete Tracker. /DS Recovers files protected by Delete Sentry. /LOAD Loads Undelete into memory for delete protection. /UNLOAD Unloads Undelete from memory. /PURGE[drive] Purges all files in the Delete Sentry directory. /STATUS Display the protection method in effect for each drive. /S[drive] Enables Delete Sentry method of protection. /T[drive][-entrys] Enables Delete Tracking method of protection.

UNDELETE is licensed from Central Point Software PC Tools

[edit] UNFORMAT

External - DOS 5.0 and above

Restores a disk erased by the FORMAT command.

UNFORMAT drive: [/J] UNFORMAT drive: [/U] [/L] [/TEST] [/P] UNFORMAT /PARTN [/L]

drive: Specifies the drive to unformat. /J Verifies that the mirror files agree with the system information on the disk. /U Unformats without using MIRROR files. /L Lists all file and directory names found, or, when used with the /PARTN switch, displays current partition tables. /TEST Displays information but does not write changes to disk. /P Sends output messages to printer connected to LPT1. /PARTN Restores disk partition tables. UNFORMAT is licensed from Central Point Software PC Tools

[edit] VER

Internal - DOS 2.0 and above

Displays the DOS version.

VER

The undocumented /R switch displays the revision level and where DOS is loaded (low, HMA or ROM) in DOS 5 and above.

Version returned:

 MS-DOS up to 6.22, typically derive the DOS version from the DOS kernel. This may be different from the string it prints when it starts.  PC DOS typically derive the version from an internal string in COMMAND.COM (so PC DOS 6.1 COMMAND.COM reports the version as 6.10, although the kernel version is 6.00.)  DR-DOS reports whatever value the reserved environment variable VER holds.

[edit] VERIFY

Internal - DOS 2.0 and above

Tells DOS whether to verify that your files are written correctly to a disk.

VERIFY [ON | OFF]

Type VERIFY without a parameter to display the current VERIFY setting.

[edit] VOL

Internal - DOS 2.0 and above

Displays the disk volume label and serial number, if they exist.

VOL [drive:]

[edit] XCOPY

External - DOS 3.2 and above

Copy entire directory trees. XCOPY [/Y|/-Y] source [destination] [/A|/M] [/D:date] [/P] [/S] [/E] [/V] [/W] source Specifies the file(s) to copy. destination Specifies the location and/or name of new files. /A Copies files with the archive attribute set, doesn't change the attribute. /M Copies files with the archive attribute set, turns off the archive attribute. /D:date Copies files changed on or after the specified date. /P Prompts you before creating each destination file. /S Copies directories and subdirectories except empty ones. /E Copies any subdirectories, even if empty. /V Verifies each new file. /W Prompts you to press a key before copying. /Y Suppresses prompting to confirm you want to overwrite an existing destination file. /-Y Causes prompting to confirm you want to overwrite an existing destination file.

The switch /Y may be preset in the COPYCMD environment variable. This may be overridden with /-Y on the command line

/Y and /-Y are only available in DOS 6 and above.

Renaming the XCOPY program file to MCOPY under MS-DOS 3.2, the command will no longer ask for confirmation if the target was meant as file or directory. Instead, it will then automatically assume the target to be an directory, if the source was given as a directory or as multiple files or was ending on "\". DOS

From Wikipedia, the free encyclopedia

Jump to: navigation, search

This article is about the family of operating systems for -based computers (most commonly IBM PC- compatibles). For other uses, see DOS (disambiguation).

FreeDOS screenshot showing the command line interface, directory structure and version information.

DOS (/dɒs/), short for "",[1] is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.

Related systems include MS-DOS, PC-DOS, DR-DOS, FreeDOS, PTS-DOS, ROM- DOS, Novell DOS, OpenDOS, 86-DOS and several others.

In spite of the common usage, none of these systems were simply named "DOS" (a name given only to an unrelated IBM mainframe operating system in the 1960s). A number of unrelated, non-x86 microcomputer disk operating systems had "DOS" in their name, and are often referred to simply as "DOS" when discussing machines that use them (e.g. AmigaDOS, AMSDOS, ANDOS, Apple DOS, Atari DOS, Commodore DOS, CSI-DOS, ProDOS, and TRS-DOS). While providing many of the same operating system functions for their respective computer systems, programs running under any one of these operating systems would not run under others.

Contents

[hide]

 1 History o 1.1 Origins o 1.2 Decline o 1.3 Continued use . 1.3.1 Embedded systems . 1.3.2 Emulation  2 Design o 2.1 Boot sequence o 2.2 File system . 2.2.1 Drive naming scheme . 2.2.2 Reserved device names o 2.3 Memory management o 2.4 DOS under OS/2 and Windows  3 o 3.1 Terminate and Stay Resident  4 Software  5 See also  6 References  7 External links

[edit] History

Further information: Comparison of DOS operating systems and Timeline of DOS operating systems

[edit] Origins

IBM PC-DOS (and the separately sold MS-DOS) and its predecessor, 86-DOS, were loosely inspired by Digital Research's CP/M, which was the dominant disk operating system for 8-bit Intel 8080 and Zilog Z80 based microcomputers. PC-DOS ran on Intel 80x86-family processors.

When IBM introduced the IBM PC, built with the Intel 8088 microprocessor, they needed an operating system. Seeking an 8088-compatible build of CP/M, IBM initially approached Microsoft CEO (possibly believing that Microsoft owned CP/M due to the Microsoft Z-80 SoftCard, which allowed CP/M to run on an Apple II[2]). IBM was sent to Digital Research, and a meeting was set up. However, the initial negotiations for the use of CP/M broke down—Digital Research wished to sell CP/M on a royalty basis, while IBM sought a single license, and to change the name to "PC DOS". DR founder Gary Kildall refused, and IBM withdrew.[2][3]

IBM again approached Bill Gates. Gates in turn approached Seattle Computer Products. There, programmer had developed a variant of CP/M-80, intended as an internal product for testing SCP's new 16-bit CPU card for the S-100 bus. The system was initially named "QDOS" (Quick and Dirty Operating System), before being made commercially available as 86-DOS. Microsoft purchased 86-DOS, allegedly for $50,000. This became Microsoft Disk Operating System, MS- DOS, introduced in 1981.[4]

Microsoft also licensed their system to multiple computer companies, who supplied MS- DOS for their own hardware, sometimes under their own names. Microsoft later required the use of the MS-DOS name, with the exception of the IBM variant. IBM continued to develop their version, PC DOS, for the IBM PC.[4] Digital Research became aware that an operating system similar to CP/M was being sold by IBM (under the same name that IBM insisted upon for CP/M), and threatened legal action. IBM responded by offering an agreement: they would give PC consumers a choice of PC DOS or CP/M-86, Kildall's 8086 version. Side-by-side, CP/M cost almost $200 more than PC DOS, and sales were low. CP/M faded, with MS-DOS and PC DOS becoming the marketed operating system for PCs and PC compatibles.[2]

Microsoft originally only sold MS-DOS to Original equipment manufacturers (OEMs). One major reason for this was that not all early PCs were 100% IBM PC compatible. DOS was structured such that there was a separation between the system specific device driver code (IO.SYS) and the DOS kernel (MSDOS.SYS). Microsoft provided an OEM Adaptation Kit which allowed OEMs to customize the device driver code to their particular system. By the early 1990s, most PCs adhered to IBM PC standards so Microsoft began selling MS-DOS in retail with MS-DOS 5.0.

In the mid-1980s Microsoft developed a multitasking version of DOS[5][6]. This version of DOS is generally referred to as "European MS-DOS 4" because it was developed for ICL and licensed to several European companies. It was never released to the general public or any other OEMs. This version of DOS supports preemptive multitasking, shared memory, device helper services and New Executable ("NE") format executables. None of these features were used in later versions of DOS but they were used to form the basis of the OS/2 1.0 kernel. This version of DOS is distinct from the widely released PC-DOS 4 which was developed by IBM and based upon DOS 3.3.

Digital Research attempted to regain the market lost from CP/M-86; initially with Concurrent DOS, FlexOS and DOS Plus (both compatible with both MS-DOS and CP/M-86 software), later with Multiuser DOS (compatible with both MS-DOS and CP/M- 86 software) and DR-DOS (compatible with MS-DOS software). Digital Research was bought by Novell, and DR DOS became Novell DOS 7; later, it was part of Caldera (under the names OpenDOS and DR-DOS 7.02/7.03), Lineo, and DeviceLogics.

Microsoft and IBM later had a series of disagreements over two successor operating systems to DOS - Microsoft's Windows and IBM's OS/2.[7] They split development of their DOS systems as a result.[8] The last retail version of MS-DOS was MS-DOS 6.22, after this MS-DOS was used as a bootloader for Windows 9x. The last retail version of PC DOS was PC DOS 2000 (a.k.a. PC DOS 7 revision 1) though IBM did later develop PC DOS 7.10 for OEMs and internal use.

The FreeDOS project began 26 June 1994, when Microsoft announced it would no longer sell or support MS-DOS. Jim Hall then posted a manifesto proposing the development of an open-source replacement. Within a few weeks, other programmers including Pat Villani and Tim Norman joined the project. A kernel, the command.com command line interpreter (shell) and core utilities were created by pooling code they had written or found available. There were several official pre-release distributions of FreeDOS before the FreeDOS 1.0 distribution was released on 3 September 2006. Made available under the GNU General Public License (GPL), FreeDOS does not require license fees or royalties.[9][10]

[edit] Decline Main article: History of Microsoft Windows

Early versions of Microsoft Windows ran on top of a separate version of DOS.[11] By the early 1990s, Windows saw heavy use on new DOS systems. With MS-Windows for Workgroups 3.11, DOS was almost reduced to the role of a boot loader for the Windows kernel; in 1995, MS-Windows 95 was bundled as a standalone operating system that did not require a separate DOS license. With Windows 95 (and Windows 98 and Me, that followed it), the MS-DOS kernel remained, but with Windows as the system's graphical shell. With Windows 95 and 98, but not ME, the MS-DOS component could be run without starting Windows.[12][13] With DOS no longer required to use Windows, the majority of PC users stopped using it directly.

[edit] Continued use

DOSBox

Currently available DOS systems are FreeDOS, DR-DOS (and Enhanced DR-DOS), ROM-DOS, PTS-DOS, RxDOS, Multiuser DOS,[14] REAL/32, and others. Some computer manufacturers, including Dell and HP, sell computers with FreeDOS as the OEM operating system.[15][16] NX-DOS is currently under development. It is 16-bit, real- time, networkable, bootable from a floppy, and has an incomplete USB driver. It dates back to 1992 as a personal project, and was released as GPL in 2005.[17]

[edit] Embedded systems

DOS's structure of accessing hardware directly makes it ideal for use in embedded devices. The final versions of DR-DOS are still aimed at this market.[18] ROM-DOS was used as the on the Canon PowerShot Pro 70.[19] [edit] Emulation

Under , it is also possible to run copies of DOS and many of its clones under DOSEMU, a Linux-native virtual machine for running DOS programs at near native speed. There are a number of other emulators for running DOS under various versions of , even on non-x86 platforms, such as DOSBox.[20][21]

DOS emulators are gaining popularity among Windows XP and Windows Vista users, due to these systems being very incompatible with pure DOS. They can be used to run games or other DOS software. One of the best-known is DOSBox, designed for legacy gaming (e.g. King's Quest, Doom) on modern operating systems.[11][20]

It is possible to run DOS applications in a copy of a DOS operating system on a PC emulator, allowing better compatibility than DOS emulators where the emulation of the DOS operating environment is imperfect.[22]

[edit] Design

All MS-DOS-type operating systems run on machines with the Intel x86 or compatible CPUs, mainly the IBM PC and compatibles. Machine-dependent versions of MS-DOS were produced for many non-IBM-compatible x86-based machines, with variations from relabelling of the Microsoft distribution under the manufacturer's name, to versions specifically designed to work with non-IBM-PC-compatible hardware. For as long as application programs used DOS APIs instead of direct hardware access, they could thereby also run on non-IBM-PC compatible machines. In 1985, Digital Research also had a version of Concurrent DOS 68K for use on Motorola 68000 CPUs, and the original FreeDOS kernel DOS-C derived from DOS/NT, also for Motorola CPUs, in the early 1990s. While these systems resembled the DOS architecture, applications were not binary compatible due to the incompatible instruction sets of these non-x86-CPUs. However, applications written in high-level languages could be ported easily.

DOS is a single-user, single-tasking operating system with basic kernel functions that are non-reentrant: only one program at a time can use them and DOS itself has no functionality to allow more than one program it execute at a time. The DOS kernel provides various functions for programs (an application program interface), like character I/O, file management, memory management, program loading and termination.

DOS by default provides a primitive ability for shell scripting, via batch files (with the filename extension .BAT). These are text files that can be created in any text editor. They are executed in the same fashion as compiled programs, and run each line of the batch file as a command. Batch files can also make use of several internal commands, such as GOTO and conditional statements.[23] GOSUB and simple arithmetic is supported with the DR DOS COMMAND.COM as well as some with third-party shells like 4DOS; however, no real form of programming is usually enabled. The operating system offers an application programming interface that allows development of character-based applications, but not for accessing most of the hardware, such as graphics cards, printers, or mice. This required programmers to access the hardware directly, usually resulting in each application having its own set of device drivers for each hardware peripheral. Hardware manufacturers would release specifications to ensure device drivers for popular applications were available.[24]

[edit] Boot sequence

 The bootstrap loader on PC-compatible computers (MBR or ) is located at track zero, the first sector on a disk. The ROM BIOS will load this sector into memory at address 0000h:7C00h, and typically check for a signature "55h AAh" at offset +1FEh. If the sector is not considered to be valid, the ROM BIOS will try the next physical disk in the row, otherwise it will jump to the load address with certain registers set up.  If the loaded boot sector happens to be a (MBR), as found on partitioned media, it will relocate itself to 0000h:0600h in memory,[25] otherwise this step is skipped. The MBR code will scan the partition table, which is located within this sector, for an active partition (modern MBRs check if bit 7 is set at offset +1BEh+10h*n, whereas old MBRs simply check for a value of 80h), and, if found, load the first sector of the corresponding partition, which holds the (VBR) of that volume, into memory at 0000h:7C00h in the similar fashion as it had been loaded by the ROM BIOS itself. The MBR will then pass execution to the loaded portion with certain registers set up.  The sector content loaded at 0000h:7C00h constitutes a VBR now. VBRs are operating system specific and cannot be exchanged between different DOS versions in general, as the exact behaviour differs between different DOS versions. In very old versions of DOS such as DOS 1.x, the VBR would load the whole IO.SYS/IBMBIO.COM file into memory at 0000h:0600h.[26] For this to work, these sectors had to be stored in consecutive order on disk by SYS. In later issues, it would locate and store the contents of the first two entries in the root directory at 0000h:0500h and if they happen to reflect the correct boot files as recorded in the VBR, the VBR would load the first 3 consecutive sectors of the IO.SYS/IBMBIO.COM file into memory at 0070h:0000h. The VBR also has to take care to preserve the contents of the Disk Parameter Table (DPT). Finally, it passes control to the loaded portion by jumping to its entry point with certain registers set up (with considerable differences between different DOS versions).  In modern DOS versions, where the VBR has loaded only the first 3 sectors of the IO.SYS/IBMBIO.COM file into memory, the loaded portion contains another boot loader, which will then load the remainder of itself into memory, using the root directory information stored at 0000h:0500h. For most versions, the file contents still need to be stored in consecutive order on disk. In older versions of DOS, which were still loaded as a whole, this step is skipped.  The DOS system initialization code will initial its builtin device drivers and then load the DOS kernel, located in MSDOS.SYS on MS-DOS systems, into memory as well. In Windows 9x, the DOS system initialization code and builtin device drivers and the DOS kernel are combined into a single IO.SYS file while MSDOS.SYS is used as a text configuration file.  The CONFIG.SYS file is then read to parse configuration parameters. The SHELL variable specifies the location of the shell which defaults to COMMAND.COM.  The shell is loaded and executed.  The startup batch file AUTOEXEC.BAT is then run by the shell.[27][28] The DOS system files loaded by the boot sector must be contiguous and be the first two directory entries.[29] As such, removing and adding this file is likely to render the media unbootable. It is, however, possible to replace the shell at will, a method that can be used to start the execution of dedicated applications faster. This limitation does not apply to any version of DR DOS, where the system files can be located anywhere in the root directory and do not need to be contiguous. Therefore, system files can be simply copied to a disk provided that the boot sector is DR DOS compatible already.

In PC-DOS and DR-DOS 5.0 and above, the DOS system files are named IBMBIO.COM instead of IO.SYS and IBMDOS.COM instead of MSDOS.SYS. Older versions of DR DOS used DRBIOS.SYS and DRBDOS.SYS instead.

[edit] File system

DOS uses a filesystem which supports 8.3 filenames; 8 characters for the filename and 3 characters for the extension. Starting with DOS 2 hierarchical directories are supported. Each directory name is also 8.3 format but the maximum directory path length is 64 characters due to the internal current directory structure (CDS) tables that DOS maintains. Including the drive name, the maximum length of a fully qualified filename that DOS supports is 80 characters using the format drive:\path\filename.ext followed by a null .

DOS uses the (FAT) filesystem. This was originally FAT12 which supported up to 4078 clusters per drive. DOS 3 added support for FAT16 which used 16-bit allocation entries and supported up to 65518 clusters per drive. DOS 3.31 added support for FAT16B which removed the 32 MB drive limit and could support up to 2 GB. Finally MS-DOS 7.1 (the DOS component of Windows 9x) added support for FAT32 which used 32-bit allocation entries and could support hard drives up to 137 GB.

Starting with DOS 3.1, file redirector support was added to DOS. This was initially used to support networking but was later used to support CD-ROM drives with MSCDEX. IBM PC-DOS 4.0 also had preliminary installable file system (IFS) support but this was unused and removed in DOS 5.

[edit] Drive naming scheme Main article: Drive letter assignment

In DOS, drives are referred to by identifying letters. Standard practice is to reserve "A" and "B" for floppy drives. On systems with only one floppy drive DOS assigns both letters to the drive, prompting the user to swap disks as programs alternate access between them. This facilitates copying from floppy to floppy or having a program run from one floppy while accessing its data on another. Hard drives were originally assigned the letters "C" and "D". DOS could only support one active partition per drive. As support for more hard drives became available, this developed into first assigning a drive letter to each drive's active primary partition, then making a second pass over the drives to allocate letters to logical drives in the extended partition, then a third pass to give any other non-active primary partitions their names (where such additional partitions existed and contained a DOS-supported file system.) Lastly, DOS allocates letters for optical disc drives, RAM disks, and other hardware. Letter assignments usually occur in the order the drivers are loaded, but the drivers can instruct DOS to assign a different letter; drivers for network drives, for example, typically assign letters nearer the end of the alphabet.[30]

Because DOS applications use these drive letters directly (unlike the /dev directory in Unix-like systems), they can be disrupted by adding new hardware that needs a drive letter. An example is the addition of a new hard drive having a primary partition where a pre-existing hard drive contains logical drives in extended partitions; the new drive will be assigned a letter that was previously assigned to one of the extended partition logical drives. Moreover, even adding a new hard drive having only logical drives in an extended partition would still disrupt the letters of RAM disks and optical drives. This problem persisted through Microsoft's DOS-based 9x versions of Windows until they were replaced by versions based on the NT line, which preserves the letters of existing drives until the user changes them.[30] Under DOS, this problem can be worked around by defining a SUBST drive and installing the DOS program into this logical drive. The assignment of this drive would then be changed in a batch job whenever the application starts. Under some versions of Concurrent DOS, as well as under Multiuser DOS, System Manager and REAL/32, the reserved drive letter L: will automatically be assigned to the corresponding load drive whenever an application starts.

[edit] Reserved device names Main article:

There are reserved device names in DOS that cannot be used as filenames regardless of extension; these are used to send application output to hardware peripherals. These restrictions also affect several Windows versions, in some cases causing crashes and security vulnerabilities.[31]

A partial list of these reserved names is: NUL:, CON:, AUX:, PRN:, COM1:, COM2:, COM3:, COM4:, LPT1:, LPT2:, LPT3:,[32] and sometimes LPT4: as well. AUX: typically defaults to COM1:, and PRN: to LPT1:, but these defaults can be changed on some systems.

Colons are not necessary in some cases, for example: echo This does nothing > nul

It is still possible to create files or directories using these reserved device names, such as through direct editing of directory data structures in disk sectors. Such naming, such as starting a file name with a space, has sometimes been used by viruses or hacking programs to obscure files from users who do not know how to access these locations. [edit] Memory management Main article: DOS memory management

DOS was originally designed for the Intel 8086/8088 processor and therefore could only directly access a maximum of 1 MB of RAM. Due to PC architecture only a maximum of 640 KB (known as conventional memory) is available as the upper 384 KB is reserved.

Specifications were developed to allow access to additional memory. The first was the Expanded Memory Specification (EMS) which originally allowed memory on an add-on card to be accessed via a 64 KB page frame in the reserved upper memory area. 80386 and later systems could use a virtual 8086 mode (V86) mode memory manager like EMM386 to create expanded memory from extended memory without the need of an add-on card. The second specification was the Extended Memory Specification (XMS) for 80286 and later systems. This provided a way to copy data to and from extended memory, access to the 65520-byte High Memory Area (HMA) directly above the first megabyte of memory and the Upper Memory Block (UMB) area. Generally XMS support was provided by HIMEM.SYS or a V86 mode memory manager like QEMM or 386MAX which also supported EMS.

Starting with DOS 5, DOS could directly take advantage of the HMA by loading its kernel code and disk buffers there via the DOS=HIGH statement in CONFIG.SYS. DOS 5+ also allowed the use of available UMBs via the DOS=UMB statement in CONFIG.SYS.

[edit] DOS under OS/2 and Windows See also: Virtual DOS Machine

CMD.EXE, the DOS-styled command prompt used in Microsoft-NT-based Windows.

The DOS emulation in OS/2 and Windows runs in much the same way as native applications do. They can access all of the drives and services, and can even use the host's clipboard serves. Because the drivers for file systems and such forth reside in the host system, the DOS emulation needs only provide a DOS API translation layer which converts DOS calls to OS/2 or Windows system calls. The translation layer generally also converts BIOS calls and virtualizes common I/O port accesses which many DOS programs commonly use.

In Windows 3.1 and 9x, the DOS virtual machine is provided by WINOLDAP. WinOldAp creates a virtual machine based on the program's PIF file, and the system state when Windows was loaded. The DOS graphics mode, both character and graphic, can be captured and run in the window. DOS applications can use the Windows clipboard by accessing extra published calls in WinOldAp, and one can paste text through the WinOldAp graphics.

The emulated DOS in OS/2 and Windows NT is based upon DOS 5. Although there is a default configuration (config.sys and autoexec.bat), one can use alternate files on a session-by-session basis. It is possible to load drivers in these files to access the host system, although these are typically third-party.

Under OS/2 2.x and later, the DOS emulation is provided by DOSKRNL. This is a file that represents the combined IBMBIO.COM and IBMDOS.COM, the system calls are passed through to the OS/2 windowing services. DOS programs run in their own environment, the bulk of the DOS utilities are provided by bound DOS / OS2 applications in the \OS2 directory. OS/2 can run Windows 3.1 applications by using a modified copy of Windows (Win-OS/2). The modifications allow Windows 3.1 programs to run seamlessly on the OS/2 desktop, or one can start a WinOS/2 desktop, similar to starting Windows from DOS.

OS/2 allows for 'DOS from Drive A:', (VMDISK). This is a real DOS, like MS-DOS 6.22 or PC-DOS 5.00. One makes a bootable floppy disk of the DOS, add a number of drivers from OS/2, and then creates a special image. The DOS booted this way has full access to the system, but provides its own drivers for hardware. One can use such a disk to access cdrom drives for which there is no OS/2 driver.

In Windows NT (2000, XP, Vista, 7), the DOS emulation is provided by way of a virtual DOS machine (NTVDM). The DOS files reside in NTIO.SYS and NTBIO.SYS as usual, but run in the virtual machine provided by NTVDM. The character input is passed to the console session that launched the DOS program. This allows one to use CLI features such as pipes and redirection between DOS and Windows NT. The OS/2 emulation in NT and 2000 is similar, but no virtual machine is loaded: it is handled by OS2SS.EXE and OS2.EXE.

64-bit versions of Windows do not support NTVDM and cannot run 16-bit DOS applications directly.

[edit] User interface

See also: List of DOS commands DOS systems utilize a command line interface. Programs are started by entering their filename at the command prompt. DOS systems include several programs as system utilities, and provides additional commands that don't correspond to programs (internal commands).[33]

In an attempt to provide a more user-friendly environment, numerous software manufacturers wrote file management programs that provided users with menu- and/or icon-based interfaces. Microsoft Windows is a notable example, eventually resulting in Microsoft Windows 9x becoming a self-contained program loader, and replacing DOS as the most-used PC-compatible program loader. Text user interface programs included Norton Commander, Dos Navigator, Volkov Commander, Quarterdesk DESQview, and SideKick. programs included Digital Research's Graphical Environment Manager (originally written for CP/M) and GEOS.

Eventually, the manufacturers of major DOS systems began to include their own environment managers. MS-DOS/IBM DOS 4 included DOS Shell;[34] DR DOS 5.0, released the next year, included ViewMAX, based upon GEM.[35]

[edit] Terminate and Stay Resident Main article: Terminate and Stay Resident

DOS was not a multitasking operating system. DOS did however provide a Terminate and Stay Resident (TSR) function which allowed programs to remain resident in memory. These programs could hook the system timer and/or keyboard interrupts to allow themselves to run tasks in the background or to be invoked at any time preempting the current running program effectively implementing a simple form of multitasking on a program-specific basis. The PRINT command did this to implement background print spooling. Borland Sidekick, a popup personal information manager (PIM) also used this technique. Terminate and Stay Resident programs were also used to provide additional features not available by default. Programs like CED and DOSKey provided command line editing facilities beyond what was natively available in COMMAND.COM. Programs like the Microsoft CD-ROM Extensions (MSCDEX) provided access to files on CD-ROM disks.

[edit] Software

Further information: Category:DOS software

Arachne web browser

DOS was the dominant PC-Compatible platform and many notable programs were written for it. These included:

 Lotus 1-2-3, a protected mode spreadsheet program that saw heavy use in corporate markets and has been credited with the success of the IBM PC.[36]  WordPerfect, a word processor that is currently produced for the Windows platform.  WordStar, an early word processor which used unique control-key sequences that were replicated by many other editors.  dBase, one of the earliest database programs.  Harvard Graphics, one of the earliest presentation graphics design programs.  Norton Utilities, a collection of disk and system utilities.  PC Tools, a collection of disk and system utilities.  Norton Commander and XTree, file management utilities.  ProComm, Qmodem and Telix, modem communication programs.  SideKick, a popup personal information manager.  PKZIP, the compression utility that quickly became the standard in file compression.  QEMM and 386MAX, DOS memory management utilities.  4DOS, a much improved replacement shell.  Arachne, a 16-bit graphical DOS web browser.  DJGPP, the 32-bit DPMI DOS port of gcc.  Vern Buerg's popular LIST utility, which displays the content of files in ASCII or HEX.  Microsoft development software including Microsoft Macro Assembler, Microsoft C and CodeView.  Borland's integrated development environment, which included Turbo Pascal, Turbo BASIC, Turbo C and Turbo Assembler.  BASIC-language interpreters BASICA and GW-BASIC replicate the BASIC interpreter environment commonly found on 8-bit computers. Command-line interface

From Wikipedia, the free encyclopedia (Redirected from Command Line Interface)

Jump to: navigation, search

This article has multiple issues. Please help improve it or discuss these issues on the talk page.

This article may require cleanup to meet Wikipedia's quality standards. The specific problem is: writing style. Please help improve this article if you can.

(September 2012)

This article needs additional citations for verification. Please help improve

this article by adding citations to reliable sources. Unsourced material may be

challenged and removed. (April 2012)

This article may contain original research. Please improve it by verifying the claims made and adding references. Statements consisting only of original

research may be removed. (April 2012)

Screenshot of a sample session. GNOME Terminal 3, Fedora 15

Screenshot of a sample Bash session, taken on an old release of Gentoo Linux.

Screenshot of Apple Computer's CommandShell in A/UX 3.0.1.

Screenshot of Windows PowerShell 1.0, running under Windows Vista

The cmd.exe command-line interface in Windows 8

The Mac OS X Terminal

A command-line interface (CLI) is a means of interaction with a computer program where the user (or client) issues commands to the program in the form of successive lines of text (command lines).

The command-line interface evolved from a form of dialog once conducted by humans over teleprinter machines, in which human operators remotely exchanged information, usually one line of text at a time. Early computer systems often used teleprinter machines as the means of interaction with a human operator. The computer became one end of the human-to-human teleprinter model. So instead of a human communicating with another human over a teleprinter, a human communicated with a computer.

In time, the actual mechanical teleprinter was replaced by a glass tty (keyboard and screen, but emulating the teleprinter), and then by a terminal (where the computer software could address all of the screen, rather than only print successive lines).

Due to its text-based nature, a command-line interface is sometimes confused with the text-based user interface, a kind of user interface which uses only text, but not necessarily presented in successive lines. Text may be formatted and appear in fixed locations on a computer terminal display, as opposed to only appearing in successive lines.

The CLI was the primary means of human interaction with most early operating systems,[discuss] including MS-DOS, CP/M, Unix, and Apple DOS. The interface is usually implemented with a command line shell, which is a program that accepts commands as text input and converts commands to appropriate operating system functions.

Alternatives to the command line include, but are not limited to menus and various desktop metaphors centered on the pointer (usually controlled with a mouse).

Today, command-line interfaces to a computer operating system are less widely used by casual computer users, who favor graphical user interfaces.

Command-line interfaces are still often preferred by more advanced computer users, as they often provide a more concise and powerful means to control a program or operating system.

Programs with command-line interfaces are often much easier to automate via scripting.

Contents [hide]

 1 Operating system command-line interfaces  2 Application command-line interfaces  3 Usage  4 Anatomy of a shell CLI o 4.1 CLI and resource protection o 4.2 Command prompt o 4.3 Arguments . 4.3.1 Command-line option o 4.4 Built-in usage help o 4.5 The space character  5 Command-line interpreter o 5.1 Early history o 5.2 Modern usage as an operating system shell  6 Scripting  7 Other command-line interfaces  8 Quotes  9 See also  10 References  11 External links

[edit] Operating system command-line interfaces

Operating system command line interfaces are usually distinct programs supplied with the operating system.

A program that implements such a text interface is often called a command-line interpreter, command processor or shell. The term 'shell', often used to describe a command-line interpreter, can be in principle any program that constitutes the user- interface, including fully graphically oriented ones—for example, the default Windows GUI is created by a shell program named EXPLORER.EXE, as defined in the SHELL=EXPLORER.EXE line in the WIN.INI configuration file.

Examples of command-line interpreters include the various Unix shells (sh, ksh, csh, tcsh, bash, etc.), the historical CP/M CCP, and MS-DOS/IBM-DOS/DR-DOS's COMMAND.COM, as well as the OS/2 and the Windows CMD.EXE programs, the latter groups being based heavily on DEC's RSX and RSTS CLIs. Under most operating systems, it is possible to replace the default shell program by more specialized or powerful alternatives; some widespread examples include 4DOS for DOS, 4OS2 for OS/2, and 4NT or Take Command for Windows.

In November 2006, Microsoft released version 1.0 of Windows PowerShell (formerly codenamed Monad), which combined features of traditional Unix shells with their object- oriented .NET Framework. MinGW and Cygwin are open-source packages for Windows that offer a Unix-like CLI. Microsoft provides MKS Inc.'s ksh implementation MKS Korn shell for Windows through their Services for UNIX add-on.

The latest versions of the operating system are based on a variation of Unix called Darwin. On these computers, users can access a Unix-like command-line interface called Terminal found in the Applications Utilities folder. (This terminal uses bash by default.)

Screenshot of the MATLAB 7.4 command-line interface and GUI.

[edit] Application command-line interfaces

Application programs (as opposed to operating systems) may also have command line interfaces.

An application program may support none, any, or all of these three major types of command line interface mechanisms:

1. Commands are specified as parameters upon invocation of the program. o Most operating systems support a means to pass additional information to a program when it is launched. When a program is launched from an OS command line shell, additional text provided at the shell command line along with the program name is passed to the launched program via command line arguments. 2. Commands are entered via an interactive command line session controlled by the application. o After launch, a program may provide an operator with an independent means to enter commands in the form of text. 3. Commands are entered via the operating system STDIN/STDOUT mechanism.

Some applications provide both a CLI and a GUI. In some cases, the GUI is a wrapper around a CLI application; other times, there is a CLI to control a GUI application. The engineering/scientific numerical computation package MATLAB provides no GUI for some calculations, but the CLI can handle any calculation. The three-dimensional- modelling program Rhinoceros 3D provides a CLI as well as a distinct scripting language. In some computing environments, such as the Oberon or Smalltalk user interface, most of the text which appears on the screen may be used for giving commands.

There are command-line interpreters for editing text files like and EDLIN, DEBUG, for disk management DISKPART, DFSEE, calculators (PC-DOS ACALC), all of which present a usable command prompt.

Some programs have the command line separate from the action window (where the output would appear). The early Sierra games, like the first three King's Quest games (1984-1986), use commands from an internal command line to move the character around in the graphic window. Editors like Vi and IBM PC DOS E Editor use commands typed on the command line, switching back and forth to edit mode, a kind of graphical ED or EDLIN, as it were. (ED and EDLIN are pure teletype programs).

The Command-Line Interface continues to co-evolve with GUIs like those provided by Microsoft Windows, Mac OS and the X Window System. Programs that make use of external helper programs, often make use of command lines embedded in the GUI interface or configuration. In some applications, such as MATLAB, AutoCAD or EAGLE, a CLI is integrated with the GUI, with some benefits of both.

[edit] Usage

A CLI is used whenever a large vocabulary of commands or queries, coupled with a wide (or arbitrary) range of options, can be entered more rapidly as text than with a pure GUI. This is typically the case with operating system command shells. CLIs are also used by systems with insufficient resources to support a graphical user interface. Some computer language systems (such as Python, Forth, LISP and many dialects of BASIC) provide an interactive command-line mode to allow for experimentation.

CLIs are often used by programmers and system administrators, in engineering and scientific environments, and by technically advanced personal computer users. CLIs are also popular among people with visual disability, since the commands and responses can be displayed using Refreshable Braille displays.

[edit] Anatomy of a shell CLI

A CLI can generally be considered as consisting of syntax and semantics. The syntax is the grammar that all commands must follow. In the case of operating systems (OS), MS-DOS and Unix each define their own set of rules that all commands must follow. In the case of embedded systems, each vendor, such as Nortel, Juniper Networks or Cisco Systems, defines their own proprietary set of rules that all commands within their CLI conform to. These rules also dictate how a user navigates through the system of commands. The semantics define what sort of operations are possible, on what sort of data these operations can be performed, and how the grammar represents these operations and data—the symbolic meaning in the syntax. Two different CLIs may agree on either syntax or semantics, but it is only when they agree on both that they can be considered sufficiently similar to allow users to use both CLIs without needing to learn anything, as well as to enable re-use of scripts.

A simple CLI will display a prompt, accept a "command line" typed by the user terminated by the Enter key, then execute the specified command and provide textual display of results or error messages. Advanced CLIs will validate, interpret and parameter-expand the command line before executing the specified command, and optionally capture or redirect its output.

Unlike a button or menu item in a GUI, a command line is typically self-documenting, stating exactly what the user wants done. In addition, command lines usually include many defaults that can be changed to customize the results. Useful command lines can be saved by assigning a character string or alias to represent the full command, or several commands can be grouped to perform a more complex sequence – for instance, compile the program, install it, and run it — creating a single entity, called a command procedure or script which itself can be treated as a command. These advantages mean that a user must figure out a complex command or series of commands only once, because they can be saved, to be used again.

The commands given to a CLI shell are often in one of the following forms:

 doSomething how toFiles  doSomething how sourceFile destinationFile  doSomething how < inputFile > outputFile  doSomething how | doSomething how | do Something how > outputFile where doSomething is, in effect, a verb, how an adverb (for example, should the command be executed "verbosely" or "quietly") and toFiles an object or objects (typically one or more files) on which the command should act. The '>' in the third example is a redirection operator, telling the command-line interpreter to send the output of the command not to the screen but to the file named on the right of the '>'. This will overwrite the file. Using '>>' will redirect the output and append it to the file. Another redirection operator is the vertical bar ('|'), which creates a where the output of one command becomes the input to the next command.

[edit] CLI and resource protection

One can modify the set of available commands by modifying which paths appear in the PATH environment variable. Under Unix, commands also need be marked as executable files. The directories in the path variable are searched in the order they are given. By re-ordering the path, one can run eg \OS2\MDOS\E.EXE instead of \OS2\E.EXE, when the default is the opposite. Renaming of the executables also works: people often rename their favourite editor to EDIT, for example. The command line allows one to restrict available commands, such as access to advanced internal commands. The Windows CMD.EXE does this. Often, shareware programs will limit the range of commands, including printing a command 'your administrator has disabled running batch files' from the prompt.

Some CLIs, such as those in network routers, have a hierarchy of modes, with a different set of commands supported in each mode. The set of commands are grouped by association with security, system, interface, etc. In these systems the user might traverse through a series of sub-modes. For example, if the CLI had two modes called interface and system, the user might use the command interface to enter the interface mode. At this point, commands from the system mode may not be accessible and the user exits the interface mode and enters the system mode.

[edit] Command prompt

A command prompt (or just prompt) is a sequence of (one or more) characters used in a command-line interface to indicate readiness to accept commands. Its intent is to literally prompt the user to take action. A prompt usually ends with one of the characters $, %, #, :, > and often includes other information, such as the path of the current .

On many Unix system and derivative systems, it is common for the prompt to end in a $ or % character if the user is a normal user, but in a # character if the user is a superuser ("root" in Unix terminology).

It is common for prompts to be modifiable by the user. Depending on the environment, they may include colors, special characters, and other elements like variables and functions for the current time, user, shell number or working directory, in order, for instance, to make the prompt more informative or visually pleasing, to distinguish sessions on various machines, or to indicate the current level of nesting of commands. On some systems, special tokens in the definition of the prompt can be used to cause external programs to be called by the command-line interpreter while displaying the prompt.

In DOS's COMMAND.COM and in the Windows NT's command-line interpreter cmd.exe the prompt is modifiable by issuing a prompt command or by directly changing the value of the corresponding %PROMPT% environment variable. The default of most modern systems, the C:\> style is obtained, for instance, with "prompt $P$G". The default of older DOS systems, C> is obtained by just "prompt", although on some systems this produces the newer C:\> style, unless used on floppy drives A: or B:; on those systems "prompt $N$G" can be used to override the automatic default and explicitly switch to the older style.

On many Unix systems, the $PS1 variable can be used, although other variables also may have an impact on the prompt (depending on what shell is being used). In the bash shell, a prompt of the form [time] user@host: work_dir $ could be set by issuing the command

export PS1='[\t] \u@\H: \W $'

In zsh the $RPROMPT variable controls an optional "prompt" on the right hand side of the display. It is not a real prompt in that the location of text entry does not change. It is used to display information on the same line as the prompt, but right justified.

In RISC OS, the command prompt is a '*' symbol, and thus (OS)CLI commands are often referred to as "star commands".[1] It is also possible to access the same commands from other command lines (such as the BBC BASIC command line), by preceding the command with a '*'.

[edit] Arguments

A command-line argument or parameter is an argument sent to a program being called. In principle a program can take many command-line arguments, the meaning and importance of which depend entirely upon the program.

When a command processor is active a program is typically invoked by typing its name followed by command-line arguments (if any). For example, in Unix and Unix-like environments, an example of a command-line argument is: rm file.s

"file.s" is a command-line argument which tells the program rm to remove the file "file.s".

Some programming languages, such as C, C++ and Java, allow a program to interpret the command-line arguments by handling them as string parameters in the main function. Other languages, such as Python, expose these arguments as global variables.

In Unix-like operating systems, a single hyphen-minus by itself is usually a special value specifying that a program should handle data coming from the standard input or send data to the standard output.

[edit] Command-line option

A command-line option or simply option (also known as a flag or switch) modifies the operation of a command; the effect is determined by the command's program. Options follow the command name on the command line, separated by spaces. A space before the first option is not always required. For example, in the OpenVMS operating system, the command directory is used to list the files inside a directory. By default—that is, when the user simply types directory—it will list only the names of the files. By appending the /owner option (to form the command directory/owner), the user can instruct the directory command to also display the ownership of the files.

The format of options varies widely between operating systems. In most cases the syntax is by convention rather than an operating system requirement; the entire command line is simply a string passed to a program, which can process it in any way the programmer wants.

In Multics, command-line options and subsystem keywords may be abbreviated. This idea appears to derive from the PL/I programming language, with its shortened keywords (e.g., STRGE for STRINGRANGE and DCL for DECLARE). For example, in the Multics "forum" subsystem, the -long_subject parameter can be abbreviated -lgsj. It is also common for Multics commands to be abbreviated, typically corresponding to the initial letters of the words that are strung together with underscores to form command names, such as the use of did for delete_iacl_dir.

Sometimes different programs use different syntax in the same operating system. For example:

 Options may be indicated by -, /, or either.  They may or may not be case-sensitive.  Sometimes options and their arguments are run together, sometimes separated by whitespace, and sometimes by a character, typically : or =. Thus "Prog -fFilename", "Prog -f Filename", "Prog -f:Filename", "Prog -f=Filename".  Some programs allow single-character options to be combined; others do not. The switch "-fA" may mean the same as "-f -A", or it may be incorrect, or it may even be a valid but different parameter.

In Unix-like systems, the ASCII hyphen-minus is commonly used to specify options. The character is usually followed by one or more letters. Two hyphen-minus characters ( -- ) often indicate that the remaining arguments should not be treated as options, which is useful for example if a file name itself begins with a hyphen. Double hyphen-minuses are also sometimes used to prefix "long options" where more descriptive option names are used. This is a common feature of GNU software. The getopt function and program and the getopts command are used for parsing command-line options.

In DOS, OS/2 and Windows, the forward slash ('/') is more prevalent, although the hyphen-minus is also sometimes used. FlexOS, 4680 OS and 4690 OS use '-'. In many versions of DOS (MS-DOS/PC-DOS 2.xx and higher, all versions of DR-DOS since 5.0, as well as in PTS-DOS and FreeDOS) the switch character to be used is defined by a value returned from a system call (INT 21/AH=37h). The default character returned by this API is '/', but can be changed to a hyphen-minus on the above-mentioned systems, except for MS-DOS/PC-DOS 5.0 and higher. In some of these systems (MS-DOS/PC- DOS 2.xx/3.xx, DR-DOS 7.02 and higher, and FreeDOS), the setting can not only be controlled by programs, but also pre-configured by a SWITCHAR directive in CONFIG.SYS. Many programs are hardwired to use '/' only, rather than retrieving this setting before parsing command line arguments. Under DR-DOS, if the setting has been changed from '/', the first directory separator '\' in the display of the PROMPT parameter $G will change to a forward slash '/' (also a valid directory separator in DOS, FlexOS, 4680 OS, 4690 OS, OS/2 and Windows) as a visual clue to indicate the change. Some command-line interpreters (including newer versions of DR-DOS COMMAND.COM and 4DOS) also provide pseudo environment variables named %/% or %SWITCHAR% to allow portable batchjobs to be written.

[edit] Built-in usage help See also: help (command)

It is usual for a program to be able to display a brief summary of its parameters, typically when invoked with no arguments or one of ?, -?, -h, /?, /h, -help, or --help. Entering a program name without parameters in the hope that it will display parameters can be hazardous, as some programs and scripts execute without further ado.

[edit] The space character

In many areas of computing, but particularly in the command line, the space character can cause problems as it has two distinct and incompatible functions: as part of a command or parameter, or as a parameter or name separator. Ambiguity can be prevented either by prohibiting embedded spaces in file- and directory names in the first place (for example, by substituting them with underscores '_'), or, if supported by the command-line interpreter and the programs taking these parameters as arguments, by enclosing a name with embedded spaces between quote characters or using a escape character before the space, usually a backslash ('\'). For example

Long path/Long program name Parameter one Parameter two ... is ambiguous (is "program name" part of the program name, or two parameters?); however

Long_path/Long_program_name Parameter_one Parameter_two ...,

LongPath/LongProgramName ParameterOne ParameterTwo ...,

"Long path/Long program name" "Parameter one" "Parameter two" ... and

Long\ path/Long\ program\ name Parameter\ one Parameter\ two ... are not ambiguous. Unix-based operating systems minimize the use of embedded spaces to minimize the need for quotes. In Microsoft Windows, one often has to use quotes because embedded spaces (such as in directory names) are common.

[edit] Command-line interpreter

See also: List of command-line interpreters

The terms command-line interpreter, command line shell, command language interpreter, or identical abbreviation CLI, are applied to computer programs designed to interpret a sequence of lines of text which may be entered by a user, read from a file or another kind of data stream. The context of interpretation is usually one of a given operating system or programming language.

Command-line interpreters allow users to issue various commands in a very efficient (and often terse) way. This requires the user to know the names of the commands and their parameters, and the syntax of the language that is interpreted.

The unix /# and OS/2 EXTPROC commands facilitate the passing of batch files to external processors. One can use this to write specific command processors for dedicated uses, and process external data files which reside in batch files.

Many graphical interfaces, such as the OS/2 Presentation Manager and early versions of Microsoft Windows use command-lines to call helper programs to open documents and programs. The commands are stored in the graphical shell[clarification needed] or in files like the registry or the OS/2 os2user.ini file.

[edit] Early history

From the 1960s onwards, user interaction with computers was primarily by means of command-line interfaces, initially on machines like the Teletype Model 33 ASR, but then on early CRT-based computer terminals such as the VT52.

All of these devices were purely text based, with no ability to display graphic or pictures.[2] For business application programs, text-based menus were used, but for more general interaction the command line was the interface.

From the early 1970s the Unix operating system on minicomputers pioneered the concept of a powerful command-line environment, which Unix called the "shell", with the ability to "pipe" the output of one command in as input to another, and to save and re- run strings of commands as "shell scripts" which acted like custom commands.

The command-line was also the main interface for the early home computers such as the Commodore PET, Apple II and BBC Micro – almost always in the form of a BASIC interpreter. When more powerful business oriented microcomputers arrived with CP/M and later MSDOS computers such as the IBM PC, the command-line began to borrow some of the syntax and features of the Unix shells such as globbing and piping of output.

The command-line was first seriously challenged by the PARC GUI approach used in the 1983 Apple Lisa and the 1984 Apple Macintosh. The majority of IBM PC users did not replace their command.com shell with a GUI until Windows 95 was released in 1995.

[edit] Modern usage as an operating system shell

While most computer users now use a GUI almost exclusively, more advanced users have access to powerful command-line environments:

 IBM OS/2 has the cmd.exe processor. This copies the command.com commands, with extensions to REXX.  MS Windows users have a CLI environment named Command Prompt, which might use the CScript interface to alternate programs. The new PowerShell program provides a command-line interface, but its applets are not written in shell-script. Implementations of the Unix shell are also available as part of the POSIX sub-system,[3] Cygwin, and other software packages.  Apple Mac OS X[4] and many Linux distributions have the Bash implementation of the Unix shell.  Embedded Linux (and other embedded Unix-like) devices often use the Ash implementation of the Unix shell, as part of Busybox.  Android uses a Unix shell derived from Ash[5] with commands from the separate toolbox.[6]  Routers with Cisco IOS,[7] Junos[8] and many others are commonly configured from the command line.

[edit] Scripting

Most command-line interpreters support scripting, to various extents. (They are, after all, interpreters of an interpreted programming language, albeit in many cases the language is unique to the particular command-line interpreter.) They will interpret scripts (variously termed shell scripts or batch files) written in the language that they interpret. Some command-line interpreters also incorporate the interpreter engines of other languages, such as REXX, in addition to their own, allowing the executing of scripts, in those languages, directly within the command-line interpreter itself.

Conversely, scripting programming languages, in particular those with an eval function (such as REXX, Perl, Python, Ruby or Jython), can be used to implement command-line interpreters and filters. For a few operating systems, most notably DOS, such a command interpreter provides a more flexible command line interface than the one supplied. In other cases, such a command interpreter can present a highly customised user interface employing the user interface and input/output facilities of the language.

[edit] Other command-line interfaces The command line provides an interface between programs as well as the user. In this sense, a command line is an alternative to a dialog. Editors and data-bases present a command line, in which alternate command processors might run. On the other hand, one might have options on the command line which opens a dialog box. The latest version of 'Take Command' has this feature. DBase used a dialog box to construct command lines, which could be further edited before use.

Programs like Basic, Diskpart, Edlin, and QBasic all provide command-line interfaces, some of which use the system shell. Basic is modeled on the default interface for 8-bit Intel computers. Calculators can be run as command-line or dialog interfaces.

There are a number of pre-mouse games (like King's Quest 1-3), which relied on the user typing commands at the bottom of the screen. One controls the character by typing commands like 'get ring' or 'look'. The program returns a dialog which describes how the character sees it, or makes the action happen. The text adventure The Hitchhiker's Guide to the Galaxy, a piece of interactive fiction based on Douglas Adam's book of the same name, is a teletype-style command-line game.

The most notable of these interfaces is the STDIO interface, which allows the output of one command to be passed to the input of another. Text files can serve either purpose as well. This provides the interfaces of piping, filters and redirection. Under Unix, devices are files too, so the normal type of file for the shell used for stdin,stdout and stderr is a tty device file.

Another command-line interface allows a shell program to launch helper programs, either to launch documents or start a program. The command is processed internally by the shell, and then passed on to another program to launch the document. The graphical interface of Windows and OS/2 rely heavily on command-lines passed through to other programs – console or graphical, which then usually process the command line without presenting a user-console.

Programs like the OS/2 E editor and some other IBM editors, can process command- lines normally meant for the shell, the output being placed directly in the document window.

One should remember that the 'address line' in a web browser is in fact a command line, even to the thing about about:blank interface. One can program extra commands for a web browser, say to open the registry at a given item, by using the reg: keyword.

On the other hand, features like command history and editing are not nesseccarily part of the command-line interface.