Powershell commands Flashcards

1
Q

ls

A

list directories

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

get-help ls

A

brief summary of command’s parameters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Get-help ls -Full

A

description of parameters and how to use the command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Ls -force [drive name c:\]

A

show hidden and system files and directories

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

pwd

A

print working directory (shows which directory you’re working in)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

cd

A

change directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

cd ..

A

go back up one level from the directory you are in

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

cd ~

A

moves me back to the home or main directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

mkdir

A

make directory (folder)

to create spaces in a directory name put it in single quotes ‘my cool folder’ or with back tick marks my cool folder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

` - back tick mark

A

escape characters which tell the shell to treat the next item literally

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

history or ctrl+r

A

displays previous commands used and then I can navigate the commands with up and down arrows and then repeat or change the command without typing all of it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

clear

A

clears the output on the screen if its looking a little cluttered

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

cp

A

copy file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

*

A

anything

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

-recurse

A

lists the contents of the directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

-verbose

A

gives more detailed information in a command

17
Q

mv

A

renames files AND

moves files between directories

18
Q

rm

A

removes files and directories

19
Q

rm -force

A

remove system or other restricted files

20
Q

rm -recurse

A

removes folder and contents and other directories inside it

21
Q

cat

short for concatenate

A

gets contents of a file and outputs the contents to the screen

22
Q

more

A

gets the contents of the file (especially a larger one) and displays it to the terminal window until it fills it.

Separate command in powershell and has its own commands

23
Q

enter button

A

advances the content on the screen 1 line at a time after “more” command has been used

24
Q

Space button

A

advances file content by the size of the page after the more command

25
Q

q key

A

quit out of the “more” command and return to powershell

26
Q

cat -head

A

displays the first few lines of a file

27
Q

cat -tail

A

displays the last few lines of a file

28
Q

start notepad++ [filename]

A

opens a file directly in notepad for viewing or editing

29
Q

get -alias

A

displays the alias of a command

For instance:
“get -alias ls” displays actual command name get-childitem

30
Q

get -childitem

A

same as ls

31
Q

/?

A

get help

32
Q

select-string

A

returns the “string” of characters or items listed

can be used with the *

33
Q

-filter

A

select specific file content(s) to search for or display

34
Q

echo

A

alias for write-output

35
Q

write-output

A

Sends the output of a command to the next command for execution. Or displays the output to the screen if it’s the last command to be executed.

36
Q

>

A

re-director operator for standard output

i.e. instead of the screen another location like a file

37
Q

$null

A

redirects unwanted output to the “black hole of nothing”