RHCSA EX200v9 Latest Exam Questions with solutions -3

by Jay

Red Hat Certified System Administrator Latest RHCSA EX200v9 Exam Latest Questions with solutions based on RHELv9 Part-3

Q1.a. Search the files with extension .pl and copy the files to directory /root/pl.found.

b. Search student user files and copy the files to directory /root/student.found.
Ans: a.

# mkdir /root/pl.found
# find / -type f -name *.pl -exec cp -rvfp {} /root/pl.found ;
# ll /root/pl.found

Ans: b.

# mkdir /root/student.found
# find / -type f -user student -exec cp -rvfp {} /root/student.found ;
# ll /root/student.found

2. Search the keyword “sar” in /usr/share/dict/words file and store the lines in /root/sar.found.

# grep sa /usr/share/dict/words |sort > /root/sar.found

3. When we will create any users in node1 the password of that particular user should expire in 20days.

# vi /etc/login.defs

Check: – add one user and put chage -l (user name)

4. Write a script named adhoc.sh under /root which will search less than 2M files from /var and store it in /root/backup and also set the permission of set user identifier (SGID)

# vi adhoc.sh
find /usr -type f -size -2M -exec cp {} /root/backup ;
:wq! (save and exit from file)
#chmod 2775 adhoc.sh

5. Give the sudo permission to group1.

# vi /etc/sudoers
:wq! (save and exit)

6. When the existing user joe will create the file the permission should come as rw——- and when create the directory it should come as rwx——

# su - joe
$ vi .bashrc
umask 077 (write it in last line)
:wq!  (save and Exit file)

umask 077 (execute in terminal)

Was this article of use to you? Post your insightful thoughts or recommendations in the comments section if you don’t find this article to be helpful or if you see any outdated information, a problem, or a typo to help this article better.

Related Posts

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.