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

You work as the Network Administrator for McNeil Inc. The company has a Linux-based network.
You are a root user on the Red Hat operating system. You want to see first five lines of the file
/etc/passwd. Which of the following commands should you use to accomplish the task?

You work as the Network Administrator for McNeil Inc. The company has a Linux-based network.
You are a root user on the Red Hat operating system. You want to see first five lines of the file
/etc/passwd. Which of the following commands should you use to accomplish the task?

A.
head /etc/passwd

B.
head -n 5 /etc/passwd

C.
tail -n 5 /etc/passwd

D.
head 5 -n /etc/passwd

Explanation:

The head -n 5 /etc/passwd command will show the first 5 lines of the file /etc/passwd.



Leave a Reply 0

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