nerdexam
Linux_Foundation

LFCS · Question #84

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

The correct answer is A. find /usr -uid 0 -perm +4000. The command find /usr -uid 0 -perm +4000 correctly identifies files in /usr that are owned by the root user and have the SUID bit set.

Submitted by carter_n· Apr 18, 2026Essential Commands

Question

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

Options

  • Afind /usr -uid 0 -perm +4000
  • Bfind -user root +mode +s /usr
  • Cfind -type suid -username root -d /usr
  • Dfind /usr -ls *s* -u root
  • Efind /usr -suid -perm +4000

How the community answered

(63 responses)
  • A
    76% (48)
  • B
    2% (1)
  • C
    3% (2)
  • D
    11% (7)
  • E
    8% (5)

Why each option

The command `find /usr -uid 0 -perm +4000` correctly identifies files in `/usr` that are owned by the root user and have the SUID bit set.

Afind /usr -uid 0 -perm +4000Correct

The `find` command searches for files based on specified criteria. `-uid 0` specifically targets files owned by the user with UID 0, which is typically the `root` user. The `-perm +4000` option searches for files where at least the SUID (Set User ID) bit is set, as 4000 represents the SUID permission.

Bfind -user root +mode +s /usr

`-user root` is correct, but `+mode +s` is not a standard `find` predicate for SUID, and the order of arguments is incorrect.

Cfind -type suid -username root -d /usr

`-type suid` is not a valid `find` predicate for the SUID bit, and `-username root` and `-d /usr` are not standard or correctly formatted.

Dfind /usr -ls \*s\* -u root

`-ls *s*` is incorrect syntax for checking the SUID bit, and `-u root` is not a standard `find` predicate for user ownership.

Efind /usr -suid -perm +4000

While `-perm +4000` is correct for SUID, `-suid` is not a standard `find` predicate; the correct way to specify user ownership is with `-user` or `-uid`.

Concept tested: Linux `find` command with permissions and ownership

Source: https://man7.org/linux/man-pages/man1/find.1.html

Topics

#find command#file permissions#SUID bit#user ownership

Community Discussion

No community discussion yet for this question.

Full LFCS Practice