Challenge 04 - File contents
June 3, 2022 ยท View on GitHub
< Previous Challenge - Home - Next Challenge >
Description
In this challenge let's learn about file content manipulation and discover how to count file lines, display specific lines from a file, and more.
-
Display the first 10 lines of
/etc/resolv.conf -
Display the last 5 lines of
/etc/crontab -
Create a file named
count.logwith this content:One
Two
Three
Four
Five -
Use
cpto make a backup of this file tocount.bkp -
Use
catto make a backup of this file, saving ascat-count.log -
Display the content of
cat-count.log, with all lines in reverse order -
Use
moreto display/etc/selinux/semanage.conf -
Use
lsto find the biggest file in/var/log
Success Criteria
- Show the content of the first 10 lines of
/etc/resolv.conf - Show the last 5 lines of
/etc/crontab - Validate if the content of the file
count.logwas created as expected - Check if the file
count.bkpwas created - Check if the file
cat-count.logwas created - Confirm if you can see the content of the file
cat-count.login reverse order - Validate if you was able to see the content of the file
/etc/selinux/semanage.confpaged - Check if you can see the biggest file in
/var/logat the top of the list