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

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

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

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

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

C.
tac 1-3/etc/passwd

D.
fmt -u /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 0

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