files a file is a collection of related information files are kept in directories on a disk
TRANSCRIPT
FILESThe two system areas on a disk
DirectoriesFile Allocation Table(FAT)
-They enable MS_DOS to recognize and organize the files on your disk.
-FAT is copied onto a new disk when you format it with the MS_DOS format command, and one empty directory is created, called the root directory.
File Allocation Table A table that the operating system uses to locate
files on a disk.
Due to fragmentation, a file may be divided into many sections that are scattered around the disk.
The FAT keeps track of all these pieces. In DOS systems, FATs are stored just after the boot sector.
File Allocation Table A file system to control how files & folders are stored on
your hard disk.
Files are stored in small clusters.
Smaller the cluster, more efficiently the disk stores information.
Cluster depends on the size of the partition, partition depends on the file system used.
File Allocation Table
Partitions larger than 2GB are not supported with FAT16.
Partitions smaller than 512MB are not supported with FAT32.
File Allocation TableAdvantages of FAT32 file system over FAT16:
Allows programs to open more quickly-36% faster. Uses smaller cluster size, hence more efficient use of
disk space-28% more disk space. Allows hard disk upto 2TB to be formatted as a
single drive-no need to partition the hard disk. Can relocate the root directory and use backup copies
of FAT-computer less vulnerable to crashes.
Files
For DOS to run an application file , it has to be one of three kinds:
.COM .EXE .BAT
COM - A file in machine language, must be less than 64K in size.
EXE - A file in machine language, can be larger than 64K. EXE files also have information
at the beginning of the file that tells DOS what type of file it is and how to load and run it.
BAT - A batch file that is written with a text editor and is in ASCII text format, it contains DOS commands
that are executed in batch mode, which means that each command is executed in sequence until the file ends.
DIRECTORIES
Directories are a way of dividing your files into convenient groups of files.
Directories also contain information on the size of files, and the dates they were created and updated.
DIRECTORIES
Directories can also contain subdirectories.
A multilevel directory structure can be thought of as a tree structure, with the root at the top.
PATHS
When you use multilevel directories, you must tell MS-DOS where the files are located in the directory structure.
This can be done by giving
MS-DOS a pathname to the file.
PATHNAME
a pathname is a sequence of directory names followed by a filename, each separated from the previous one by a backslash.
dir_name\dir_name\file_name
USING DIRECTORIES
A:\USER\JOE . <Dir> 12-02-03 10:09a
.. <Dir> 12-02-03 10:09a
. working directory \USER\JOE .. Parent directory \USER
COMMAND OPTIONS
Used to give MS-DOS commands extra information.
The format of all MS-DOS commands: command [options….]
COMMAND OPTIONS Where options can be one of the following:
drive filenamepathname switches - options which control MS-DOS commands.arguments- provide more information to MS-DOS
commands. Eg. ON or OFF
INTERNAL COMMANDS
The way you do anything in DOS is through commands that the computer understands.
A command may cause the computer to take some action, or to execute some file.
INTERNAL COMMANDS
COMMAND.COM
is loaded during the boot process, which means that COMMAND.COM is resident in memory at all times, and the commands that it understands are available to the user at all times.
INTERNAL COMMANDS If you have created a DOS boot disk, it will contain three
files,
IO.SYS
MSDOS.SYS
COMMAND.COM.
HIDDEN
INTERNAL COMMANDS
The third file, COMMAND.COM, must be in the root directory.
Since it is on the boot disk (you cannot boot without it), that means that the commands it contains are available to you when you boot from this disk.
INTERNAL COMMANDS
The internal commands contained within COMMAND.COM are the commands that are used in writing batch files.
The batch file will not run properly if it cannot find COMMAND.COM.
DOS Operating System
The interface is
Command Line Interfaceor
Character User Interface
No mouse,no menus, no graphical components.
DOS Operating System
Text commands were entered from the keyboard, and the computer's response appeared as text on the monitor.
DOS Operating System
DOS controlled some aspects of the computer hardware, particularly disk access and basic CPU operations, but it was still common to need to configure the video display, sound card, printer, etc. for each application that would use them.
DOS Operating System
DOS
a single-tasking operating system,
i.e only one program could be run at a time.
INTERNAL COMMANDS Some Internal Commands contained within the
COMMAND.COM command interpreter: break cd chdir cls copy date del dir echo erase exit md mkdir move path pause prompt rd rem ren rename rmdir type ver vol
EXTERNAL COMMANDS
Not all DOS commands are understood by COMMAND.COM.
There are commands called external commands that reside as separate files on your hard drive, and must be called specifically for you to use them.
EXTERNAL COMMANDS
If you look in your DOS directory on your hard drive (usually C:\DOS), you will see these external commands represented by files that are either *.EXE or *.COM files.
EXTERNAL COMMANDS Some External Commandsappend assign attrib chkdsk Comp deltree diskcomp diskcopy Doskey edit fc fdisk find format graphics help label more msbackup msav print replace restore scandisk Sort sys tree undelete unformat xcopy
THE PATH
The Command Line Everything you do in DOS is done from the command
line. The command line begins with a prompt, which is the computer's way of saying
"I'm ready. Give me something to do."
The prompt usually looks something like this:
C:\>
THE PATH If DOS does not find this file, it will consult
something called the PATH. This is a list of directories that DOS has been instructed to check whenever it cannot find a file in the current active directory
THE PATH
You can see what the path is for your computer at any time by using the PATH command. Just type "path" at the DOS prompt, and you will get back your path. Here is what I got on one of my machines:
C:\>path