For this project, download the text file weblog.txt. This file i...

  1. Home
  2. Homework Library
  3. Computer Science
  4. Linux
  5. For this project, download the text file weblog.txt. This file i...


For this project, download the text file weblog.txt.

This file is an Apache web log taken from the web server from university. When a visitor goes to their web site, the visitor's browser makes a request to the web server to view a web page, which is a file residing on the server. Each time a page is requested by a browser, the web server records information about that request. This weblog.txt holds the details of some of those requests. See below for a list of fields with an example:

Web Log Example

This file does not include all possible information that could be collected by a web server. The full description of the apache log file format can be found here: (Links to an external site.)Links to an external site.


Note: You will need to capture your work with the script command, just as you have been doing for the labs (script -a project2.txt). Remember to begin logging before you begin work and use the exit command when you are finished to save your work to the session log file.

Part 1
Create a file called weblog.mod that contains the contents of the weblog.txt file that has been modified using each of the modification commands below. You can choose which ways you would like to modify the file, but you must use each following commands to do the modifications. Use output redirection to save the modifications to a file.

Modification commands (Module 5 & Lab 5)


Part 2
Note:   You are not required to accomplish more than one task with a single command. You can use as many commands as needed to accomplish the tasks below. Make sure you have started your session log before you begin.

    Create a folder called project2 in your home directory and save or move the weblog.txt and weblog.mod files in that project2 directory.
    Create a folder called public_html in your home directory and a subdirectory called bin.
    Create a link to the weblog.txt and weblog.mod files in your ~/public_html/bin directory.
    Use the ls command to demonstrate that the files are located in the correct directory.
    Use the ls command to demonstrate that the links were created correctly.
    Display the inodes for the contents of your home directory.
    Display the inodes for all subdirectories of your home directory.


For part 1: In the submission window, explain which modifications you made when creating the weblog.mod file and which command(s) you used to make each modification. Upload your weblog.mod file. Do not upload the weblog.txt file.

For part 2: Upload your session log.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

Part 1
awk: prints only columns 1 and 4 (IP address & date)

awk '{print $1 "\t" $4}' weblog.txt >> weblog.mod


cut: extracts the 10th field, the size of the transferred page, delimiter white space

cut -d' ' -f10 weblog.txt >> weblog.mod


paste: merge the file weblog.txt into 3 columns using two distinct delimiters, namely @ and &

paste -d '@&' - - - < weblog.txt >> weblog.mod...

By purchasing this solution you'll be able to access the following files:

50% discount

$43.00 $21.50
for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Linux Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats