Command Line Commands Flashcards

1
Q

pwd

A

print working directory

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

hostname

A

my computer’s network name

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

mkdir

A

make directory

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

cd

A

change directory

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

ls

A

list directory

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

rmdir

A

remove directory

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

pushd

A

push directory; saves your current location and pushes you temporarily to a different directory

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

popd

A

pop directory; takes you back to the last directory you pushed

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

cp

A

copy a file or directory

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

robocopy

A

robust copy

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

mv

A

move a file or directory; also used to rename a file or directory
mv file1.txt directory/ moves the file
mv file1 file2 changes the file name
mv directroy1 directroy2 changes the directory name

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

more

A

page through a file; type q to exit the view mode

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

type

A

print the whole file

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

forfiles

A

run a command on lots of files

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

dir -r

A

find files

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

select-string

A

find things inside files

17
Q

help

A

read a manual page

18
Q

helpctr

A

find what man page is appropriate

19
Q

echo

A

print some arguments

20
Q

set

A

export/set a new environment variable

21
Q

exit

A

exit the shell

22
Q

runas

A

Danger! become super user root Danger!

23
Q

attrib

A

change permission modifiers

24
Q

iCALCS

A

change ownership

25
Q

cd ../../..

A

change directory back towards root folder

26
Q

mkdir -p

A

makes the entire path of a directory

27
Q

new-item filename -type file/directory

A

creates a new file/directory

28
Q

cp file1.txt file2.txt

A

copies file1, including contents, and names it as file2

29
Q

cp file1 directory/

A

copies file1 into the specified directory

30
Q

cp -recurse directory1 directory2

A

copies directory1 and contents to directory2 with the name specified

31
Q

cat file.txt

A

streams the contents of the file

32
Q

rm file1.txt

A

removes the file;
can also use rm file1.txt, file2.txt, file3.txt
also rm directory/file1.txt

33
Q

rm -r directory

A

removes the directory and all contents without prompt

34
Q

|

A

takes the output from the command on the left and pipes it to the command on the right

35
Q

>

A

takes the output of the command on the left and writes it to the file on the right;
This will erase all other content and replace it with the output

36
Q

> >

A

takes the output of the command on the left and appends it to the file on the right;
this will add the output to the file’s current text

37
Q

*

A

use the * symbol as a wildcard;

e.g., ls *.txt

38
Q

dir -r

A

lists all items in the directory and all those under it

39
Q

dir -r -filter “*.txt”

A

the filter command allows you to filter for specific file types