Use Command-line Tools Flashcards
Lesson 11C
command prompt admin
Navigating directories with the cd command
diskpart program showing a hard disk partition structure.
System File Checker utility.
command shell
cmd.exe
processes the legacy command set that has been part of Windows since its earliest versions.
Run as administrator
command prompt with elevated privileges
Right-click the command prompt shortcut/select Run as administrator/confirm UAC
Command Syntax
refers to the specific structure and rules that dictate how commands are written and executed to perform tasks.
rudimentary help system
If you enter help Command, the help system lists the syntax and switches used for the
command
command syntax
/ ? switch
can also display help on a particular command by using the
command syntax
directory path
The string before > in the command prompt shows the working
dir command
To list the files and subdirectories from either the working drive and directory or from a specified path.
wildcard character
a placeholder that represents one or more unknown characters, enabling flexible pattern matching in searches or queries.
Example: c?t would find “cat”, “cot”, but not “cart”.
cd command
is used to set the focus to a different working directory.
Ex. cd C:\Users\David
dir
- parent directory
- root directory
Changing the Current Drive
just enter the drive letter followed by a colon and press ENTER.
ex. D: changes to the D drive. The prompt will change to D:> indicating that the default
drive is now drive D.
move command and copy command
Both commands use a three-part syntax: command Source Destination.
Where ability to transfer files
contained in a single directory.
xcopy command
is a utility that allows you to copy the contents of more than one directory at a time and retain the directory structure.
as follows: xcopy Source [Destination] [Switches]
md command
To create a directory
ex. md A:\Data\Docs
Removing a Directory
diskpart
is the command interface underlying the Disk Management tool
disk management
diskpart basics
Run the* diskpart* utility, and then enter select disk 0 at the prompt or any partition number you want to check
or
* detail disk- details
* select partition 0 or select volume 0-
* detail partition or detail volume
* exit - to exit* diskpart*
format command
writes a new file system to a drive. This process deletes any data existing on the drive.
chkdsk
scans the file system and/or disk sectors for faults and can attempt to repair any problems detected.
System Management Commands
shutdown command
can be used to safely halt the system or log out
* shutdown /s
* shutdown /a - abort
* shutdown /h- hibernate
* shutdown /l - log off
* shutdown /r- restart
System File Checker utility (sfc)
provides a manual interface for verifying system files and restoring them from
cache if they are found to be corrupt or damaged
System File Checker utility (sfc)
basics:
- sfc /scannow- scans immediately
- sfc /scanonce -scan at restart
- sfc /scanboot- scans each time pc boots
winver command
reports version information