Lab Challenge
By Muhammad Aditiya Rakhman
Lab Challenge 1: Working with file content
Instructions
Extact all line from the file /var/log/sample1.log that contain the string INFO and write them to the file /home/student/challenge01/output1.log
Extact all line from the file /var/log/sample2.log that contain the string illegal at the very start of the line only, and write them to the file /home/student/challenge01/output2.log
Extact all line from the file /var/log/sample1.log that contain router_forward_getOI with TRACE level and write them to the file /home/student/challenge01/output3.log
Answer
Lab Challenge 2: Finding files
Instructions
Find all files in the directory /home/student/challenge02/spesials/ with their SUID + SGID bits set. Write a list of matching filenames, one per line, to the file /home/student/challenge02/suid.txt. Esure that you specify the absolute path to each file.
Find all files in the directory /home/student/challenge02/spesials/ with mode 0600 . Copy those files to the directory /home/student/challenge02/backup/. Ensure that you preserve the original permissions of the spesials files.
Find all files in the directory /home/student/challenge02/spesials/ with a size that is around of 8-10K. Copy those files to the directory /home/student/challenge02/size/.
Find all files in the directory /home/student/challenge02/spesials/ with a file extension of .txt which are not owned by the user student. Write a list of matching filenames, one per line to the file /home/student/challenge02/extension.txt. Esure that you specify the absolute path to each file
Answer
Lab Challenge 3: Working with partition
Instructions
Adding a disk to a virtual machine with a size of 2GB
Create a new partition on device /dev/sdc that is 1GiB in size. This should be the first partition on the device
Create an ext4 filesystem on the newly created partition /dev/sdc1. And configure the filesystem's label to be appcache
Mount the new filesystem to the mountpoint /app
Ensure that new filesystem will be mounted automatically upon system startup using LABEL
Answer
Lab Challenge 4 : Comparing Files
Instructions
Compare the content of the files /home/student/challenge04/fileA.txt and /home/student/challenge04/fileB.txt, ignoring case in your comparison. Redirect the output from your comparison on the file /home/student/challenge04/results01.txt.
Compare all file in directory (included subdirectory) /home/student/challenge04/compare01 and /home/student/challenge04/compare02, one file will be different. Write the absolute path of the different file to the output file /home/student/challenge04/results02.txt.
Two directories of the files are present /home/student/challenge04/comdir01 and /home/student/challenge04/comdir02, write a list of filenames only (do not include the path) of files which are only present in /home/student/challenge04/comdir02 to /home/student/challenge04/results03.txt.
Answer
Last updated
Was this helpful?