Intro 5 Flashcards

1
Q

What is the syntax for running a command in the background?

A

gunzip file.gz &

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

What problems can arrise from sending a process to the background?

A

They may expect to work with the standard input or read directly from the terminal, or they might write something to standard output or standard error, which will appear in the terminal window.

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

What is the best way to avoid errors when sending a process to the background?

A

Redirect its output and input using > and

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

Command for redrawing the terminal screen.

A

Ctrl-L

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

What are the four modes and permissions listed in a normal ls -l view of files and folders?

A

Type
User Permissions
Group Permissions
Other Permissoins

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

What does a single dash in the file type position indicate?

A

It is a regular file.

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

What does a d in the file type position indicate.

A

It is a directory.

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

r

A

readable

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

w

A

writable

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

x

A

executable

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

-

A

nothing

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

How do you see what groups you are in?

A

the groups command

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

The third set of permissions, the other permissions, are sometimes called ________.

A

world permissions

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

Each read, write, and execute permission slot is sometimes called a _______. Therefore, you might hear people refer to parts of the permissions as “the _______.”

A

permission bit

read bits

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

What does it mean if an executable file has an s in the permissions slot instead of an x?

A

This inidcates that the executable is setuid, meaning that when you execute the program, it runs as though the file owner is the user instead of you.

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

Why would a program need to run as setuid?

A

Many programs use this setuid bit to run as root in order to get the privileges they need to change system files.

17
Q

To change permissions, use the ____ command.

A

chmod

18
Q

To change permissions, pick the set of permissions that you want to change, and then _______.

A

pick the bit to change.

19
Q

What are some example commands for changing permissions?

A

To add group adn world read permissions to file, you could run these two commands:
chmod g+r file
chmod o+r file (o for other)
or chmod go+r file

20
Q

How would you remove read permissions for group and others?

A

chmod go-r file

21
Q

An _____ sets all permission bits at once.

A

absolute change