Chapter 8 Organizing & Managing Your Hard Disk CHAPTER OUTLINE TEACHING SUGGESTIONS

advertisement
Instructor: Prof. Michael P. Harris
ITSC 1405 – Intro to PC Operating Systems
Chapter 8
Organizing and Managing Your Hard Drive
Chapter 8
Organizing & Managing Your Hard Disk
LECTURE NOTES
CHAPTER OUTLINE
TEACHING SUGGESTIONS
Chapter Overview


 Chapter Overview duplicated in PowerPoint



Learn how to organize a hard disk efficiently
and logically to serve your specific needs.
How to determine the best command to use to
locate a specific file, or to manage the hard
disk, will be discussed.
Will discuss the purpose and function of the
CHKDSK command and then use the
command to accomplish various tasks.
Use the Disk Defragmenter Program to
optimize performance of your disk.
WHY ORGANIZE A HARD DISK?
 Why Organize a Hard Disk?
 Accumulate programs.
 Each program generates data files.
 Installing WXP creates folders:
 Windows (WINNT).
- Used for OS.
 Program Files.
 Installing programs.
 Programs included with Windows
--Outlook Express
 Documents and Settings.
- Holds user system preferences.
 My Documents.
- Default folder for data files.
 Minimum two subfolders (My
Music and My Pictures)
 Critical files/folders placed in root
directory needed by W to boot system.
 Files/folders hidden from view.
Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line
Franklin, Beedle & Associates ©2003 ISBN: 1-887902-82-1
Slides 2-5
slides.
 After completion of lecture, suggest to
students that they review Objectives and
Outcomes found on first page of chapter as
a check to see if they have mastered
concepts.
SECTION 8.1 (pp. 374-380)



Slides 6-20
Classify/categorize/organize information for
ease/speed of locating it.
- Dewey Decimal system - method of
organizing books in library.
Suites come with computer or purchased by
user.
Two popular choices of integrated
programs are Microsoft Office and
WordPerfect Office.
Some users prefer individual programs


instead of a suite.
Discuss pros/cons of integrated programs
vs. individual programs.
If user does not determine how program is
installed, they will spend time looking for
folders/files and not working with them.
Page 1
Instructor: Prof. Michael P. Harris
ITSC 1405 – Intro to PC Operating Systems




Integrated programs (suites) provide
tools for common types of work.
 Word processing program
 Spreadsheet program.
 Database program.
 Presentation software.
 Other related tools.
Additional programs must be installed on
hard disk before use.
 Critical programs that should be
