Windows Command Line Tools Flashcards
How do you get the Command Prompt?
Type “cmd” in the search bar
How do you get to the Administrative Command Prompt?
Cntrl + Shift + Enter when searching for “cmd” in windows
What is the Directory Command?
dir
Shows everything in the current user’s local folder
What is an example of a relative path?
cd Users\student01\Documents
Does not require root path
What is an example of an absolute path?
cd C:\Users\Student01\Documents
Requires the full path including root
What is the “cd” command?
It is used to “C”hange “D”irectories forward or backwards
Difference between “.” and “..”?
it changes directories forward or backward within the command prompt
Example:
Current directory is C:\Users\Student01
the command “cd ..” will go to the higher directory and produce the command line:
C:\Users>
cd\
Will take the prompt all the way back to the root:
C:\Users\Student01>cd\
C:>
md or mkdir
make a directory or subdirectory
RD or RMDIR
The RD or RMDIR command deletes an empty directory.
chkdsk
Error Checking Program
chkdsk /r
Locates bad sectors and recovers readable information
(implies /F, when /scan not specified)
chkdsk /f
Fixes errors on the disk
chkdsk /scan
NTFS only: Runs an online scan on the volume
sfc
System File checker
sfc /scannow
scans integrity of all protected system files an repairs files with problems when possible
sfc /verifyonly
scans integrity of all protected system files./ No repair operation is preformed
sfc /scanfile
scans integrity of the reference file, repairs file if problems are identified. Specific full path <file></file>
sfc /verifyfile
Verifies the integrity of the file with full path <file>. No repair operation is preformed</file>
format
File System Formatter
format {driveletter}: /q /fs:NFTS
This command will erase all data on designated drive and formate it as NFTS
format {driveletter}: /FS:filesystem
Specifies the type of file system (FAT, FAT32, exFAT, NTFS, UDF, ReFS)
diskpart
enters disk management command line interface
DISKPART> list disk
Shows a list of all disks in the system
DISKPART> select disk{disk number}
shifts the focus to the desired object
DISKPART> create partition primary
Creates a primary partition within the currently selected disk
DISKPART> list volume {volume number}
shows volumes on disk
copy command
Copies file from one location to another
xcopy
Copy multiple files from one location to another
robocopy
Move multiple files over 14 days old
Copy with bandwidth limitations
copy command switch: /v
verifies that new files are written correctly
copy command switch: /y
suppresses prompting to confirm you want to overwrite an existing destination file
copy command switch: /-y
Causes the prompt TO APPEAR to conform you want to overwrite an existing destination file
copy command switch: source
specifies the file or files to be copied
help [command name]
[command name] /?
Help command
winver
launches a pop-up window containing brief summary of the installed operating system
shutdown
Shutdown command
shutdown /s
shutdown the computer
shutdown /r
Full shutdown and restart the computer
shutdown /a
abort a system shutdown
shutdown /h
hibernate the local computer
shutdown /t xxx
Set the time-out period before shutdown to xxx seconds
shutdown /f
force running applications to close without forewarning users