Linux CLI - Users and Groups
Given the following command:
What will be the output format?
grep '^root:' /etc/passwd | cut -d':' -f1,3,7
What will be the output format?
grep '^root:' /etc/passwd | cut -d':' -f1,3,7
grep '^root:' /etc/passwd finds the line starting with 'root:'. cut -d':' -f1,3,7 extracts fields 1 (username), 3 (UID), and 7 (shell) separated by colons.root:x:0:0:root:/root:/bin/bash. Fields: 1=root, 2=x, 3=0, 4=0, 5=root, 6=/root, 7=/bin/bash.root:0:/bin/bash.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions