20.
fdiskManipulates hard disk partition tables. The name derives from IBM's habit of calling hard drives fixed disks. When run from the command line, it displays a menu of various partitioning operations:
1. Create DOS partition or Logical DOS Drive
2. Set active partition
3. Delete partition or Logical DOS Drive
4. Display partition information
5. Change current fixed disk drive (only available if the computer has more than one hard drive)
FDISK /MBR installs a standard master boot record on the hard drive.
FDISK /MBR #: where # is other partition on system. Completes above command on indicated partition.
eg: "C:\FDISK /MBR D:" would install boot record on D:\ partition.
Fdisk exists under Unix with the same name, but it is an entirely different program. However they share purposes.
21.
findA filter to find lines in the input data stream that contain or don't contain a specified string and send these to the output data stream.
Find may also be used as a pipe.
find "keyword" < ''inputfilename'' > ''outputfilename''
Searches for a text string in a file or files.
FIND [/V] [/C] [/N] [/I] "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.
"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.
Equivalent to the Unix command grep. The Unix command find performs an entirely different function.
22.
format Delete all the files on the disk and reformat it for MS-DOS
In most cases, this should only be used on floppy drives or other removable media. This command can potentially erase everything on a computer's hard disk.
/autotest and /backup are undocumented features. Both will format the drive without a confirmation prompt.
format [options] drive
FORMAT drive: [/V[:label]] [/Q] [/F:size] [/B | /S] [/C]
FORMAT drive: [/V[:label]] [/Q] [/T:tracks /N:sectors] [/B | /S] [/C]
FORMAT drive: [/V[:label]] [/Q] [/1] [/4] [/B | /S] [/C]
FORMAT drive: [/Q] [/1] [/4] [/8] [/B | /S] [/C]
/V[:label] Specifies the volume label.
/Q Performs a quick 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 Tests clusters that are currently marked "bad."
Known as a joke among UNIX users of that time since every user on the machine could easily cause damage with just one command. Therefore, it was known in the UNIX community as "The big DOS timesaver".
There is also an undocumented /u parameter for "unconditional" that will write strings of zeros on every sector.
Equivalent to the Unix command mkfs.
Equivalent in RT-11/RSX-11/OpenVMS operating systems line is format command which can not create filesystem. After formatting one should use initialize (contracted to init) command to create filesystem (Equivalent to MS-DOS command format /q or "quick format").
23.
help Gives help about DOS.
MS-DOS
help 'command' would give help on a specific command. By itself, it lists the contents of DOSHELP.HLP. Help for a specific command invokes the command with the /? option. In MS-DOS 6.x this command exists as FASTHELP.
MS-DOS 6.xx help command uses QBASIC to view a quickhelp HELP.HLP file, which contains more extensive information on the commands, with some hyperlinking etc. The MS-DOS 6.22 help system is included on Windows 9x cdrom versions as well.
PC-DOS
PC-DOS 7.xx help uses view.exe to open OS/2 style .INF files (cmdref.inf, dosrexx.inf and doserror.inf), opening these to the appropriate pages.
DR-DOS
In DR-DOS, help is a batch file that launches DR-DOS' online reference, dosbook.
Microsoft Windows
Windows NT, all versions, uses DOS 5 style help, but versions before VISTA have also a Windows help file (NTCMDS.HLP or NTCMDS.INF) in a similar style to MS-DOS 6.
FreeDOS
FreeDOS uses an HTML help system, which views HTML help files on a specified path. The path is stored in HELPPATH environment variable, if not specified, default path is \HELP on the drive which HELP is placed.
Partially equivalent to the Unix command man.
24.
intersvr & interlnk(in MS-DOS; filelink in DR-DOS)
Network PCs using a null modem cable or LapLink cable. The server-side version of InterLnk, it also immobilizes the machine it's running on as it is an active app (As opposed to a TSR) which must be running for any transfer to take place. DR-DOS' filelink is executed on both the client and server.
New in MS-DOS 6.[3]
No direct Unix equivalent, though some Unices offer the ability to network computers with TCP/IP through null modem or Laplink cables using PLIP or SLIP.
25.
join Attaches a drive letter to a specified directory on another drive.[3]
JOIN d: [d:\path]
JOIN [/D] (removes drive assignment)
If JOIN a: c:\floppy were executed, c:\floppy would display the contents of the a: drive. The opposite can be achieved via the subst command.
26.
label Changes the label on a logical drive, such as a hard disk partition or a floppy disk.
In Unix and Unix-like systems, this differs from filesystem to filesystem. e2label can be used for ext2 partitions.
27.
loadfix Loads a program above the first 64K of memory, and runs the program.
loadfix [drive:][path]filename
Included only in MS/PC-DOS. DR-DOS used memmax, which opened or closed lower, upper, and video memory access, to block the lower 64K of memory.[4]
28.
md or mkdir Makes a new directory. The parent of the directory specified will be created if it does not already exist.
md directory
Equivalent to the Unix command mkdir.
29.
mem Displays memory usage.
mem
*
o /CLASSIFY or /C - Lists the size of programs, provides a summary of memory in use and lists largest memory block available.
o /DEBUG or /D - Displays status of programs, internal drivers, and other information.
o /PROGRAM or /P Displays status of programs currently loaded in memory.
Equivalent to the Unix command free.
30.
memmakerStarting from version 6, MS-DOS included the external program MemMaker which was used to free system memory (especially Conventional memory) by automatically reconfiguring the AUTOEXEC.BAT and CONFIG.SYS files. This was usually done by moving TSR Programs to the Upper memory. The whole process required three system restarts. Before the first restart the user was asked whether he wanted to enable EMS Memory or not.
The use of MemMaker was popular among gamers who wanted to enable or disable Expanded memory in order to run a game which required EMS or not. Better results could be achieved by an experienced user manually configuring the startup files to achieve greater free memory yield.
Options:
* /BATCH Runs MemMaker in batch (unattended) mode. In batch mode, MemMaker takes the default action at all prompts.
* /UNDO Instructs MemMaker to undo its most recent changes.
PC-DOS uses another program RamBoost to optimize memory, either the HIMEM/EMM386 or a third-party memory manager.
31.
mode
Configures system devices. Changes graphics modes, adjusts keyboard settings, prepares code pages, and sets up port redirection.[5]
32.
more Pages through the output so that you can view more than one screen of text.
command | more
Equivalent to the Unix commands more and less.
More may also be used as a filter.
more < inputfilename
33.
move Moves files or renames directories.
move filename newname
move driveletter:\olddir driveletter:\newdir
Example: move c:\old c:\new
Equivalent to the Unix command mv. DR-DOS used a separate command for renaming directories, rendir.
34.
msd Main article: Microsoft Diagnostics
Provides detailed technical information about the computer's hardware and software.
msd
New in MS-DOS 6;[6] the PC-DOS version of this command is QCONFIG.[citation needed]
No Unix equivalent, however in GNU/Linux similar type of information may be obtained from various text files in /proc directory.
35.
pause
Suspends processing of a batch program and displays the message 'Press any key to continue. . .'.
36.
pcpark Parks the hard disk heads in order to enable safe shutdown; only used on early versions.
pcpark
No Unix equivalent.
MS-DOS 3.2 (and possibly others) used the command HHSET
37.
print Adds a file in the print queue.
Options:
* /D device : Specifies the name of the print devices. Default value is LPT1
* /P filename : Add files in the print queue
* /T : Removes all files from the print queue
* /C filename : Removes a file from the print queue
This command was introduced in MS-DOS version 2. Before that there was no built-in support for background printing files. The user would usually use the copy command to copy files to LPT1.
Equivalent to the Unix command lpr
38.
rd or rmdir
Remove a directory, which by default must be empty of files for the command to succeed (the /s flag removes this restriction).
rd directory
Equivalent to the Unix command rmdir.
39.
remRemark statement, normally used within a batch file. An alternative way not to run a specific statement in a batch file is creating a label that will never be used, ::.
On the command line, rem can also be used to create a zero length file by redirecting an empty remark statement to a filename.
rem > newfilename
In Unix, the # sign can be used to start a comment; the zero-length file can be achieved using various methods, such as the touch command or dd.
40.
renRenames a file. Unlike the move command, this command cannot be used to rename subdirectories, or rename files across drives.
ren filename newname
You can rename files in another directory by using the PATH parameter:
ren [path]|[filename] [newfilename]
An example could be:
ren c:\Windows filex.txt filey.txt
On DOS with long filename support, care must be taken when directories have spaces in their names like "Documents and Settings". In these cases double-quotes are used to enclose them:
ren c:\"Documents and Settings"\"All Users"\Desktop filex.txt filey.txt
Mass renames can be accomplished by the use of wildcards. For example, the following command will change the extension of all files in the current directory which currently have the extension htm to html:
ren *.htm *.html
In Unix, this functionality of a simple move is provided by the mv command, while batch renames can be done using the rename command.
41.
scandiskDisk diagnostic utility. Scandisk was a replacement for the chkdsk utility, starting with later versions of MS-DOS. Its primary advantages over chkdsk is that it is more reliable and has the ability to run a surface scan which finds and marks bad clusters on the disk. chkdsk had surface scan and bad cluster detection functionality included, and was used again on Windows NT based operating systems.
Equivalent to the Unix command fsck.
42.
set Sets environmental variables. See Environment variable.
Since Windows 2000 it can be even used for command line inputs by using Parameter /P
set /p choice=Type your text.
echo You typed: "%choice%"
43.
share Installs support for file sharing and locking capabilities.
share [/F:space] [/L:locks]
/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.
44.
smartdrive Main article: SmartDrive