Intro 4 Flashcards
How can you search the man pages by keyword?
man -k keyword
What flag can you use if you are just searching for a certain option for a command?
Try entering the command name followed by –help or -h.
What’s an alternative to man pages?
info
To send the output of a command to a file instead of the terminal, use the ______ character.
> redirection
When you use the redirection character (>) followed by a filename that does not exist, what happens? What if it does exists?
It creates the file. If the file exists, it clobbers (erases) the files content.
How can you append the output of a command to a file instead of overwriting it?
command»_space; file
How can you redirect standard error (stderr)?
By redirecting stream id 2, e.g. 2>
You can also send it to the same place as stdout with the >& notation, e.g. ls /fffff > f 2>&1
What are the three parts of a UNIX error message?
program name
filename
the error
What do you expect when you see “segmentation fault”?
A segmentation fault essentially means that the person who wrote the progrma that you just ran screwed up somewhere. The program tried to access a part of memory that it was not allowed to touch, and the operating system killed it.
What does a bus error mean?
The program tried to access some memory in a particular way that it shouldn’t.
ps x
show all of the running processes
ps ax
show all processes on the system, not just the ones you own
ps u
include more detailed information on processes
ps w
show full command names, not just what fits on one line
Using ctrl-c to terminate a process that is running in the current terminal is the same as using ____________ with the _____.
kill to end the process
INT (interrupt) signal