Question 3 For this question, you are going to use input and output redirection. Using only the wc command and file redirection, determine the number of lines used in file /var/access.log, and write your result to a file named "q3" Note, for full credit, you will want to use file redirection to send /var/access.log to Standard In of the wc command, rather than telling wc to open the file itself
Question 4 Use the method found in Question 2 (echo "!xline#" > q2 ) to find the line of history you used for Question 3. Write the command you used to complete Question 3 to a file named "q4", referring to your history
Question 5 For this question, we are going to filter the file /var/access.log to find some information. Use the `grep` and `wc` commands to determine how many times Assignment 1 was downloaded from the server, according to the log file /var/access.log, and write this to a file named "q5" You can use any method of providing input to `grep` (e.g. cat, file redirection, passing the file as a parameter)
Question 6 Use the method found in Question 2 to find the line of history you used for Question 5. Write the command you used to complete Question 5 to a file named "q6", referring to your history
Answer 3
***********
as i do not have access.log file so i used auth.log file for this exercise.
Answer 4
***********
Answer 5
************
you can use
cat /var/access.log | grep http* > q5
Answer 6
***********
echo "!2316#" > q6
if you have any doubt then please ask me without any hesitation in the comment section below , if you like my answer then please thumbs up for the answer , before giving thumbs down please discuss the question it may possible that we may understand the question different way and we can edit and change the answers if you argue, thanks :)
Get Answers For Free
Most questions answered within 1 hours.