Command Line Flashcards

1
Q

What is a CLI?

A

Command Line Interfaces

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

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

-man

A

man: is an interface to the system reference manuals.

man cat

will show you the name, synopsis and description of that said command.

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.

-cat

A

cat: concatenate files and print on the standard output.
man

cat file1.txt file2.txt file3.txt > newfile.txt

newfile.txt will contain all the contents from file1, file2, and file3.

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.

-ls

A

ls: list information about the FILEs (the current directory by default). .Sort entries alphabetically if none of

ls -a folder1

will show all the contents (including all files with the ‘.’)

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.

-pwd

A

pwd: print the full filename of the current working directory
pwd: will show you how to get to the location that you are currently.

home/dev/repos/c0-solutions/command-line-basics

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.

-echo

A

Echo the STRING(s) to standard output

echo will create text within the command line
echo ‘Hello, World!’ > hello.txt

this will save the ‘Hello, World!’ text into a new file called hello.txt

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.

-touch

A

Update teh access and modifcation times of each FILE to the current time. A FILE argument that does not exist is created empty, unless -c or -h is supplied.

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.

-mkdir

A

Create the DIRECTORY(ies), if they do not already exist.

mkdir parents

will create a new directory called ‘parents’

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.

-mv

A

Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY

if you want to move certain files to a new directory, if the new directory DOES NOT EXIST, it will rename the selected directory

mv pokiemans pokemon

will rename the pokiemans dir to pokemon

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

Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY

if you want to move certain files to a new directory, if the new directory DOES NOT EXIST, it will rename the selected directory

mv pokiemans pokemon

will rename the pokiemans dir to pokemon

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

remove files or directories. (removes cannot be undone WITHOUT Git)

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

copy files and directories

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

-top

A

display Linux processes (it acts like a task manager)

top program provides a dynamic real-time view of a running system. It can display system summary informration as well as a list of processes or threads currently being managed by the Linux kernal.

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