Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 1.42 KB

Challenge-04.md

File metadata and controls

38 lines (28 loc) · 1.42 KB

Challenge 04 - File contents

< 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.log with this content:

    One
    Two
    Three
    Four
    Five

  • Use cp to make a backup of this file to count.bkp

  • Use cat to make a backup of this file, saving as cat-count.log

  • Display the content of cat-count.log, with all lines in reverse order

  • Use more to display /etc/selinux/semanage.conf

  • Use ls to find the biggest file in /var/log

Success Criteria

  1. Show the content of the first 10 lines of /etc/resolv.conf
  2. Show the last 5 lines of /etc/crontab
  3. Validate if the content of the file count.log was created as expected
  4. Check if the file count.bkp was created
  5. Check if the file cat-count.log was created
  6. Confirm if you can see the content of the file cat-count.log in reverse order
  7. Validate if you was able to see the content of the file /etc/selinux/semanage.conf paged
  8. Check if you can see the biggest file in /var/log at the top of the list

Learning Resources