Command Line Tools Flashcards

1
Q

What is a CLI?

A

Command Line Interface

process commands to a computer program in the form of lines of text

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

What is a GUI?

A

Graphical user Interface

allows users to interact with electronic devices through graphical icons and audito indicator such as primary notation

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

Give at least one use case for each of the commands listed:

man

A
  • allows you to get manual for each command line tool
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what are the three virtues of a great programmer?

A

impatience
laziness
hubris

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

What is npm?

A

website, command line interface, or package registry
package manager
a software registry that developers use to share software and manage private development

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

What is a package?

A

a directory with one or more files described by a package.json file

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

How can you create a package.json with npm?

A

navigate to the root directory of your package
run the command npm init –yes to create default package.json
answer the questions in the command line questionnaire

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

What is a dependency and how do you add one to a package?

A
dependency is a non-user-visible package that contains binaries, shared libraries or python modules
npm install( npm i)
install dependency within the package directory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What happens when you add a dependency to a package with npm?

A

install the dependencies in the local node_modules folder

by default npm install will install all modules listed as dependencies in package.json

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

Give at least one use case for each of the commands listed:

cat

A

concatenate files and print on the standard output

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

Give at least one use case for each of the commands listed:

ls

A
  • list directory contents

- a do not ignore entries starting with .

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

Give at least one use case for each of the commands listed:

pwd

A
  • print name of current/working directory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Give at least one use case for each of the commands listed:

echo

A
  • display a line of text
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Give at least one use case for each of the commands listed:

touch

A
  • change file timestamps
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Give at least one use case for each of the commands listed:

mkdir

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

Give at least one use case for each of the commands listed:

mv

A
  • move or rename files
17
Q

Give at least one use case for each of the commands listed:

rm

A
  • remove files or directories
18
Q

Give at least one use case for each of the commands listed:

cp

A
  • copy files and directories