purchased/downloaded
 Virus checking programs (Norton
AntiVirus or McAfee Virus Scan
 File compression utility such as
WinZip
 Other programs meet individual needs.
An installation program
 Creates folder/folders for application
program being installed.
 Copies files from CD-ROM to named
folders.
 Compressed files need to be
uncompressed before installation
begins.
 Usually makes entries in WXP
Registry
 Adds program names to menus.
 Registers file extensions.
Need to control where programs are
installed.
 If directions not given to installation
program, then program determines
names of folders and where
files/folders will be located.
 Microsoft programs install program
folders under Program Files folder.
 Other programs install program
folders/files to root directory.
 Root directory becomes
filled with many files and
subdirectory names.
 When using DIR (DOS) or Explorer
(Windows), it becomes difficult to tell
what files are on the hard disk, or
Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line
Franklin, Beedle & Associates ©2003 ISBN: 1-887902-82-1
Chapter 8
Organizing and Managing Your Hard Drive

Placing data files wherever program places
them - not productive/efficient use of WXP.
 Most users let software installation
programs organize hard disk.
 Floppy disk root directories also have
limits, i.e., double-sided disk holds only 112
files in root directory.

Figure 8.1 A Typical Hard Disk
Organization, p. 377 in PowerPoint
Presentation.
In figure
Names in uppercase are folders.
***** represent additional folders.
Names in lowercase are files.
…..Represent additional files.
Italics are hidden items…
Some programs
Create separate folder for data files.
Save files to program’s subdirectory.
Use My Documents folder to save data files.
-----Problematic using folder to save all data
files.
-Question is where will you place data
files.
 Figure 8.2 Organizing a Disk by Software
Application Package. See PowerPoint slide #16.
- Discuss why this is an inefficient
organizational scheme.
- Example better than placing data files in
the root directory or in program
subdirectories, it is still inefficient.
- - Too many repeated subdirectory names.
- - To locate a data file, need to remember
which application you were working on and
where appropriate data file is located.
- - Have to key in long file names.
 Think about logic behind your organization
scheme.


Discussion Question (1) - Why would you
want to organize a hard disk?
Discussion Question (3) - Why would you not
want to place data files in the program
subdirectory?
Page 2
Instructor: Prof. Michael P. Harris
ITSC 1405 – Intro to PC Operating Systems





Chapter 8
Organizing and Managing Your Hard Drive
where they are located.
 Spend time looking for files not
working.
 Problem does not change with
Windows environment.
Use of long file names on floppy disks on
floppies can be a problems
 Floppies used as backup for files from
hard disk.
 Floppies always use FAT
 FAT –using 1.44 MB floppy – 224
entries.
If FAT16 is file system on hard disk Root directory table capacity (hard
disk) is 512 entries.
 Get message disk full if all files
located in root directory.
 If FAT32 is file system.
 Root directory table capacity (hard
disk) 65,535 entries.
 Scrolling through 65,535 entries –
difficult to find file.
 NTFS file system does not have these
limitations.
Most programs install to C:\Program Files
subdirectory
 Others install directly to C:\
 Can choose own installation location.
 Problem if asking for technical
support – they assume software
installed to setup program’s default
directory.
Discuss Figure 8.1 A Typical Hard Disk
Organization p. 377
 Power Point Presentation
 See notes in Teaching Suggestions.
Where should data files be placed?
 Do NOT place data files in program
folders
 Program files do not change
 Data files changers as add/delete
information
 Copying/backing up/moving data
files difficult – search folders to
Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line
Franklin, Beedle & Associates ©2003 ISBN: 1-887902-82-1
Page 3
Instructor: Prof. Michael P. Harris
ITSC 1405 – Intro to PC Operating Systems
Chapter 8
Organizing and Managing Your Hard Drive
find data files.
Rationale for folders – categorize
information.
 Data files contain information.
 Program files contain instructions.
Creating meaningful names for data files
part of organizational scheme.
 Naming conventions
 Help identify what file contains
 Requires knowledge of how
application program works.
 WXP – limits file names to 255
characters
 Long file names problematic in WXP
 Limitations of root directory table.
 File name limited to 255
characters.
 Folder name part of file name.
 Difficult to browse file in Explorer.
 Older applications
 Older programs use 8.3 file
naming rule.
 WXP creates MS-DOS alias
for long file name
 Give long file names only in
Explorer/My Computer
 Cannot save long file names.
 Errors in keying in names.
 Difficult to remember naming
strategy.
 Many Utility programs will not work
with long file names.
 Following don’t like spaces
(allowed characters)
 Some utility programs
 Internet
 WXP
 Similar file names problematic in
creating meaningful names.
 Discuss Figure 8.2 A Sample
Organizational Scheme p. 379.
 Power Point Slide
 Scheme is inefficient
 To locate data file need to know


Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line
Franklin, Beedle & Associates ©2003 ISBN: 1-887902-82-1
Page 4
Instructor: Prof. Michael P. Harris
ITSC 1405 – Intro to PC Operating Systems



Chapter 8
Organizing and Managing Your Hard Drive
what application created file and
where file is located.
Data file used in conjunction with
different programs can be a nightmare.
 Data could be in two places (Wordprocessing/database folders).
 Locating data files difficult.
Need organizational scheme with logic
behind it.
Organize disk by way you work.
 Remember software (programs) are
tools.
 Organize disk to assist you in
saving, retrieving, and backing up
data files.
 Business.
 People work by projects.
 Store data by project not
application.
 Education.
 May want to organize by
application.
METHODS OF ORGANIZING A HARD
DISK
 Guidelines for efficient/logical organization of
hard disk.
 Root directory – map to rest of disk
 Plan disk organization.
 Done before placing anything on hard
disk.
 Think about work you do and easiest
way to find work files.
 Develop a naming convention for files and
directories.
 Easy to follow
 Name should identify data in file.
 Create many folders/subfolders prior to
copying files into them.
 If application software installed on
computer, cannot/must not rename/move
program/program support files.
 Can create/delete folders for data files
 No risk in moving/copying/deleting
Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line
Franklin, Beedle & Associates ©2003 ISBN: 1-887902-82-1
SECTION 8.2 (pp. 381-385)

Slides 21-29
 Recommendations - not rules.
 Discuss KISS- Keep it simple, stupid.
 Important to go over this section thoroughly

as new computer users have a great deal of
difficulty organizing their disks and have
trouble locating files they want to work on.
WHAT IS GOOD ORGANIZATIONAL
SCHEME FOR ONE IUSER MAY NOT
WORK FOR ANOTHER
 Root Directory
--Index/table of contents to hard disk.
--Contains files placed there by OS
--Rest of files should be subdirectory
listings
--Ideally see all folders when opening
Page 5
Instructor: Prof. Michael P. Harris
ITSC 1405 – Intro to PC Operating Systems







data files
Create shallow/wide folders NOT compact
deep folders.
Data files and program files should not be
in same subdirectory.
 Data changes, programs do not.
 Easier for backup purposes.
Many small directories with few files
better than a large subdirectory with many
files.
 Categorizing data.
 If too many files in a subdirectory,
break down into two or more
subdirectories.
 Easier to update and manage
subdirectory with limited number of
files.
 Can always combine few files in many
subdirectories into one subdirectory.
Directory names short but descriptive.
Create separate subdirectory for batch
files.
 Batch files help automate processes
that are done often.
 Place subdirectory for batch files under
root directory.
 Call it BATCH.
Create UTILS (utilities) subdirectory.
 Create separate subdirectories for each
utility program.
 Utility software programs provide
commonly needed services, i.e., Norton
Utilities.
 Each utility program does something
useful that the OS does not allow you
to do.
 Often, utility software/shareware
packages have similar file names.
 Need own separate/identifiable
subdirectory.
Learn how to install programs.
 Create own organizational scheme.
 Do not let installation program put
programs anywhere they wish.
Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line
Franklin, Beedle & Associates ©2003 ISBN: 1-887902-82-1
Chapter 8
Organizing and Managing Your Hard Drive









Explorer/expand My Computer/Drive C.
--Keep it clear of unnecessary files.
Shallow/wide easier to find files
Compact/deep – files buried several levels
down
A Utility subdirectory keeps all applications
in one place.
Naming conventions should be easy to
follow so new files/folders can be logically
named to fit in convention.
Advantages to organization by project.
Know where all software applications
located.
Program files all in one place.
Easier to add software packages
Update existing software package
File extension tells what data file belongs to
what program.
ORGANIZATION SHOULD BE
LOGICAL. TAKES TIME TO DO.
MAKES EFFECTIVE USE OF HARD
DISK.
Discussion Question (2) - What are the
advantages and disadvantages of organizing a
hard disk by application program rather than by
project?
Discussion Question (4) - List five criteria that
can be used for organizing a hard disk and
explain the rationale for each.
Discussion Question (5) - What are two major
considerations for any disk organizational
scheme?
Discussion Question (9) – Why would you
want to own utility programs that do not come
with the operating system?
Page 6
Instructor: Prof. Michael P. Harris
ITSC 1405 – Intro to PC Operating Systems






Chapter 8
Organizing and Managing Your Hard Drive
Learn how to use application packages and
how packages work.
 Does application package assigns file
extension?
 If not can assign extension that will
apply to specific work done with
application program's data files.
Learn how application package works with
subdirectories.
Analyze way you work.
 Usually better to organize disk by
project as way most people work.
 But if use application program’s
default data directory to save/retrieve
files – (May want to create data
directories) - organizing around
projects will not work.
Analyze your environment.
 Educational environment – organize by
application package.
 Teaching one application package –
focus on package.
 Business – organize by project.
 Program files in one place.
 Easy to add new project delete old
one.
 Know which data files belong to
which project by file extension.
Hard disks can be organized in many ways.
 Make effective use of hard disk.
 If data files organized
 Rarely use Start/Programs menu.
 Go to directory that holds files you
will work on.
Ultimately, organization result of
 How does user work?
 How do programs work?
ORGANIZING A DISK
 Organizing a Disk
 Usually start with unorganized disk.
 If reorganizing disk want to do it without
reformatting or losing files.
Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line
Franklin, Beedle & Associates ©2003 ISBN: 1-887902-82-1
SECTION 8.3 (p. 385)
Page 7
Instructor: Prof. Michael P. Harris
ITSC 1405 – Intro to PC Operating Systems
Chapter 8
Organizing and Managing Your Hard Drive

VIEWING THE DISK STRUCTURE WITH
THE TREE COMMAND
 Viewing Disk Structure with TREE Command
 Used to see graphical representation of
disk.
 Syntax. See PowerPoint slide.
 TREE [drive:] [path] [/F] [/A]
ACTIVITY: USING THE TREE COMMAND
 Activity – Using the TREE command.
 Activity steps.




Open Command Prompt window.
Make C:\WUGXP default directory
Key in:
 TREE
 TREE /A
 TREE /F
 CD \
Activity completed.
ORGANIZING THE DATA DISK
 Organizing the DATA Disk
 DATA disk has minimal organization.
 Looking at structure, not contents, of text
files.
 Reorganize DATA disk to make it easier to
manage.
 Need to create directories.
 Copy files to correct subdirectories.
 Move files.
 Will create GAMES subdirectory.
 Map to game programs on DATA disk.
ACTIVITY—SETTING UP THE GAMES
SUBDIRECTORY
 Setting up the PROG Subdirectory
 Note: DATA disk in Drive A and C:\> is
displayed.
 Activity steps.
 Key in:



A:
MD GAMES
MD GAMES\ARGH
Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line
Franklin, Beedle & Associates ©2003 ISBN: 1-887902-82-1
Slide 30
 Use DATA disk to emulate organizing an
existing disk
SECTION 8.4 (p. 385)

Slides 31-32
/F – displays names of files in each folder.
/A – use ASCII instead of extended characters
SECTION 8.5 (pp. 385-387)

Slide 33
 See graphical representation of folder
structure.
 TREE with /A parameter – Got lines that
could be created with keyboard using only
ASCII characters
 Extended character set – able to draw solid
unbroken lines on screen.
 Discuss using graphic display with
redirection or MORE filter.
SECTION 8.6 (pp. 387-388)

Slides 34-35
 Discuss why students’ disk could look
different from slide. They can copy, delete,
and/or create files as needed.
 Do not move or copy programs installed on
hard disk. May do so here – special
examples.
SECTION 8.7 (pp. 388-394)
 Slide 36
 COPY – copies only files not
subdirectories.
 Can manipulate default directory to shorten
path name.
Page 8
Instructor: Prof. Michael P. Harris
ITSC 1405 – Intro to PC Operating Systems






















MD GAMES\MLINK
MD GAMES\OTHER
COPY
C:\WUGXP\GAMES\MLILNK\*.*
GAMES\MLINK
DIR C:\WUGXP\GAMES\MLINK
DIR A:\GAMES\MLINK
CD GAMES\OTHER
CD C:\WUGXP\GAMES
C:
A:
COPY C:LS*.*
DIR C:
COPY C:ML*.*
CD\
TREE GAMES /F
COPY C:ARG*.* GAMES\ARGH
CD C:\
TREE GAMES /F
DIR C:\WUGXP\*.TXT
ATTRIB -S -H -R *.*
DEL *.TXT
XCOPY C:\WUGXP\*.TXT /D:05-3100
Chapter 8
Organizing and Managing Your Hard Drive
 Be careful when using DEL with a wild
card.
 Advantages of XCOPY.
- Copies files and subdirectories.
- Default confirms overwrite.
- Can make choices by date.

Discussion Question (6) - What are some of
the drawbacks of using the COPY command for
organizing your disk?
Activity completed.
THE MOVE COMMAND REVISITED
 The MOVE Command Revisited
 Used to move files to new location or
rename subdirectory.
 Moving data files and data
directories usually safe.
 Moving program files and renaming
program directories is not done safely
 Windows registers program files,
their names, and location in
Registry.
 If files moved/renamed at
command prompt, Registry cannot
find them.
 Programs may no longer work.
 Program files.
 Not usually copied to location.
 Installed in location with a setup
program.
 Files pertaining to program –
placed in many different locations.
 Problems can also occur when dealing with
Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line
Franklin, Beedle & Associates ©2003 ISBN: 1-887902-82-1
SECTION 8.8 (pp. 394-395)

Slides 37-39
 When reorganizing hard disk:
- Do not usually want to copy files and
directories.
- Want to move files to new location.
- Want to rename subdirectories.
 Go over program installation routine.
 Emphasize why it is not "safe" to move
programs.
 Primarily concerned with organizing
data files.

Discussion Question (7) - Why is moving
program files and renaming program directories
not as "safe" as moving data files and renaming
data file directories?
Page 9
Instructor: Prof. Michael P. Harris
ITSC 1405 – Intro to PC Operating Systems

Chapter 8
Organizing and Managing Your Hard Drive
small programs contained within one
directory and run under DOS not windows.
If you manipulate program
files/directories.
 Note which directory program files are
in before starting.
ACTIVITY—USING MOVE TO ORGANIZE
YOUR DISK
 Using MOVE to Organize your Disk
 Data disk in Drive A, A:\> displayed.
 Activity steps.
 Key in:





















DIR VEN.*
ATTRIB +H STEVEN.FIL
MOVE VEN.* ASTRONOMY\VENUS
DIR VEN*.*
ATTRIB -H STEVEN.FIL
DIR VEN.* then DIR MER.*
DIR JUP.*
MOVE MER.*
ASTRONOMY\MERCURY
 MOVE JUP.*
ASTRONOMY\JUPITER
 TREE ASTRONOMY /F
 REN ASTONOMY 3PLANETS
 DIR ASTRONOMY
 DIR 3PLANETS then DIR /W
 MD ASTRO
Close the command line window
Open My Computer & double-click Drive A
Click View then Icons then View then Status
bar then View button and select List
Size the window so all files are displayed
Hold down <Ctrl> key and without
releasing it click following 11 files:
AST.99
ASTRO.NEW
PLANETS.TXT
AST.BUD
GALAXY.NEW
TITAN.TXT
ASTROLOGY.FIL ASTRO.TXT
AST.TXT
ZODIAC.FIL
GALAXY.TXT
Release <Ctrl> key,
Move mouse over any of selected files and
right click right mouse button
Click Cut
Double-click ASTRO directory
Right-click in blank area of folder
Click Paste
Deselect the files
Click View then List
Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line
Franklin, Beedle & Associates ©2003 ISBN: 1-887902-82-1
SECTION 8.9 (pp. 395-402)

Slide 40
 ATTRIB command used to hide files that
will not be moved.
 REN command does not rename
subdirectories.
 MOVE command
Keyed in one way – move files
Keyed in another way – renamed
subdirectories.
 Stress differences between moving files and
renaming subdirectories.
 GUI is more efficient. – Create directory to
hold files and then copy group of files to
directory.

Discussion Question (8) - What steps would
you take to move a directory?
Page 10
Instructor: Prof. Michael P. Harris
ITSC 1405 – Intro to PC Operating Systems




Chapter 8
Organizing and Managing Your Hard Drive
Close all open windows
Open Command Line window and make A:\
the default directory
Key in TREE /F
Activity completed.
CHECKING A DISK: FAT and NTFS
 Checking a Disk
 CHKDSK still viable utility program.
 External command.
 Stored in C:\WINDOWS\SYSTEM32
subdirectory
 Used on disks with any file system
supported by WXP Professional.
 CHKDSK gets needed disk information.
 Reports disk space and usage
information (NTFS and FAT file
systems).
 Status report provided with
information specific to file system on
drive you checked.
 Amount of free space left.
 Bad spots.
 File fragmentation.
 Problems with logical structure.
 CHKDSK use with FAT file system.
 Analyzes:
 File Allocation Tables.
 Directory table for root
directory.
 Directory structure.
 Integrity of files.
 Validity of any long file name.
 Checking FAT includes tracing out
chain of data for each file.
 Do directory entries match location
and lengths of files with FAT on
specified drive?
 Are all directories readable?
 After checking disk – (gives statistical
information).
 Reports # of files on disk.
 How much space taken.
 Establishes amount of space left on
disk.
Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line
Franklin, Beedle & Associates ©2003 ISBN: 1-887902-82-1
SECTION 8.10 (pp.403-404)

Slides 41-47
 REVIEW.
- What information about your disks do you
often need?
 CHKDSK makes sure both copies of FAT
match.
 Directories - called indexes by NTFS.
 Syntax.
- Volume = Specifies drive letter, mount
point, or volume name.
- Filename – FAT only = Specifies files to
check for fragmentation.
/F = Fixes disk errors.
/V = On FAT/FAT32 displays full path &
name of every file on disk.
/R = Locates bad sectors & recovers
readable information (implies /F).
/L: size (NTFS only) = Changes log file
size to specified # of kilobytes – if size not
specified displays current size.
/X = Forces volume to dismount first if
necessary. All opened handles to volume
invalid (implies /F).
/I - NTFS only = Performs less vigorous
check of index entries.
/C - NTFS only = Skips checking of cycles
within the folder structure.



Discussion Question (10) - What is the
function and purpose of the CHKDSK
command?
Discussion Question (11) - CHKDSK informs
you of two types of errors. Explain.
Discussion Question (13) - Give the syntax for
CHKDSK and explain two parameters when
Page 11
Instructor: Prof. Michael P. Harris
ITSC 1405 – Intro to PC Operating Systems



NTFS uses MFT to track files on disk not
FAT.
CHKDSK with NTFS (three stages).
 Stage 1.
 Looks for consistency.
 Identifies which file segments and
clusters are currently being used.
 Then compares collected
information against information
NTFS keeps on disk.
 Looking for discrepancies or
problems.
 Stage 2.
 Verifies “indexes” (directories).
 Checks for internal consistency.
 Ensures every file belongs to at
least one directory.
 Reference to file in MFT is
valid.
 Verifies file times/dates/size.
 This stage is most time consuming.
 Stage 3.
 Checks and verifies security for
each directory and file.
 Info includes file’s owner,
permission granted to
users/groups, and auditing that
is to occur for file or directory.
CHKDSK syntax. See PowerPoint slide #52.
 Right-side column – syntax
explanation.
 /I or /C switch reduces amount of time
required to run CHKDSK by stripping
certain checks of volume.
 Some parameters valid only with FAT
file system.
 Some parameters valid only with
NTFS drives.
 On hard disk need to have
administrator privileges to run
CHKDSK.
Chapter 8
Organizing and Managing Your Hard Drive
used with FAT volumes. With NTFS volumes.
ACTIVITY—USING CHKDSK ON HARD
AND FLOPPY DRIVES
Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line
Franklin, Beedle & Associates ©2003 ISBN: 1-887902-82-1
Page 12
Instructor: Prof. Michael P. Harris
ITSC 1405 – Intro to PC Operating Systems

Using CHKDSK on Hard and Floppy Drives
 DATA disk in Drive A with A:\>
displayed.
 Activity steps.
 Key in:






C:
CD \WINDOWS\SYSTEM32
DIR CHKDSK.*
CHKDSK
CD \
CHKDSK E:
A:
CHKDSK



Activity completed.
THE VERBOSE PARAMETER WITH THE
CHKDSK COMMAND
 The Verbose Parameter with the CHKDSK
Command
 Using /V on FAT drive.
 Running in verbose mode.
 Gives status report.
 Lists every file on disk, including
hidden ones.
 Using /V on NTFS drive.
 Displays clean-up messages.
 Parameters are associated with specific
commands and perform specific tasks for
those commands.
 /V switch with FORMAT – puts
volume label on disk.
 /V with CHKDSK - see above.
ACTIVITY—USING THE /V PARAMETER
AND USING DIR PARAMETERS
 Using the /V Parameter and DIR Parameters
 DATA disk in drive A, A:\> displayed.
 Files may appear in different order.
 To facilitate mouse usage, disable
QuickEdit Mode.
 Activity steps.
 Key in:



CHKDSK /V
CHKDSK /V > CHKDSK.TXT
EDIT CHKDSK.TXT
Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line
Franklin, Beedle & Associates ©2003 ISBN: 1-887902-82-1
Chapter 8
Organizing and Managing Your Hard Drive
SECTION 8.11 (pp. 404-408)

Slides 48
 Discuss results of:
- CHKDSK command.
- CHKDSK E: command.
- Last CHKDSK command in activity.
 Remind students that if they do not have
a disk formatted with NTFS should stop
at Step 4 and read rest of activity.
SECTION 8.12 (p. 409)


Slides 49-51
Discussion Question (14) - What is the verbose
mode: Explain the use of the /V parameter with
the CHKDSK command, with a FAT file
system, and an NTFS file system.
SECTION 8.13 (pp. 409-413)

Slide 52
 Redirect output of CHKDSK /V to file
and use command line editor to see it.
 DIR /S supplants CHKDSK /V in ability to
show every file on the disk in every
subdirectory.
 CHKDSK /V shows hidden files but DIR
with new parameters are better.
Page 13
Instructor: Prof. Michael P. Harris
ITSC 1405 – Intro to PC Operating Systems




Move scroll bar halfway down screen and
then to bottom of file.
Click File then Exit
Key in: DIR /S then DIR *.NEW /S
then DIR /AD
Chapter 8
Organizing and Managing Your Hard Drive
 Discuss use of DIR with /A, /D, /R, /H, /S,
and /A.
 Discuss use of (–) sign before attribute.
Activity completed.
USING CHKDSK TO REPAIR DISK
PROBLEMS
 Using CHKDSK to Repair Disk Problems
 FAT disk.
 FAT and directory work together.
 Each file has entry in directory table.
 Entry points to starting cluster in
FAT.
 If file longer than one cluster, FAT
has pointer to next cluster.
 Pointers chain all data together in a
file.
 Lost clusters.
 Occur when chain broken (lost
pointer).
 No entry in root directory.
 Marked as used in FAT.
 Not available for new data.
 Do not belong to specific file.
 Cannot be retrieved.
 Lose space on the disk.
 Why lost clusters occur.
 User does not exit a program
properly.
 Power failures or power surges.
 NTFS disk.
 In Stage 2 CHKDSK looks for
orphaned files.
 Has entry in MFT but not listed in
any directory.
 Similar to lost cluster in FAT file
system.
 If lost or orphaned files occur may not be
able to boot back into Windows.
 Boot using Windows boot disks and
use Automated System Recovery Disk
to try to repair damage or use System
Restore.
Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line
Franklin, Beedle & Associates ©2003 ISBN: 1-887902-82-1
SECTION 8.14 (pp. 414-416)

Slides 53-67
 On FAT disk FAT and directory work
together.
 Explain how lost clusters occur.
 Discuss reasons why space is lost on disk.
 Most lost clusters recovered contain useless
information. Thus, generally just delete the
files. Always written to root directory with
file extension of .CHK.



Discussion Question (12) – What is a lost
cluster? A cross-linked file? What impact does
either of these have on available disk space?
Discussion Question (16) - Why would you
use the parameter of the file name with the
CHKDSK command?
Discussion Question (17) - What is the
purpose and function of the /F parameter when
it is used with the CHKDSK command, and
under what circumstances would you use it?
Page 14
Instructor: Prof. Michael P. Harris
ITSC 1405 – Intro to PC Operating Systems








Chapter 8
Organizing and Managing Your Hard Drive
 Will be covered in Chapter 13.
When WXP running cannot use CHKDSK
with /F to try to repair disk errors.
See PowerPoint slide # showing message at
beginning of CHKDSK display.
Can schedule CHKDSK /F to run when
computer starts up next time.
 Utility will run before most of system
loads – eliminates problem of other
processes running.
Can use /F and /R with CHKDSK on a
floppy.
With multiple hard drives can run
CHKDSK on drive that is not default.
 On active partition may report
erroneous error messages.
/F – repairs logical errors.
/R – locates bad sectors and recovers
readable information.
Using /R implies /F.
Be careful when running CHKSDK.
 Back up data files in case “fix”
behaves improperly.
 Using /F on hard disk with large
number of files (millions) CHKDSK
can take a long time (days) to
complete.
 Will not have access to drive you
are repairing – command does not
give up control of disk until it is
finished.
 If drive (system volume) being
checked during startup process –
computer not available to you until
CHKDSK process is complete.
Cross-linked files.
 Usually occurs on FAT disks.
 Two files claim same cluster in FAT.
 See PowerPoint slide #72 Figure 8.7
Cross Linked Files.
 Edit – MY.FIL – file contains own
data as well as part of HIS.FIL.
 Delete MY.FIL will be deleting
part of HIS.FIL.
Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line
Franklin, Beedle & Associates ©2003 ISBN: 1-887902-82-1
Page 15
Instructor: Prof. Michael P. Harris
ITSC 1405 – Intro to PC Operating Systems

To recover data from cross-linked files:
 Copy each file to new location so
they are no longer linked.
 One of files is usually bad – but
have one file that is good.
ACTIVITY—USING CHKDSK TO REPAIR
DISK PROBLEMS
 Using CHKDSK to Repair Disk Problems
 DATA disk in drive A with A:\>
displayed.
 Activity steps.
 Key in:




Chapter 8
Organizing and Managing Your Hard Drive
CHKDSK /R
CD /D C:\
CHKDSK A: /R
CHKDSK E:

Activity completed.
SECTION 8.15 (pp. 416-418)

Slides 68-69
 To run CHKDSK Windows XP needs total
access to disk.
 Stop at Step 3 unless you have errors or
have an NTFS drive.
 If there are errors on FAT disk – would be
asked if you wanted to convert lost files to
fragments.
CHECKING DISK WITH SYSTEM TOOLS
 Checking Disks with System Tools
 Can use System Tools (found in GUI) to
check a disk.
 Error-checking (CHKDSK).
 Backup.
 Defragmentation.
SECTION 8.16 (p. 418)
ACTIVITY—CHECKING DISKS WITH
SYSTEM TOOLS
 Checking Disks with System Tools
 DATA disk in drive A.
 Activity steps.
 Key in: EXIT
 Open My Computer.
SECTION 8.17 (pp. 418-421)








Slide 70
Slide 71
 Three options for floppy.
1. Check for errors.
Can fix errors if any found.
Can try to fix bad sectors BUT
Process time consuming.
Floppy cheap – copy files on
another disk & throw
floppy away.
2. Can be backed up.
3. If Defragmentation chosen – CANNOT
BE DONE ON FLOPPY.
Right-click A drive.
Click Properties/Tools/Check Now.
Click Automatically fix file system errors
Click Start
Close all open windows.
Activity completed.
 Defragmenting done only on hard disk.
CONTIGUOUS AND NONCONTIGUOUS
FILES
 Contiguous and Noncontiguous Files
Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line
Franklin, Beedle & Associates ©2003 ISBN: 1-887902-82-1
SECTION 8.18 (pp. 421-423)

Slides 72-83
Page 16
Instructor: Prof. Michael P. Harris
ITSC 1405 – Intro to PC Operating Systems













To OS data is string of bytes that it keeps
track of by grouping data into file.
To store/retrieve files disk divided into
numbered blocks called sectors.
 Contiguous sectors grouped into
clusters.
Files usually take up more space than one
sector.
OS keeps track of location of all parts of
file by means of directory and FAT.
NTFS – keeps track of files by means of
MFT.
Original W95 used standard FAT – 16-bit
version.
B W95 – Millennium version.
 Can use 16-bit FAT or 32-bit FAT
(FAT 32)
 Uses 32-bit FAT
Beginning with W2K supports NTFS.
NTFS
 Previously supported only by Windows
NT.
 Allows local security.
 Access to areas of partition can be
blocked to some users – allowed to
others.
 Useful in environment where two
or more users have access to same
computer.
 Can block access to OS files.
Decision on which file system to use made
when disk volume originally partitioned.
FAT keeps record of cluster numbers each
file occupies.
 As OS writes files to new disk – makes
entry in disk’s directory.
 Updates FAT with cluster numbers
used to store that file.
Files are written to disk in adjacent clusters
whenever possible.
 Easier to retrieve/store information.
See right side for explanation of the
PowerPoint Slides showing contiguous
and noncontiguous files.
Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line
Franklin, Beedle & Associates ©2003 ISBN: 1-887902-82-1
Chapter 8
Organizing and Managing Your Hard Drive
 Cluster = Smallest unit OS deals with.
 Number of sectors that make up clusters on








hard disk varies depending on size of hard
disk and FAT used.
Contiguous vs. fragmented disk.
- Performance implications of a fragmented
disk.
All floppy drives are FAT12.
See PowerPoint slide #84.
- Shows one file in cluster.
See PowerPoint slide #85.
- Shows two contiguous files.
See PowerPoint slide #86.
- Senator file fragmented.
- If Senator file deleted FAT makes clusters
1, 2,3,7, and 8 available – data actually
remains on disk.
See PowerPoint slide #87.
- Adding a file
See PowerPoint slide #88.
- Adding more files.
Discussion Question (15) -Compare and
contrast contiguous files with noncontiguous
(fragmented) files.
Page 17
Instructor: Prof. Michael P. Harris
ITSC 1405 – Intro to PC Operating Systems





Contiguous files are written to adjacent
clusters on a disk.
Non-contiguous (fragmented) files are
spread out on the disk.
Fragmented disk - disk with fragmented
files.
 Causes system to slow down.
 Takes longer to read as read/write
heads move around disk to find all
parts of a file.
Use parameter with CHKDSK to see if
files are contiguous or noncontiguous.
Fragmented disk - disk with fragmented
files.
 Only works on FAT volumes.
ACTIVITY—USING CHKDSK TO SEE IF
FILES ARE CONTIGUOUS
 Using CHKDSK to See if Files are
Contiguous
 DATA disk in Drive A with A:\>
displayed.
 Activity steps.
 Key in:




Chapter 8
Organizing and Managing Your Hard Drive
CHKDSK BORN.TXT
CHKDSK *.TXT
CHKDSK *.*
CHKDSK CLASS\*.*

Activity completed.
SECTION 8.19 (pp. 455-458)
 Slide 84
 Adding parameter of file name checks disk
& sees if all parts of file are contiguous.
 Wildcards used to check a group of files
with a common denominator.
 A fragmented disk (noncontiguous files)
slows performance.
 Disk optimization program rearranges
storage on hard disk so each file is stored in
sequentially numbered clusters.

DEFRAGMENTING YOUR HARD DISK
 Defragmenting your Hard Disk
 Perform disk maintenance to make
programs run faster/better.
 Run Defragmenter program.
 Program moves data on disks so
files are contiguous and rewrites
directory table and FAT.
 Can run Disk Defragmenter without
closing all programs.
 Better/faster/safer to close all open
Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line
Franklin, Beedle & Associates ©2003 ISBN: 1-887902-82-1
Discussion Question (18) -Explain the purpose
and function of disk optimization programs.
SECTION 8.20 (pp. 458-460)
 Slides 85-87
 Fragmented hard disks.
Occurs as new files data placed on first
available clusters.
Performance slowed down.
 Run Defragmenter program from:
Tools menu on disks drive property sheet.
Start Menu.
Page 18
Instructor: Prof. Michael P. Harris
ITSC 1405 – Intro to PC Operating Systems
programs you have running.
 Include screen savers or virusprotection programs.
ACTIVITY—USING DISK
DEFRAGMENTER
 Using Disk Defragmenter
 Can this activity be done in your lab?
 Activity steps.


Click Start/All Programs/Accessories/System
Tools/Disk Defragmenter
Highlight Drive C
Click Analyze/View Report/Close
Close all open windows


 Activity completed.
Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line
Franklin, Beedle & Associates ©2003 ISBN: 1-887902-82-1
Chapter 8
Organizing and Managing Your Hard Drive
 Cannot defragment floppy disks.
SECTION 8.21 (pp. 461-463)
 Slide 88
 Chose to defragment or view analysis report
in dialog box in graphical display of disk.
 Defragment hard drive regularly as it
improves performance of system.
Page 19
Download