Which of the following commands prints all files and directories within the /tmp directory or its subdirectories which are also owned by the user root? (Choose
TWO correct answers.)
Which of the following commands prints all files and directories within the /tmp directory or its subdirectories which are also owned by the user root? (Choose
TWO correct answers.)
To print all files and directories within the /tmp directory or its subdirectories that are owned by the user 'root', the correct commands are 'find /tmp -user root -print' and 'find /tmp -user root'. The '-user root' option in both commands ensures that only files and directories owned by the 'root' user are found. The '-print' option in 'find /tmp -user root -print' explicitly displays the paths, while 'find /tmp -user root' also lists them by default.
The correct answers are A and D. A. find /tmp -uid root -print: This command searches for files and directories within the /tmp directory or its subdirectories that are owned by the user with the username root and prints their paths. D. find /tmp -user root: This command searches for files and directories within the /tmp directory or its subdirectories that are owned by the user with the username root. These commands use the find command with different options to search for files based on user ownership. The -uid option in option A and the -user option in option D both specify the user to match for ownership, which is root in this case. The -print option in option A explicitly prints the path of each matching file, while option D will print the paths by default.
Sorry C and D