module 1, day 3: windows make directories in gui and cli) through windows moving a renaming files, directories Flashcards

1
Q

How to make a new directory (folder) in the GUI Windows?

A

right click, new, folder

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

making a folder in the CLI Windows?

A

mkdir (name)

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

making a folder that you want to have spaces instead of underscores with the cli, but just adding spaces between the letters rather than specifying that you are not adding a parameter, will lead to what error? PowerShell

A

“a positional parameter cannot be found that accepts argument” The system will read the words as parameters.

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

How do you specify that a folder name with spaces is one single thing? PowerShell

A

Surround the name with quotes,
mkdir ‘my cool folder’
Use back ticks, escaping characters,
mkdir my cool folder`, with the backticks telling the shell the space after the back tick is part of our filename.

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

what do escape characters mean?

A

the next character after the back tick, or other relevant escape character, should be treated literally

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

what command is used to make a new directory in Bash?

A

mkdir

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

how do you escape characters in Bash?

A

\

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

how can you encompass a file name you want to put spaces in in Bash?

A

quotes around the file name

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

what happens when you enter a command in PowerShell?

A

it gets saved in memory and added to a file.

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

Where are past recently used commands in PowerShell stored?

A

history

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

What does the simple use of history do in PowerShell?

A

displays a list of commands you entered earlier

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

How do you scroll through commands you see with history? PowerShell

A

up or down keys on the keyboard

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

what does using up and down keys on the PowerShell do?

A

rotates through the last commands used, which makes it easier to repeat commands and make small modifications to them.

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

What is ctrl-r in PowerShell?

A

the history shortcut. it’ll bring you down to another line, and then you can search for commands in history and it will show you matches. typing enter will input the command.

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

what is an alternate command to ctrl r in powershell’s older versions/

A

hash, followed by some part of your previous command, and then use tab completion to cycle through items in history.

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

How do you use the clear command in PowerShell?

A

to clear the output on your screen, input into the command line.

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

what is the history command in linux?

A

history

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

What can I use on the command line to cycle through previous commands in linux?

A

up and down arrow keys

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

what searches history in linux, alternative to history command?

A

ctrl r

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

what is the linux clear command?

A

clear

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

How to copy files and directories in Windows Gui?

A

right click the folder, copy, paste.

22
Q

hotkeys to copy a folder in windows gui

A

ctrl-c and ctrl-v

23
Q

define hotkey

A

a keyboard shortcut that does some kind of task

24
Q

Powershell command for copy.

A

cp. Also need to add the file you need to copy and the path you want to copy it to.

25
Q

What can help you copy multiple files at once? powrshell

A

wildcard

26
Q

What is a character used to help select files based on a certain pattern?

A

Wildcard

27
Q

how to get all jpegs and copy somewhere

A

go into the right directory, cp *.jpg, and then the path you want to copy the files to.

28
Q

how to use the wildcard? What symbol? means all in powershell, for selecting directories.

A

*

29
Q

what are you telling PowerShell when you put
cp *.jpg?

A

to copy all .jpg files

30
Q

how to copy a folder to Desktop? Doesn’t copy the contents of the folder, just the folder.

A

go to the right directory,
cp ‘name of directory’ and list the file path you want it sent in.
ex:
cp ‘bird pictures’ ~\Desktop

31
Q

what command parameter do you need to use to copy the contents of a directory as well as the directory itself?

A

-Recurse

32
Q

What command parameter lists the contents of the directory?

A

Recurse

33
Q

what is another word for recurse?

A

repeat

34
Q

What happens if you recurse a directory?

A

it’ll list the contents, and if there are any subdirectories in the listing, it’ll recurse, repeating the directory listing process for each of those subdirectories.

35
Q

What do you use with copy to copy the contents of a directory?

A

-Recurse parameter, with cp

36
Q

What parameter, with cp in powershell, makes it so that copy doesn’t output anything to the CLI by default unless there are errors?

A

-Verbose

37
Q

What happens in powershell when you use copy -Verbose?

A

it’ll output one line for each file of the directory being copied.

38
Q

how to copy the file ‘bird pictures’ and its contents? to the desktop using PowerShell

A

cp ‘bird pictures’ ~\Desktop -Recurse -Verbose

39
Q

how do you copy files in bash?

A

cp filename ~path

40
Q

how to copy multiple files of the same type? Bash .png files, for example, to the desktop

A

cp *.png ~/Desktop

41
Q

how to recursively copy a directory in Bash?

A

-r is the flag

42
Q

how to copy cat pictures folder to a desktop

A

cp -r ‘cat pictures’ ~/Desktop

43
Q

how to rename file in gui windows?

A

double click, rename

44
Q

how to rename file PowrShell

A

mv command

45
Q

what does mv stand for?

A

move item

46
Q

how to move a file Windows PowrShell, without changing directory it is in
change blue_document.txt to yellow_document.txt

A

mv blue_document.txt yellow_document.txt
when you type it in, with tab completion, it’ll automatically add the .\ at the front, to signify that you are working in the current directory.
this is optional.
bare minimum:
mv blue_document.txt yellow_document.txt

47
Q

what command lets us move files from one directory to another PowerShell?

A

mv

48
Q

how to mv a document? move yellow_document.txt, which is currently in the directory we are in, from Desktop to the Documents directory

A

mv .\yellow_document.txt ~\Documents

49
Q

you can move multiple files using what?

A

wildcards

50
Q

how do you move multiple files using wildcards with the mv command? move all document.txt files.

A

mv *_document.txt ~\Documents

51
Q

with the cp command, where do you put the -r flag if you are copying a file?

A

it goes after cp. It’s the second thing. Then you get the ‘directoryname’ and then you get ‘location name’