Which of the following find commands will print out a list of files owned by root and with the SUID bit set in /usr?
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 command to find files owned by root and with the SUID bit set in /usr is 'find /usr -uid 0 -perm +4000'. In this command, '/usr' specifies the directory to search in, '-uid 0' specifies files owned by user ID 0 (which corresponds to the root user), and '-perm +4000' specifies files with the SUID bit set.
correct answer is (not listed in the options): $ find /usr -uid 0 -perm /4000
all answers given are wrong. Tested on ubuntu. ~$ find /usr -uid 0 -perm +4000 find: invalid mode ‘+4000’ ~$ find -user root +mode +s /usr find: paths must precede expression: `+mode' ~$ find -type suid -username root -d /usr find: Must separate multiple arguments to -type using: ',' ~$ find /usr -ls \*s\* -u root find: paths must precede expression: `*s*' ~$ find /usr -suid -perm +4000 find: unknown predicate `-suid'
I tested it also in Ubuntu, Debian, Alma. Same result, no answer is right