Unix Calls Flashcards

(33 cards)

1
Q

ps -ef

A

Lists running processes
e (every process)
f (full output)

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

fork

A

Creates new process that is clone of the parent process, returns pid of child

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

execve

A

Executes program

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

function > file

A

> is redirection of a command’s output to a file

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

who

A

List of users currently logged on

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

cat

A

Concatenates to single output

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

exit

A

Normal process termination, exits current process

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

kill

A

Kills processes that do not catch the signal

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

init

A

First process started on boot, creates other processes (this is a daemon)

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

grep

A

Prints all lines with the following expression in them

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

thread_create

A

Library procedure that creates new thread

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

thread_exit

A

Library procedure that causes thread to vanish such that it cannot be scheduled

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

thread_wait

A

Library procedure that blocks the calling thread until a specific thread has exited

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

thread_yield

A

Allows thread to voluntarily give up CPU time to another thread (there is no clock interrupt for threads, as there is for processes)

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

select

A

Allows caller to tell if it will read or block

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

access

A

System call to determine if access to file is available

17
Q

nice

A

change priority

18
Q

size

A

find out about size requirement

19
Q

exec

A

throws away current address space, replaces with current program

20
Q

wait

A

wait until child process exits, return PID of child and exit code

21
Q

stat

A

STATS AND SHIT

22
Q

chmod

A

change mode: rwx = 4,2,1
user (u), group (g), other (o), all (a)
eg. chmod u-r file.extension
or chmod a+rx file.extension

24
Q

ln

25
ls -l (ln?)
number between permissions and owner is link count
26
ln -s
j
27
man
files
28
pipe
| creates pipe and returns 2 file descriptors: one for reading and one for writing
29
curl
transfer data to/from server using supported protocol
30
ping
test this
31
trace
test this
32
dig
..
33
traceroute
...