Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Search ALL files in the ~ directory and all subdirectories below ~ that contain the keyword Macaw (case sensitive). Make sure to print out

1. Search ALL files in the ~ directory and all subdirectories below ~ that contain the keyword "Macaw" (case sensitive). Make sure to print out the line number where each keyword was found within the file. 2. Search files in ~ (Your home directory) and all subdirectories -- that contain the word 'potoo' (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 'June.tar' that would include all the files in /var/log with the extension *.log 5. I want to append the file June.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 'shepard' and delete them. 7. Find all files under ~ with a size smaller than 8 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 less than 5 minutes ago. 10. Find all files under the current directory whose modified time was more than 4 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 normandy.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 8 lines of the file. What command would I use? 15. Same as file as Question 14, but I want to view only the last 3 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 *.txt and use -exec to create a listing of each files inode number. This may sound tricky, but recall what command creates a listing then use the man page! 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 60 kilobytes. Use -exec and an appropriate command to delete these files. 20. Find all files under the current directory that are named 'chimichanga' ignoring case. 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro SQL Server Administration

Authors: Peter Carter

1st Edition

1484207106, 9781484207109

More Books

Students also viewed these Databases questions

Question

What are the stages of project management? Write it in items.

Answered: 1 week ago

Question

why do consumers often fail to seek out higher yields on deposits ?

Answered: 1 week ago

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago