Week 5 - The UNIX Shell Flashcards
What is a shell?
a program that runs operating system commands
What happens when you open the shell?
a user-level process is started
How does the shell create a child process?
by calling fork
what does the child process invoke?
the loader, via execve
What 3 open files does each process begin with?
standard input, output and error
STDIN_FILENO = ?
0
STDOUT_FILENO = ?
1
STDERR_FILENO = ?
2
Whats the chmod command format?
chmod [who] operator [permissions] filename
how do you check the value of a single variable?
echo $VARNAME
how do you set the value of a variable?
export VARNAME=x
what does * mean in pattern matching?
matches any string (including null)
what does ? mean in pattern matching?
matches any one character
what does […] mean in pattern matching?
matches any characters enclosed in the brackets
what does [!…] mean in pattern matching?
matches any characters other than the ones in the brackets