Red Hat Certified System Administrator RHCSA · Free Practice Question Hard

Question 9

Using Red Hat Enterprise Linux 9, write a command to search for all files within the '/etc' directory that have been modified over 90 days ago. Ensure the output of this command is redirected to a file named '90days' located in the '/tmp' directory.

Show model answer

In RHEL 9, you can use the find command to achieve this task. The command would be:

This command searches for files (-type f) in the /etc directory that were modified more than 90 days ago (-mtime +90). The -exec option allows executing a command for each file found; here, it copies (cp) these files to '/tmp/90days'.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need