How to solve these challenges:
To be consistent with the filenames and paths run the commands on Ubuntu
Write your solution in a terminal and test it.
If your solution is not correct, then try to understand the error messages, watch the video again, rewrite the solution and test it again. Repeat this step until you get the correct solution.
Save the solution in a file for future reference or recap.
Challenge #1
Check if locate is installed. Install it if necessary.
Create a new file and search for it using locate.
Update the database used by locate and search for the file again.
Are you stuck? Do you want to see the solution for this challenge? Click here.
Challenge #2
Remove the file created in the previous challenge.
Search for it using locate.
Update the database used by locate and search for the file again.
Are you stuck? Do you want to see the solution for this challenge? Click here.
Challenge #3
Find all regular files in /var that have a size bigger than 2 MB.
Are you stuck? Do you want to see the solution for this challenge? Click here.
Challenge #4
Find all regular files in /etc that have been modified in the last hour.
Execute cat on each found file.
Create a new directory and copy all found files in that directory (backup).
Are you stuck? Do you want to see the solution for this challenge? Click here.
Challenge #5
Find all regular files in /var that are not owned by root.
Are you stuck? Do you want to see the solution for this challenge? Click here.
Challenge #5
Create a directory and a new file in it.
Find all files that have the change time in the last minute in the newly created directory and delete them automatically.
Are you stuck? Do you want to see the solution for this challenge? Click here.