QuestionQ100

Essential Commands

Which of the following find commands will print a list of files in /usr that are owned by root and have the SUID bit set?

  • A find /usr -uid 0 -perm +4000
  • B find -user root +mode +s /usr
  • C find -type suid -username root -d /usr
  • D find /usr -ls *s* -u root
  • E find /usr -suid -perm +4000
Explanation

-uid 0 selects files owned by the root user, and permission bit 4000 is the set-user-ID (SUID) bit. find /usr -uid 0 -perm +4000 searches /usr and matches files satisfying both conditions.

Community Discussion

No comments yet. Be the first to start the discussion!