41
Getting Started Additional information

Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

Embed Size (px)

Citation preview

Page 1: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

Getting Started

Additional information

Page 2: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 3: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

Command Line Interfaces

• DOS Prompt (No Longer Available)

• Command Prompt

• PowerShell

CTEC 110 3Chapter 1 adds (39 slides)

Page 4: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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)

Page 5: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 6: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

Overview of Files and Disks Figure Disks and Files

Chapter 1 adds (39 slides) 6CTEC 110

Page 7: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

Introduction to Subdirectories—The Path

7Chapter 1 adds (39 slides) CTEC 110

Page 8: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 9: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 10: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 11: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

CTEC 110 11Chapter 1 adds (39 slides)

Introduction to Subdirectories—The Path

Page 12: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 13: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 14: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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)

Page 15: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

What Are Parameters?

Information to modify or qualify a command

Parameters can be: • Variable (%choice%)• Fixed (“constant”)

15Chapter 1 adds (39 slides) CTEC 110

Page 16: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 17: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

17Chapter 1 adds (39 slides) CTEC 110

Command Line Editing

Page 18: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

Chapter 1 adds (39 slides) CTEC 110 18

Command Line Editing

Page 19: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

Chapter 1 adds (39 slides) CTEC 110 19

Command Line Editing

Page 20: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 21: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 22: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 23: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

The VER Command

• Displays the current Windows OS version

VER command syntax:

VER

Chapter 1 adds (39 slides) 23CTEC 110

Page 24: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

The CLS Command

• Clears the command prompt screen

CLS command syntax:

CLS

Chapter 1 adds (39 slides) 24CTEC 110

Page 25: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 26: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

Type “msconfig” at command prompt

CTEC 110 26Chapter 1 adds (39 slides)

The MSCONFIG Command

Page 27: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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)

Page 28: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 29: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 30: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 31: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 32: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 33: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 34: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 35: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

CHKDSK Examplez:chkdsk /r

CTEC 110 35Chapter 1 adds (39 slides)

Page 36: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 37: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 38: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 39: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

/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

Page 40: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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

Page 41: Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt

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