Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

QUESTION 11 What is the difference between > and >> a.> connects the output from

ID: 3851125 • Letter: Q

Question

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

> 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"?

crd homework

mkdir homework

mkdir Homework

cd homework

QUESTION 13

Which of the following commands uses sort as a filter?

ls > sort > tail

cat /etc/passwd | sort | head

ps ax | wc > sort

sort /etc/passwd | more

QUESTION 14

Which command is used to search the contents of a file for lines that contain a particular pattern?

ls

grep

wc

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)?

locate -i land US-Towns

grep -v land US-Towns

grep -i land US-Towns

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?

ls ax

ps ax

ps

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?

Delete-Enter

X

Ctrl-c

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?

cc big-program.c &

%1 cc big-program.c

top cc big-program.c

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.

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.

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.

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?

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.

top will also display programs that are running on remote systems, while ps only displays local program.

ps is able to display information for all users, while top is only for your own programs.

you must be root to run top, while anyone can run ps.

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

Explanation / Answer

Question 11 : c

Question 12 : b

Question 13 : b

Question 14 : b

Question 15 : b

Question 16 : b

Question 17 : c

Question 18 : a

Question 19 : d

Question 20 : a

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote