What is the quickest way to create a file that lists all the groups to which the user 'bob' belongs?

What is the quickest way to create a file that lists all the groups to which the user 'bob' belongs?









A. whereis bob >> bob_groups.txt
B. grep bob /etc/group > bob_groups.txt
C. find /etc/passwd bob >> /var/tmp/bob_groups.txt
D. cd /etc; cat groups | grep bob | vi > bob_groups.txt








Answer: B


Learn More :

CompTIA

Learn More Multiple Choice Question :