Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Q.

12 Find the string “enter” from “/usr/share/dict/words”


file and copy those lines in “/root/strings.txt”

My Answer: sudo cat /usr/share/dict/words | grep enter >


/root/strings.txt
Ideal Answer: grep –i “enter” > /root/strings.txt
cat /root/strings.txt

Q.13 Archive and compress for /etc directory under


/var/tmp/archive.tar.bz2 format?

My Answer: sudo tar -czvf /var/tmp/archive.tar.bz2 /etc/


Ideal Answer: grep –i “enter” > /root/strings.txt
cat /root/strings.txt
Q.09 Directory collaboration
 Create the directory “solman” with the following
characteristics
 Group ownership of “solam” should go to the manager
group.
 The directory should have full permission for all
members of the “manager” group but not to the other users
except root.
 Files created in future under “solam” should get the
same group ownership.
 User Natasha will get “rw” permission on “solam” and
user harry should not be able to access the directory.
My Answer: sudo tar -czvf /var/tmp/archive.tar.bz2 /etc/
Ideal Answer: grep –i “enter” > /root/strings.txt
cat /root/strings.txt

You might also like