Command line Flashcards

1
Q

What is a CLI?

A

The command line interface is for the user, or me.

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

What is a GUI?

A

Graphic User Interface manipulated with buttons, interfaces for the user.

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

man
cat

A

Manual for the commands in the CLI.
Cat displays the content of a chosen file in your terminal. But it is used for joining and combining files.

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

ls
pwd

A

ls allows you to see the files in your current directory
pwd prints the current directory you are in

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

echo
touch

A

Repeats a string within the terminal but is used to add typed characters within a created fines.
Touch changes the timestamp meaning that if it does not exist it creates an empty file.

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

mkdir
mv

A

mkdir makes directories (for making subfolders)
mv moves or rename files in directories (moving files or copying to a different directory)

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

rm
cp

A

rm removes a chosen directory or file (-r and -f but -i for interactive)
cp copies the file into the same directory if not specified.

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

What is Node.js?

A

An asynchronous event-driven javascript runtime, outside of the browser

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

What can node.js be used for?

A

It can run utilities and other programs in the backend as it does not require the browser. Write web, application, desktop programs, mobile apps, any general progr1am that allows you to use node run time but embedded programming does not have enough power.

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

What is a REPL?

A

Read Evaluate Print Loop.
Its a system acronym waiting for you to type command and it processes and waits for new command.
Read received program, evaluate, it prints it, then loops waiting for the next command.

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

What is a computer process?

A

Set of process run by the computer. An environment to which your program runs CPU memory, and multiple processes running like application which may be an even smaller processes. envirnment of code.

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

Why should a full stack web dev know that computer processes exist

A

Too many processes will crash the pc, knowing which are running (dev server, database), so you can kill them.

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

What is a process object in a node.js program?

A

Process object is a global object injected during runtime

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

How do you access the process object in a Node.js program

A

It is accessed by simply inputing process

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

What is the data type of process.argv in node.js

A

It is an array of strings

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

What is a javascript module?

A

It is essentially a file that can be accessed either by the main file or other modules to be used through export.

16
Q

Give two examples of truly global variables in a Node.js program.

A

required, __dirname, __filename, exports, module.

17
Q

What values are passed into a Node.js module’s local scope?

A

required, __dirname, __filename, exports, module.

18
Q

What is the purpose of module.exports in a Node.js module?

A

It acts like the return statement of the file referenced by the require statement. You export the function from the different files.

18
Q

How do you import functionality into a Node.js module from another Node.js module?

A

utilizing the required function from the modules’ module.exports.

19
Q

what is the event loop?

A

Mechanism for asynchronous code. The event loop is code that the system manages execution. It has takes off queue and executes, takes off queue and executes.

20
Q

what is a directory

A
21
Q

what is a relative file path

A
22
Q

what is an absolute file path

A