0% found this document useful (0 votes)
36 views2 pages

Super Secret Project Brief

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views2 pages

Super Secret Project Brief

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

“Super Secret” Project Brief

Task 1

In this task you are asked to create a folder called super_secret_stuff and inside that folder to
place a file called top_secret.txt

top_secret.txt may contain whatever content you wish.

Once you have created the file, use the updatedb command and the locate command to find
the path to top_secret.txt .

Using redirection, save the path that the locate command gives you to a new file called
secret_place.txt in your home directory.

Hint: You will need to use sudo to gain the elevated privileges required to update the
database.

Task 2

Part A)

In this task, you are going to create an advanced pipeline that will create a sorted list of
the various file sizes on your system.

Firstly, use the find command to search your entire file tree; starting from the /
directory, for all files that are over 1 MebiByte in size. Use the maxdepth option to limit
the find command’s search to only go 4 levels deep. The search should only show
files, not directories.

Use the -exec option of the find command to run the ls -lh command on each of
those results.

Hint: You will need to put sudo at the start of this command to access all required
folders.

Part B Below:
Part B)

Sort the output from Part A using the sort command. You should sort the data so that
the largest file sizes are at the top of the list and the smallest file sizes are at the bottom.

Using redirection, output this data to a file called filesizes.txt in your home directory.

Hint 1: You will need to use the –k option for the sort command and define a
KEYDEF.

Hint 2: The file sizes are the 5th column of data.

Hint 3: You need to let the sort command to be able to deal with “human-readable”
data.

Submission Guidelines

In the submission you should include:

1. The commands you used to complete all actions in Task 1.


2. The complete pipeline for Task 2 (Part A and Part B Combined)

Please also include how long it took you to complete the assignment. This is so that I can
make the estimation of how long the assignment takes more accurate over time.

Please also mark your submission open for feedback from other students so that you can
receive feedback as fast as possible. Due to the high volume of submissions it is unlikely that I
will be able to give everyone personalised feedback, but please take a look at the instructor
example to see my solution after you have submitted your assignment.

Important: You can only submit this assignment once. This is due to how Udemy's system
works and is beyond my control unfortunately.

To read more about how Udemy's assignment system works, please read the guidelines here.

Other than that, I wish you the best of luck with your assignment! You won't recognise yourself
after you have completed it and the assignment will serve as a badge of honor for you going
forward! Good luck!!!!

Ziyad

You might also like