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.)
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.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Strib
6 months, 3 weeks agoStrib
6 months, 3 weeks ago