Which of the following commands can you use to accomplish the task?

You want to check whether the cc process is running on a computer. Which of the following
commands can you use to accomplish the task? Each correct answer represents a complete
solution.
Choose all that apply.

You want to check whether the cc process is running on a computer. Which of the following
commands can you use to accomplish the task? Each correct answer represents a complete
solution.
Choose all that apply.

A.
ps -aux | more

B.
tail -f

C.
ps -aux | grep cc

D.
ps -aux

Explanation:

You can view all running processes with the help of the ps -aux command. Hence, any of the ps
–aux commands (i.e., ps -aux | grep cc, ps -aux
| more, or ps -aux) can be used to check whether the cc process is running on the computer.
Answer option B is incorrect. The tail command is used to display the last few lines of a text file or

piped data. It has a special command line option -f (follow) that allows a file to be monitored.
Instead of displaying the last few lines and exiting, tail displays the lines and then monitors the file.
As new lines are added to the file by another process, tail updates the display. This is particularly
useful for monitoring log files. The following command will display the last 10 lines of messages
and append new lines to the display as new lines are added to messages: tail -f
/var/adm/messages



Leave a Reply 0

Your email address will not be published. Required fields are marked *