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 command 'find /tmp -user root -print' will search for files and directories owned by the user root and print the results, while 'find /tmp -user root' will search for files and directories owned by the user root and by default will print the results since print is the default action if no other action is specified.
The two correct commands for printing all files and directories within the /tmp directory or its subdirectories that are owned by the user root are: A. `find /tmp -uid root -print` C. `find /tmp -user root -print` These commands use the `find` command to search within the /tmp directory and its subdirectories for files and directories with the owner (user) set to root and then print the results. Command D is also correct: D. find /tmp -user root This command uses the -user option to search for files and directories owned by the user root within the /tmp directory and its subdirectories. It doesn't explicitly use the -print option, but the default action of find is to print the matching results, so it will display the files and directories owned by root.