Text filters · Question 6 of 12

Which command prints only the first field of /etc/passwd, that is, the user names?

1 answer is correct. Easy Created with AI

Show answer

Answer

  • C cut -d: -f1 /etc/passwd

Explanation

-d sets the delimiter, -f the field number. cut -c1 would only cut out the first character of each line.

Certifications & exams

Which exam comes next?

You can already practise for 51 exams, and 16 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications