There are 100 possible points.
-------------------
1. Search ALL files in the ~ directory -- and all subdirectories below ~ -- that contain the keyword "Parrot" (case sensitive). Make sure to print out the line number where each keyword
was found within the file.
2. Search files in ~ and all subdirectories -- that contain the word 'albatross' (case sensitive) at the beginning OR end of a line. Provide two lines of context before and after each
keyword found. Hint: Extended Grep is your friend
3. Search files in the /var/log directory that contain the word 'sudo' (case insensitive). Add three lines of context after each keyword found.
4. Create a tar file named 'October.tar' that would include all the files in /var/log with the extension *.log
5. I want to append the file contingency.log.bak to the tar archive from Question 4 above. What command would I use?
6. Find all empty files under /home that belong to the user 'patrick' and delete them.
7. Find all files under ~ with a size smaller than 5 kilobytes.
8. I want to compress the file in Question 4 using the bzip2 compression algorithm. What command would I use?
9. Find all files under /var/log whose accessed time was MORE than 4 minutes ago.
10. Find all files under the current directory whose modified time was more than 3 days ago.
11. I have a file called 'backups.tar.bz2' in my home directory. I want to uncompress and unarchive the files in it. What single command would I use?
12. I have a file called hello.bz2 and I want to uncompress it. What command would I use?
13. I want to search for all files in the directory ~/Documents that contain the keyword "mount", case sensitive, and as the entire word. Words like amount, submount, demount, etc, should
not be found in the results; just 'mount'. Additionally, I only want to see the name(s) of the file(s) that have matches as a result of running the command. What command would I use? Hate
mail can be directed to /dev/null
14. I have a large file named bighead.txt and I want to view only the first 6 lines of the file. What command would I use?
15. Same as file as Question 14, but I want to view only the last 5 lines.
16. Find all files under ~ whose content contain the keyword pizza OR PIZZA OR piZZa OR pizzA. Not all variations in case for 'pizza', but just the variations listed.
17. Find all files under the current directory whose extension is *.gz and use -exec to create a listing of each files inode number.
18. What command would I run to update the database of file names used by the locate command?
19. Find all files under the /tmp directory whose size is greater than 90 kilobytes. Use -exec and an appropriate command to delete these files.
20. Find all files under the current directory that are named 'bacon' ignoring case.
find . -type f -iname "*bacon*"