Command Line Basics Flashcards

1
Q

What is a CLI?

A

Command-line interface - processes 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 devices through graphics instead of text-based

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

What are the three virtues of a great programmer?

A

laziness, impatience, and hubris

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

Give at least one use case for each of the commands listed in this exercise.

man

A

man is an interface to the on-line reference manuals

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

Give at least one use case for each of the commands listed in this exercise.

cat

A

cat - concatenate files and print on the standard output

when you want to concatenate files and print/read the content(s) in the file

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

Give at least one use case for each of the commands listed in this exercise.

ls

A

ls - list directory contents

when you want to see the list of contents in a certain directory

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

Give at least one use case for each of the commands listed in this exercise.

pwd

A

when you want to print the name of current/working directory

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

Give at least one use case for each of the commands listed in this exercise.

echo

A

when you want to display a line of text and maybe write it to a new file

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

Give at least one use case for each of the commands listed in this exercise.

touch

A

when you want to change the file timestamp; update the access and modification times of each file to current time

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 in this exercise.

mkdir

A

when you want to make directories

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 in this exercise.

mv

A

when you want to rename/move files

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 in this exercise.

rm

A

when you want to remove files/directories

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 in this exercise.

cp

A

when you want to copy files and directories

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

How to check if postgresql is running.

A

sudo service postgresql status

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

How to start the GUI tool for PostgreSQL

A

pgweb

http://localhost:8081

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