Windows CLI mod 5 Flashcards
Is a program that handles the user interface with the OS and is also a command language interpreter capable of running batch files or scripts.
Shell
Is the grammatical rules and patterns that govern the ordered use of appropriate words and symbols necessary for commands to execute.
Syntax
Are parameters to specify command features and options.
Arguments
Modify the operation of a command.
Options
display the most commonly used built-in commands along with a brief functionality description.
help
C:>help
or
C:>\/?
indicate a separation between the command and its associated arguments.
spaces ( ), forward slash ( / ),the hyphen ( -), or the semi-colon ( ; ).
Delimiters
are used to identify optional arguments.
Brackets [ ]
character may be used in two ways:to pass the output of the first command to the second command as input,and to represent “or” for example, [+R | -R] indicates +R “or” -R may be used.
The pipe ( | )
may also be used to denote anything and everything within a specific argument.
Wildcard characters (*)
indicates it is used to display output one screen at a time.
more
present working directory.
working directory
move from one location to another or identify a particular location of a file or directory.
paths
starts at the volume:root and specifies each directory that must be opened to get to the desired file or directory.
absolute path
gives the location of the target file or directory from (relative to)the present working directory. Uses (..)
relative path
Displays the name of or changes the current directory.
cd
Options:
/d Switch current drive
.. Changes to the parent directory
\ Changes to the root directory
Syntax:
cd /d
cd \
variables whose values are generally set by the OS and affect how programs act on a system.
Environmental variables
Displays path statement
C:>path
Adds C:\tools directory to path statement
C:>path=%path%;C:\tools
Specifies a new command prompt.
Options:
Specifies text for command prompt
$P Specifies working directory for command prompt
$G Specifies ‘>’ for command prompt
prompt
Displays a list of files and subdirectories in a directory.
Options: /T: Controls which time field to display C Created A Last Access W Last Written
dir
Syntax:
dir[drive:][path][filename] [/T[[:]timefield]]
Displays a list of files and subdirectories in a directory.
Option: /A: Displays files with a specified attribute D Directory A Archive S System file H Hidden file R Read only
dir
Syntax:
dir[drive:][path][filename] [/A[[:]attribute]]
Displays a list of files and subdirectories in a directory.
Option:
/S Displays files in directories and all subdirectories
dir
Syntax:
[/S] [drive:][path][filename]
Displays or changes file attributes.
Options: \+ or- R Turns on/off read-only attribute \+ or– H Turns on/off hidden attribute \+ or– S Turns on/off system attribute \+ or– A Turns on/off archive attribute
attrib
Syntax:
attrib[+/-options]
Displays or sets the system date.
Options:
/t Does not prompt for date change
date
Displays or sets the system time.
Options:
/t Does not prompt for time change
time
Displays OS version.
ver
Sets the title for the CLI window.
title
Syntax:
title
Quits the CLI window.
exit
Creates a directory.
mkdir
Syntax:
mkdir\
mkdir
mkdir
Removes a directory.
Options:
/s Removes directory and all contents
rmdir
Syntax:
rmdir
rmdir/s
“Copy console” is used to create a simple text file,but is not used to edit an existing file.
copy con
Syntax:
copy con
Create and edit text files.
notepad
Copies one or more files to another location. Can also name the copied file.
copy
Syntax:
copy
copy
Moves and renames files and directories.
move
Syntax:
move
move
Renames a file or directory.
ren
Syntax:
ren
Displays contents of a text file or files.
type
Searches for a text string in a text file or files.
Options:
/n Displays line numbers of lines containing specified text string
/I Ignores case when searching for specified string
find
Syntax:
find /n /I “”
Deletes one or more files.
del
Copies directory trees and files.
Options:
/e Copies directories and subdirectories, including empty ones
xcopy
Syntax:
xcopy [options]
Recalls Windows commands.
Options:
/history Displays all commands entered.
doskey
Redirects standard command output to a file instead of displaying results on the screen. If the file does not exist, it is created. If the file does exist, it is overwritten.
>
Syntax:
C:>>
Appends standard output to the end of another file. If the file does not exist, it is created.
> >
Syntax:
more »_space;
Graphically displays the folder structure of a drive or path.
Options:
/f Displays the names of files in each folder
/a Uses ASCII instead of extended characters
tree
Displays or modifies access control lists (ACLs) for directories and files.
Options:
/e Edits ACL instead of replacing it
/g Grants specified user access (without /e overwrites ACL)
/p Replaces specified user access
Access permissions available: N –None (user permissions only) R –Read W –Write C –Change (read and write) F –Full
cacls
Syntax:
cacls [options]
Manage local policy settings, account and password policies.
Options:
/minpwlen: Set minimum length of password
/maxpwage: Sets maximum days password is valid
net accounts
Displays, modifies, or creates user accounts.
Options:
/add Creates a user account
/delete Deletes a user account
net user
Syntax:
net user /add
net user /delete
Displays, modifies, or creates group accounts.
Options:
/add Creates a group account or adds a user account as a member
/delete Deletes a group account or removes a user account as a member
net localgroup
Identifies a user account to execute a program.
Options:
/user: Identifies user account
runas
Syntax:
runas /user:
Displays a list of processes currently executing.
tasklist
Killsone or more processes.
Options:
/pid Specifies PID of process to be killed
/IM Specifies process by image name
/f Forcefully terminate the process
taskkill
Syntax:
taskkill /pid
taskkill /IM
Commonly used to backup an entire system by selecting an entire volume. All files selected are backed up. Archive attributes are cleared or turned off for files backed up during a full backup.
Pros: Backs up all files and directories.
Cons: Takes a long time since it backs up everything
Full backup
Backs up selected files with the archive attribute. Archive attributes are cleared or turned off for files backed up during an incremental backup.
Pros: Backup times are quicker.Only backs up files and directories that are new or changed since the last full or incremental backup.
Cons: System Restore is more difficult and time consuming as it requires every incremental backup tape or media set.
incremental backup
Backs up selected files with the archive attribute. Archive attributes remain on for files backed up during a differential backup.
Pros: System Restore requires only the most recent full and differential tapes or media sets.
Cons: Backup times become progressively longer over time.
differential backup
Contains audit events that may affect the security of the system, user activities such as logon/logoff, and resource access attempts.
Security Log
Contains events logged by non-OS and third-party applications.
Application Log
Contains actions that occur during Windows setup
Setup Log
Contains events logged by OS components.
System Log