Organizing and Managing Your Hard Disk Ch 8 1 Overview Learn how to organize a hard disk efficiently and logically to serve your specific needs. Ch 8 2 Overview How to determine the best command to use to locate a specific file, or to manage the hard disk, will be discussed. Ch 8 3 Overview Will discuss the purpose and function of the CHKDSK command and then use the command to accomplish various tasks. Ch 8 4 Overview Use the Disk Defragmenter program to optimize performance of your disk. Ch 8 5 Why Organize a Hard Disk? Will accumulate many programs. Each program generates many files. Ch 8 6 Why Organize a Hard Disk? Windows XP Professional is installed, certain folders are created including: Windows (WINNT) Program Files Documents and Settings My Documents Ch 8 7 Why Organize a Hard Disk? Integrated programs (suites): Provide tools for common types of work. Ch 8 8 Why Organize a Hard Disk? Additional programs must be installed on the hard disk before they can be used. Ch 8 9 Why Organize a Hard Disk? Critical programs that should be purchased/downloaded: Virus checking program File compression utility Ch 8 10 Why Organize a Hard Disk? Need to determine: How program is installed Where program is installed Ch 8 11 Why Organize a Hard Disk? Root directory table capacity varies depending on the file system used. Ch 8 12 Why Organize a Hard Disk? Can choose own installation location. Can present problem when asking for technical support. Ch 8 13 Why Organize a Hard Disk? Fig 8.1 A Typical Hard Disk Configuration p. 377 Ch 8 14 Why Organize a Hard Disk? Where should data files be placed? Do NOT place data files in program folders. Data files contain information. Program files contain instructions. Ch 8 15 Why Organize a Hard Disk? Part of good organizational scheme is to create meaningful names for data files Need naming conventions Long file names problematic Use of spaces can create problems Ch 8 Similar file names problematic 16 Why Organize a Hard Disk? Fig 8.2 Organizing a Hard Disk by Software Application Package p. 379 Ch 8 17 Why Organize a Hard Disk? Data files used in conjunction with different programs can be problematic. Ch 8 18 Why Organize a Hard Disk? Organize disk by way you work. Application programs are tools. Ch 8 19 Why Organize a Hard Disk? Organization should assist you in saving, retrieving, and backing up data files. Ch 8 20 Methods of Organizing a Hard Disk Criteria for Organizing a Hard Disk A. Root directory - map to rest of disk B. Plan organization of hard disk C. Develop a naming convention for files and directories Ch 8 21 Methods of Organizing a Hard Disk D. Create many folders/subfolders prior to copying files into them E. If application software installed on computer, cannot/must not rename/move program/program support files Ch 8 22 Methods of Organizing a Hard Disk F. Create shallow/wide folders NOT compact deep folders G. Data files and program files should not be in same subdirectory Ch 8 23 Methods of Organizing a Hard Disk H. Many small directories with few files better than a large subdirectory with many files I. Directory names short but descriptive Ch 8 24 Methods of Organizing a Hard Disk J. Create separate subdirectory for batch files K. Create UTILS (utilities) subdirectory Ch 8 25 Methods of Organizing a Hard Disk L. Learn how to use application packages and how packages work M. Learn how application package works with subdirectories Ch 8 26 Methods of Organizing a Hard Disk N. Analyze way you work O. Analyze your environment Ch 8 27 Methods of Organizing a Hard Disk Hard disks can be organized in many ways. Ch 8 28 Methods of Organizing a Hard Disk Organization should be result of: How you work How programs work Ch 8 29 Organizing a Disk Hard disk can be reorganized without reformatting it or losing files. Ch 8 30 Viewing Disk Structure with Tree Command TREE command used to see graphic representation of disk structure. Ch 8 31 Viewing Disk Structure with Tree Command TREE syntax: TREE [drive:] [path] [/F] [/A] Ch 8 32 Activity - Using the TREE Command KEY CONCEPTS: See graphical representation of folder structure Tree command with /A and with /F Extended character set Using graphic representation with redirection or MORE filter Ch 8 33 Organizing the DATA Disk Looking at structure, not contents, of text files Reorganizing DATA disk will make it easier to manage Note: in next slide, … represents file names Ch 8 34 Organizing the DATA Disk Fig. 8.5 Current DATA Disk Structure p. 388 Ch 8 35 Activity—Setting Up the GAMES Subdirectory KEY CONCEPTS: COPY - copies only files not subdirectories Can manipulate default directory to shorten path name Advantages of XCOPY command Using ATTRIB -S -H - R *.* Take care when using DEL with a wild card Ch 8 36 MOVE Command Revisited MOVE command can: Move files to new location Rename subdirectories Ch 8 37 MOVE Command Revisited Safe to move data files and data directories. Moving program files and renaming program directories may cause program to fail. Ch 8 38 MOVE Command Revisited Program files: Not usually copied to location Installed in location with a setup program Ch 8 39 Activity—Using MOVE to Organize Your Disk KEY CONCEPTS: ATTRIB - hide files that won’t be moved REN - does not rename subdirectories Results of using MOVE command Differences between moving files and renaming subdirectories When GUI is more efficient Ch 8 40 Checking a Disk: FAT and NTFS CHKDSK is a viable utility program. Ch 8 41 Checking a Disk: FAT and NTFS Use CHKDSK to get information about a disk: Free space available Bad spots File fragmentation Logical structure problems Ch 8 42 Checking a Disk: FAT and NTFS CHKDSK command with FAT file system: Analyzes: File Allocation Tables on disk Integrity of files Traces chain of data for each file Gives statistical information Ch 8 43 Checking a Disk: FAT and NTFS NTFS uses MFT to track files on disk. Ch 8 44 Checking a Disk: FAT and NTFS CHKDSK command with NTFS: Stage 1 Looking for discrepancies or problems Stage 2 Verifies directories Checks for internal consistency Verifies files times/dates/size Stage 3 Checks/verifies security for each directory and file Ch 8 45 Checking a Disk: FAT and NTFS CHKDSK syntax: CHKDSK [volume] [[path] filename]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]] Ch 8 46 Checking a Disk: FAT and NTFS Some parameters valid only with . . . FAT file system. NTFS drives. Need administrator privileges to run CHKDSK on hard disk. Ch 8 47 Activity—Using CHKDSK on Hard & Floppy Drives KEY CONCEPTS: Information provided by CHKDSK How to repair a disk Ch 8 48 Verbose Parameter with the CHKDSK Command CHKDSK with /V on FAT drive: Running in verbose mode Gives status report Displays every file on disk Ch 8 49 Verbose Parameter with the CHKDSK Command CHKDSK with /V on NTFS drive: Displays any clean-up messages Ch 8 50 Verbose Parameter with the CHKDSK Command Parameters: Are associated with specific commands Perform specific tasks for those commands Ch 8 51 Activity—Using /V Parameter & Using DIR Parameters KEY CONCEPTS: Redirect output of CHKDSK /V to file and use command line editor to view it DIR /S vs. CHKDSK /V How to pause display How to display files and directories Use of DIR with /A, /D, /R, /H,/S, & /A Use of - sign before attribute Ch 8 52 Using CHKDSK to Repair Disk Problems FAT disk: FAT and Directory work together Each file has entry in directory table FAT points to next cluster if file longer than one cluster Pointer chains all data together in a file If chain broken (lost pointer) end up with lost clusters Ch 8 53 Using CHKDSK to Repair Disk Problems Lost clusters: Occur when chain broken (lost pointers) Marked as used in FAT Do not belong to specific file Cannot be retrieved Lose space on disk Ch 8 54 Using CHKDSK to Repair Disk Problems Fig 8.6 Lost Clusters p. 414 Ch 8 55 Using CHKDSK to Repair Disk Problems Why lost clusters occur: Program not exited properly Power failure or power surges Ch 8 56 Using CHKDSK to Repair Disk Problems NTFS disk (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 Ch 8 57 Using CHKDSK to Repair Disk Problems If lost or orphaned files occur, may not be able to boot back into Windows. Ch 8 58 Using CHKDSK to Repair Disk Problems Cannot use CHKDSK /F to repair disk errors when Windows XP Professional is running. Ch 8 59 Using CHKDSK to Repair Disk Problems When executing CHKDSK /F command, you get message at beginning of display similar to this: C:\>CHKDSK /F The type of the file system is FAT32. Cannot lock current drive. CHKDSK cannot run because the volume is in use by another process. Would you like to schedule this volume to be checked the next time the system restarts? (Y/N) Ch 8 60 Using CHKDSK to Repair Disk Problems Can schedule CHKDSK /F to run when computer starts up next time. Can use /F and /R with CHKDSK on a floppy disk. Ch 8 61 Using CHKDSK to Repair Disk Problems With multiple hard drives can run CHKDSK on hard drive that is not default drive. On an active partition may report erroneous error messages. Ch 8 62 Using CHKDSK to Repair Disk Problems /F - repairs logical errors. /R - locates bad sectors and recovers readable information. Using /R implies /F. Ch 8 63 Using CHKDSK to Repair Disk Problems Be careful when running CHKSDK: Back up data files Large number of files can take a long time to repair disk Ch 8 64 Using CHKDSK to Repair Disk Problems Cross-linked files: Usually occur on FAT disk Two files claim same cluster Ch 8 65 Using CHKDSK to Repair Disk Problems Fig 8.7 Cross-Linked Files p. 416 Ch 8 66 Using CHKDSK to Repair Disk Problems It is possible to recover data from cross-linked files. Ch 8 67 Activity—Using CHKDSK to Repair Disk Problems KEY CONCEPTS: To run CHKDSK Windows XP Professional needs total access to disk. How errors on FAT disk are resolved Ch 8 68 Activity—Using CHKDSK to Repair Disk Problems Fig 8.8 A Lost Cluster Opened in Notepad p. 418 Ch 8 69 Checking Disks with System Tools System Tools (found in GUI) can be used to check a disk: Error-checking (CHKDSK) Backup Defragmentation Ch 8 70 Activity—Checking Disks with System Tools KEY CONCEPTS: Three choices for floppy Check and fix errors If bad sectors found, copy files to other disk throw bad floppy away Backup disk Defragmentation (can’t be done) Defragmentation - only on hard disk Ch 8 71 Contiguous and Noncontiguous Files Data - string of bytes OS keeps track of by grouping information into files. To store/retrieve files disk divided into number blocks called sectors. Contiguous sectors grouped into clusters. Ch 8 72 Contiguous and Noncontiguous Files Cluster: Smallest unit operating system can read from/write to Comprised of one or more sectors File (usually) consists of more than one cluster Ch 8 73 Contiguous and Noncontiguous Files The directory and FAT are used by the operating system to keep track of the location of all parts of a file. Ch 8 74 Contiguous and Noncontiguous Files NTFS: Keeps track of files by means of MFT Beginning with Windows 2000 NTFS is supported Allows local security Ch 8 75 Contiguous and Noncontiguous Files Decision on which file system to use determined when disk volume originally partitioned. Ch 8 76 Contiguous and Noncontiguous Files FAT keeps record of cluster numbers each file occupies. Files written to disk in adjacent clusters whenever possible. Ch 8 77 Contiguous and Noncontiguous Files Fig 8.9 One File in Clusters p. 423 Ch 8 78 Contiguous and Noncontiguous Files Fig 8.10 Contiguous Files in Clusters p. 423 Ch 8 79 Contiguous and Noncontiguous Files Fig 8.11 Noncontiguous Files in a Cluster p. 423 Ch 8 80 Contiguous and Noncontiguous Files Fig 8.12 Adding a File p. 423 Ch 8 81 Contiguous and Noncontiguous Files Fig 8.13 Adding More Files p. 423 Ch 8 82 Contiguous and Noncontiguous Files Noncontiguous, or fragmented, files can slow disk performance. On FAT volumes CHKDSK with parameter used to see if files are contiguous or fragmented. Ch 8 83 Activity—Using CHKDSK to see if Files are Contiguous KEY CONCEPTS: Adding file name parameter after CHKDSK Using wildcards with common denominator Use of wildcards with CHKDSK command Importance of contiguous files Disk Optimization programs Ch 8 84 Defragmenting Your Hard Disk Disk maintenance should be performed on a regular basis to make programs run faster and better. Ch 8 85 Defragmenting Your Hard Disk Run Defragmenter program from: Tools menu (Disk Drive Property Sheet) Start Menu Ch 8 86 Defragmenting Your Hard Disk Disk Defragmenter program: Moves data on disks so files are contiguous Can be run without closing all programs Better/faster/safer to close all programs prior to running program Ch 8 87 Activity: Using Disk Defragmenter KEY CONCEPTS: Can choose to defragment or view analysis report Wise to defragment hard drive regularly to improve performance of system Ch 8 88