Question

Question 3 For this question, you are going to use input and output redirection. Using only...

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

Homework Answers

Answer #1

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 :)

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Chapter 8: Searching, Extracting, and Archiving Data Exercise 8.a: Using grep, find, and regular expressions (Objective...
Chapter 8: Searching, Extracting, and Archiving Data Exercise 8.a: Using grep, find, and regular expressions (Objective 3.2) Linux Distribution: Fedora (non-root user & password needed) Desktop Environment: GNOME 3 1.   If you have not already done so, boot up your computer (or virtual machine) to start the Fedora Linux distribution. 2.   When the machine has booted up, access the tty2 virtual terminal by pressing Ctrl+Alt+F2. 3.   Log on to a regular user’s account by typing in the username at the...
Linux Operation SECTION 2 – File and Directory Permissions: FILE PERMISSIONS: What is the command used...
Linux Operation SECTION 2 – File and Directory Permissions: FILE PERMISSIONS: What is the command used to find out which user account you are logged into?      . This command may come in handy in the following exercises. Ensure you are in your home directory of the student1 account. Use the echo command with output redirection to create a file called labfile4 and put the following text in this file: “This is the first line of labfile4”. Using the symbolic notation...
language: JAVA the Problem Below are a series of problems you need to solve using recursive...
language: JAVA the Problem Below are a series of problems you need to solve using recursive methods. You will write a program that will read commands from an input file, with each command referring to one of the recursive problems to be executed. Each command will be followed (on the same line of input) by the respective parameters required for that problem. (15 points for main method) DescArrayCheck   Write a recursive method that checks whether an array of integers -...
Networking questions: 1. You need to perform a basic ping scan and write the output file...
Networking questions: 1. You need to perform a basic ping scan and write the output file to a text file named 10-PingSweep.txt. You must utilize a “for loop” with the ping command in windows. It should be for the following sweep – 192.168.111.1-254. Provide the command to be placed into a cmd.exe shell. (Note – only valid Reply responses should be in the text file. Your exact command will be tested.) 2. You are working on a potential incident response...
(PLEASE USE C++) (PLEASE USE THE EXAMPLE GIVEN) Question 1: [10 pointes] the input file inFile.txt...
(PLEASE USE C++) (PLEASE USE THE EXAMPLE GIVEN) Question 1: [10 pointes] the input file inFile.txt stores a number of words with possible replication. Each word is stored on a separate line. The number of words within inFile.txt is stored as the first line in that file. Write and test a program that reads the words from inFile.txt and prints them in outFile.txt  without replication as well as the number of replication for each word. Hint: to implement the above program,...
2). Question with methods use scanner (Using Java): You are going to invest the amount, then...
2). Question with methods use scanner (Using Java): You are going to invest the amount, then you going to compute that amount with annual interest rate. 1) Prompt the user to enter student id, student name, student major 2) Declare variables consistent with names that you are prompting and relate them to the scanner 3) Declare the amount invested in college, prompt the user to ask for amount and declare variable and scanner to input 4) Declare the annual interest...
I did already posted this question before, I did get the answer but i am not...
I did already posted this question before, I did get the answer but i am not satisfied with the answer i did the code as a solution not the description as my solution, so i am reposting this question again. Please send me the code as my solution not the description In this project, build a simple Unix shell. The shell is the heart of the command-line interface, and thus is central to the Unix/C programming environment. Mastering use of...
Lab 2 Write a C program that runs on ocelot for a mini calculator using only...
Lab 2 Write a C program that runs on ocelot for a mini calculator using only the command line options. You must use getopt to parse the command line. The calculator will only do addition, subtraction, multiplication, division, and a power of 2. Usage: minicalc [-a num] [-d num] [-m num] [-s num] [-x] value • The variable value is the starting value. • Value should be validated to be an integer between 1 and 50 inclusive. Error message and...
Write a Python program named lastNameVolumes that finds the volumes of different 3 D objects such...
Write a Python program named lastNameVolumes that finds the volumes of different 3 D objects such as a cube, sphere, cylinder and cone. In this file there should be four methods defined. Write a method named cubeVolFirstName, which accepts the side of a cube in inches as an argument into the function. The method should calculate the volume of a cube in cubic inches and return the volume. The formula for calculating the volume of a cube is given below....
You can complete this assignment individually or as a group of two people. In this assignment...
You can complete this assignment individually or as a group of two people. In this assignment you will create a ​​Sorted Singly-Linked List​ that performs basic list operations using C++. This linked list should not allow duplicate elements. Elements of the list should be of type ‘ItemType’. ‘ItemType’ class should have a private integer variable with the name ‘value’. Elements in the linked list should be sorted in the ascending order according to this ‘value’ variable. You should create a...