Upload
everett-rice
View
233
Download
0
Embed Size (px)
Citation preview
Getting Started
Additional information
Important DOS CommandsGetting Started
dir lists disk directories
ver displays OS version
cls clear command prompt screen
exit exit command prompt
msconfig system configuration console
chkdsk utility to check a disk
Chapter 1 adds (39 slides) CTEC 110 2
Command Line Interfaces
• DOS Prompt (No Longer Available)
• Command Prompt
• PowerShell
CTEC 110 3Chapter 1 adds (39 slides)
Getting to the Command Prompt…
• StartComputerC: driveWindowsSystem32cmd
• Close (X)
• Starttype: cmd
• Close (X)
• StartAll ProgramsAccessoriesright click Command Prompt
Run as AdministratorCTEC 110 4Chapter 1 adds (39 slides)
Controlling the Appearance
While in the window view we can . . . use Minimize button. use Maximize button. use Restore button. use Close button alter size of text. toggle between window and full-screen mode. (full-screen no longer available in Windows 7)
Chapter 1 adds (39 slides) CTEC 110 5
Overview of Files and Disks Figure Disks and Files
Chapter 1 adds (39 slides) 6CTEC 110
Introduction to Subdirectories—The Path
7Chapter 1 adds (39 slides) CTEC 110
Root directory:Created and named by OS when disk is
formatted Indicated by the backslash (\)
• Other subdirectories are created and named by the user
• Naming rules are the same as the rules for naming files
CTEC 110 8Chapter 1 adds (39 slides)
Introduction to Subdirectories—The Path
Long File Names
• LFN - Long filenames: Microsoft's way of implementing filenames longer than the 8.3 filename, or short-filename, in their FAT and NTFS file systems.
• Maximum length is considered to be 255 characters.
Chapter 1 adds (39 slides) CTEC 110 9
Path:Route followed by OS to locate, save,
and/or retrieve a fileSubdirectory nameAbsolute pathsRelative paths
10Chapter 1 adds (39 slides) CTEC 110
Introduction to Subdirectories—The Path
CTEC 110 11Chapter 1 adds (39 slides)
Introduction to Subdirectories—The Path
The Default Drive and Default Directory
At the command prompt:C:\> (Indicates current drive “C”)P: (Sets P as current drive and..)
(Sets P-Drive as default drive)cd \BOOKS
(Sets \BOOKS as default directory
on the P-Drive)Chapter 1 adds (39 slides) CTEC 110 12
All languages have rules or conventions for
speaking and writing.
To communicate with computer at command line prompt:
Learn its language (commands) Follow its syntax (word order) Use correct punctuation Limit to 255 characters on input
13Chapter 1 adds (39 slides) CTEC 110
Typical Command Syntax
Typical Command Syntax
• CommandName [d:][path]filename [/options]– Space after command name– Segment in “[“ “]” is optional– d stands for drive letter followed by a colon “:”– Path is where the file is located– filename is what is acted upon– options preceded by /
CTEC 110 14Chapter 1 adds (39 slides)
What Are Parameters?
Information to modify or qualify a command
Parameters can be: • Variable (%choice%)• Fixed (“constant”)
15Chapter 1 adds (39 slides) CTEC 110
Command Line Editing
Reuse the last command keyed in without rekeying it:
<F1> - recalls one letter at a time <F3> - recalls entire command line - recalls one letter at a time - recalls entire command line
16Chapter 1 adds (39 slides) CTEC 110
17Chapter 1 adds (39 slides) CTEC 110
Command Line Editing
Chapter 1 adds (39 slides) CTEC 110 18
Command Line Editing
Chapter 1 adds (39 slides) CTEC 110 19
Command Line Editing
Graphical vs Command Line
• Not all tasks can be done in the command line can also be done in the GUI
• With the Graphical User Interface (GUI) you can select files at random (CTRL-Click) to be acted upon
• With the Command Line User Interface (CLI) we use wildcard characters to make selections of multiple files
Chapter 1 adds (39 slides) CTEC 110 20
Type of Files stored on disks
• Program files are considered binary files and are executable
• Data files are considered generally text files and are used by the programs for configuration or data store purposes
Chapter 1 adds (39 slides) CTEC 110 21
The DIR Command
• Displays the list of files and other directories
• Generally termed as the table of contents
DIR command syntax:
DIR [drive:] [path] [filename] [/A [[:] attributes]] [/B] [/C] [/D] [/L] [/N] [/O[[:] sortorder]] [/P] [/Q] [/S] [/T[[:] timefield]] [/W] [/X] [4]
Chapter 1 adds (39 slides) 22CTEC 110
The VER Command
• Displays the current Windows OS version
VER command syntax:
VER
Chapter 1 adds (39 slides) 23CTEC 110
The CLS Command
• Clears the command prompt screen
CLS command syntax:
CLS
Chapter 1 adds (39 slides) 24CTEC 110
How to End the Work Session
You must always exit Windows properly and completely to avoid damaging the file systems
Type EXIT to terminate a Command Prompt Close any running programs
Logout or Shutdown the Operating System
Chapter 1 adds (39 slides) 25CTEC 110
Type “msconfig” at command prompt
CTEC 110 26Chapter 1 adds (39 slides)
The MSCONFIG Command
Why use MSCONFIG?
• It is used to troubleshoot the Microsoft Windows startup processes.
• Can disable or re-enable software, device drivers and Windows services that run at startup, or change boot parameters.
CTEC 110 27Chapter 1 adds (39 slides)
The CHKDSK Command
• Checks a disk and displays a status report
CHKDSK Command Syntax:
CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]] [/B]
volume Specifies the drive letter (followed by a colon), mount point, or volume name. filename FAT/FAT32 only: Specifies the files to check for fragmentation. /F Fixes errors on the disk. /V On FAT/FAT32: Displays the full path and name of every file on the disk. On NTFS: Displays cleanup messages if any. /R Locates bad sectors and recovers readable information (implies /F).
--snip--
Chapter 1 adds (39 slides) 28CTEC 110
Checking a Disk: FAT and NTFS
CHKDSK used to get information about a disk:
Free space available Bad spots File fragmentation Logical structure problems
29Chapter 1 adds (39 slides) CTEC 110
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
30Chapter 1 adds (39 slides) CTEC 110
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.
31Chapter 1 adds (39 slides) CTEC 110
Checking a Disk: FAT and NTFS
For a FAT disk:Each file has an entry in directory table
FAT points to the next cluster if the file is longer than one cluster
Pointer chains all data together in a fileIf a chain is broken (lost pointer) then it
will end up with the lost clusters
32Chapter 1 adds (39 slides) CTEC 110
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
33Chapter 1 adds (39 slides) CTEC 110
Using CHKDSK to Repair Disk Problems
Why lost clusters occur:
Program not exited properly Power failure or power surges
34Chapter 1 adds (39 slides) CTEC 110
Using CHKDSK to Repair Disk Problems
CHKDSK Examplez:chkdsk /r
CTEC 110 35Chapter 1 adds (39 slides)
For an NTFS disk: CHKDSK looks for orphaned files
Has entry in MFT (Master File Table) - but not listed in any directory
Similar to lost cluster in FAT file system
36Chapter 1 adds (39 slides) CTEC 110
Using CHKDSK to Repair Disk Problems
If lost or orphaned files occur, may not be able to boot back into Windows.
You Cannot use CHKDSK /F to repair disk errors when Windows is running.
37Chapter 1 adds (39 slides) CTEC 110
Using CHKDSK to Repair Disk Problems
With multiple hard drives CHKDSK can run on a hard drive that is not the default drive.
If ran on an active partition you may get a report of erroneous error messages.
38Chapter 1 adds (39 slides) CTEC 110
Using CHKDSK to Repair Disk Problems
/F - repairs logical errors.
/R - locates bad sectors and recovers readable information.
Using /R implies using /F as well
39Chapter 1 adds (39 slides) CTEC 110
Using CHKDSK to Repair Disk Problems
Be careful when running CHKDSK:Back up data filesLarge number of files can take a
long time to repair disk
40Chapter 1 adds (39 slides) CTEC 110
Using CHKDSK to Repair Disk Problems
END of Addition Information
HOMEWORK
Lab 1We will go through the first Activity “A” together.
This will demonstrate how to take a snapshot!
DOS Quiz 1
Chapter 1 adds (39 slides) CTEC 110 41