Question
QUESTION 11 What is the difference between > and >> a.> connects the output from one command to the input of another command >> only
QUESTION 11
What is the difference between > and >>
a.> connects the output from one command to the input of another command >> only sends the standard error from one command to another command | ||
b. | > and >> are both very similar, but >> is how you automatically redirect standard output to both the sceen and a file at the same time | |
c.> redirects the output to a file, and creates a new file. It will overwrite the contents of the file if it already existis. >> will append the output to a file, and won't wipe out any existing content. | ||
d.> redirects standard input >> redirects standard output |
QUESTION 12
You want to create a directory to store all your homework files. What command would you type to create a directory named "homework"?
a. | crd homework | |
b. | mkdir homework | |
c. | mkdir Homework | |
d. | cd homework |
QUESTION 13
Which of the following commands uses sort as a filter?
a. | ls > sort > tail | |
b. | cat /etc/passwd | sort | head | |
c. | ps ax | wc > sort | |
d. | sort /etc/passwd | more |
QUESTION 14
Which command is used to search the contents of a file for lines that contain a particular pattern?
a. | ls | |
b. | grep | |
c. | wc | |
d. | tee |
QUESTION 15
You have a text file in your home directory named "US-Towns" which contains a list of town names one per row. You are trying to find any lines in the file that do not contain the word "land" in any of those names.
What command would you type to search that file for lines that do NOT contain "land" (inverse-match search)?
a. | locate -i land US-Towns | |
b. | grep -v land US-Towns | |
c. | grep -i land US-Towns | |
d. | grep land US-Towns |
QUESTION 16
Which command would display a list of all running processes on the computer, including those of other users and those that don't have a controlling terminal?
a. | ls ax | |
b. | ps ax | |
c. | ps | |
d. | more ps ax |
QUESTION 17
What key or keys can you press to interrupt (politely ask to terminate) a program that is running in your terminal?
a. | Delete-Enter | |
b. | X | |
c. | Ctrl-c | |
d. | ESC |
QUESTION 18
Some programs take a long time to finish when run, so you would like to run the command in the background so you can continue to work in your terminal until it finishes.
For example, if you are using the "cc" compiler to compile a very complex program that might take an hour to finish compiling, the command might be "cc big-program.c"
How would you run that program and have it run in the background?
a. | cc big-program.c & | |
b. | %1 cc big-program.c | |
c. | top cc big-program.c | |
d. | cc big-program.c ! |
QUESTION 19
There are process ID numbers, and job numbers. How are they different?
a.Both are actually the same, and a job's number exactly matches the process ID number of that job. | ||
b. | Process numbers always start at 100, while job numbers start at 1. This is because users are more likely to type job numbers and they wanted them to be shorter. | |
c. | Process ID numbers must be unique on a system. Job number are specific to the user. So there can only be one process ID number of 57 on a system, but each user could have a job number of 2. | |
d. | Job numbers are never re-used between reboots, while process ID numbers can be re-used once a program terminates. |
QUESTION 20
What is one significant difference between top and ps?
a. | ps only lists a quick snapshot of processes at the time the command was run, while top runs continuosly and displays a contantly updating list. | |
b. | top will also display programs that are running on remote systems, while ps only displays local program. | |
c. | ps is able to display information for all users, while top is only for your own programs. | |
d. | you must be root to run top, while anyone can run ps. |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started