PrepAway - Latest Free Exam Questions & Answers

What command will print a list of usernames (first column) and their corresponding user id (uid, third column)

What command will print a list of usernames (first column) and their corresponding user id (uid, third column) from /etc/passwd?

PrepAway - Latest Free Exam Questions & Answers

A.
chop -c 1,3 /etc/passwd

B.
fmt -u /etc/passwd

C.
tac 1-3/etc/passwd

D.
cut -d: -f 1,3 /etc/passwd

Explanation:
Cut command helps to display certain fields value from file. In cut commanD.d option is used to specify the filed delimiter anD.f specify the filed number.


Leave a Reply