The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
ITN 171 Unix I - Midterm Exercises
Solve the following problems using information from chapters 1 – 5, the man pages, the info pages, and the Internet (if you wish). On the server, create a directory in your home directory called “midterm.” In the directory, create a file for each question with the answer in it titled answer1, answer2, answer3, etc. After you are done, record the answers in this document and email it to t..0@gmail.com.
5 Point problems
What option for wc counts the number of characters of input?
What command will recursively delete all files from a directory called “~/deleted” without ever prompting the user (aka “force”)? (Warning – Be Careful with those options! DO not delete your home directory or you will have to redo the homework submitted to date)
What command will show the time of the last system boot?
What option for grep prints a count of the number of times the word MCSE appears in the file /tmp/MCSE?
Who owns /tmp/script-kiddie.html and what are the permissions on it?
Explain, in detail, the purpose and function of the /proc file system.
Explain what each of the following special characters do or represent - &&, ||, $, #, ~, <, >, >>, |, and ;.
Write a single command line that a user might enter to search their home directory for all files with an extension of html.
Write a single command line that will change the permissions on the file “document1.txt” so that the owner has all rights, members of their group have read and write rights, and others have read rights.
Write a command that will set the system time of a Linux system to 11:59AM on May 1st 2014. Note: You do not have the rights to set the system time so you will have to find the answer by reading up on the appropriate command and its use.
10-Point problems
Write a single command line that will take the text in a file named “lower”, convert it into uppercase, and save it to a file named “UPPER”.
Write a single command line that will search for the string “Chevy” and replace it with the string “Ford” inside the file “/tmp/cars” and send the output to a file called ~/cars2.txt
The last command reads the file /var/log/wtmp, which includes information on all login activity from the current month by default. Using last, piping and a command from chapters 1-5 write a single command line that will print a single number representing exactly how many times you have logged in this month.
Write a single command line using pipe and several commands you have used so far that will list only the names of the users who have logged in to the system in the current month, sort the output, and remove any duplicate name entries. Hint: check out the last command from #2 (man last).
What command will mount the device /dev/sdc1 to the mount point /media/sdc1 with a file system type of ext3 but not allow any binaries (the *NIX term for programs) to be executed from the device? Hint: There is a very specific option to the mount command for that last part.