CSC2408 Software Development Tools Assignment

Assignment Help Computer Engineering
Reference no: EM132603907

CSC2408 Software Development Tools - University of Southern Queensland

Linux Basics: Commands and Regular Expressions

Objective

The objective of this first assessment is to assess the understanding of Linux concepts, and knowledge of various command line interface (CLI) utilities, knowledge of regular expressions, and use of the manual pages to find appropriate options for the commands.

Question 1

Topic: Directories and files
Submission: Use the asciinema software to record the command line to a filename
userid_a1_q1.cast where userid is your student number.
Tasks: Perform the following tasks, starting in your home directory.

Set the PS1 shell variable to your student number so that your shell prompt looks like this:

u12345678=>

(if your student ID was u12345678)

Create the following directory structure, starting in your home directory

1398_figure.jpg

Figure 1: Directory structure for Question 1.2

Verify that the structure is correct using ls or other command-line utilities.

In your home directory, create a file called welcome.txt using vim con- taining the following text:

This is CSC2408 Software Development Tools

Without changing your current working directory, move the file wel- come.txt to the csc2408a1 directory.

Make a copy of the file welcome.txt called q1b.txt in the directory q1b.

Set permissions on the file welcome.txt so that the owner has only read permissions and the group and everyone else have no permissions.

Set the permissions on the directory q1b so that the owner can read the files in the directory, can read file contents in the directory, but cannot create or delete files in the directory. Set permissions for the qroup and everyone else have no permission.

Question 2
Topic: The Linux find command is quite useful and powerful. Examine the manual page for find.
Submission: Use the asciinema software to record the command line to a filename
userid_a1_q2.cast where userid is your student number.
Tasks: Perform the following tasks, starting in your home directory.

Set the PS1 shell variable to your student number so that your shell prompt looks like this:

u12345678=>

(if u12345678 was your student number)

Use a single find command to list all of the subdirectories in the direc- tory structure you created in Question 1, starting with csc2408a1, redirecting any standard errors to /dev/null

Use a single find command to search for all of the programs in the /usr/bin directory that have have SUID or SGID set. From the list produced, use ls to do long listings of the filenames to show the SUID or SGID is set.

Use a single find command to search for all files larger than 1 Mib in /usr/bin, printing the listing in a long format. Pipe this output to a sort command which will sort the list from largest to smallest.

Question 3
Topic: tar, gzip and more file operations.

Submission: Use the asciinema software to record the command line to a filename userid_a1_q3.cast where userid is your student number.

Tasks: Perform the following tasks, starting in your home directory.

Set the PS1 shell variable to your student number so that your shell prompt looks like this:

u12345678=>

(if u12345678 was your student number)

Change into the directory containing the welcome.txt file created in

Question 1.

Using tar, create a .tar archive containing the just welcome.txt file. Compress the resulting archive with gzip.

Move the resulting compressed archive to the q3 directory in the direc- tory structure created in Question 1 (see Figure1).

Without using gunzip (only using tar), view the table of contents of the compressed archive without extracting the files.

Extract the file from the compressed archive in the q3 directory.

Remove all of the files in the q3 directory.

You will be awarded 2 marks for correctly creating the compressed

.tar archive for submitting this assignment. The tar file should contain 1 file per question you have answered in this assignment (5 files if you have completed all questions). The commands used for this part (3.7) do NOT need to be included in your answer file/recording.

Question 4
Topic: Regular expressions
Submission: Place your answers in a text file called userid_a1_q4.txt where
userid is your student number.
Tasks: Below are 5 pairs of regular expressions. For each pair, describe in plain words what each regular expression will match, and high- light their difference by providing examples where one expression will match the example string, but the other will not.

For example, given the pair of regular expressions: ^abc. and ^abc$
your answer in the text file should be something like:

"Q4.1 a) The first regular expression will match a line that begins with the string of characters 'abc' followed by any single character (and may be followed then by zero of more characters). The second regular expression will match a line consisting of the string 'abc'
b) The first regular expression will match 'abcd', but the second ex- pression will not. The second expression will match the line 'abc' but not 'abcd'."

Note that sometimes you may only need to provide one example in the case that one expression will always match the examples but the other will not.

4.1 ab.*cd and abb*cd

4.2 [A-Z][_a-zA-Z0-9]* and [A-Z_][a-zA-Z0-9]*

4.3 [0-9]{4}-[0-9]{3}-[0-9]{3}} and [0-9]{4}-[0-9]{3,4}-[0-9]{3,4}

ab?cd and ab+cd

[abc]d and [^abc]d

Question 5
Topic: sed and regular expressions
Submission: Place your answers in a text file called userid_a1_q5.txt where
userid is your student number.
Tasks: As we saw in the course, sed is used to manipulate text using the matching of regular expressions. Below are 5 sed expressions. As- sume you have a file called myfile.txt. Describe in words what the sed expression will do. Use the manual pages for sed, and, if necessary, craft a text file with lines which will match the regular expressions, and test the command.

For example, if the sed expression is: sed 's/fox/ox/g' my- file.txt you see that the sed command is looking for the regular expression fox, you could create a myfile.txt with occurrences of fox and test the command.

Your answer in the text file would be something like:

"Q5.1 Expression: sed 's/fox/ox/g' myfile.txt
Answer: The command substitutes line by line all occurrences of 'fox' with 'ox' in myfile.txt"

sed '/^$/d' myfile.txt

sed -n '/There/ p' myfile.txt

sed -n 's/[A-Z]/&e/gp' myfile.txt

sed '32,45 s/[()]//g' myfile.txt

5.5 sed -E 's/([0-9]+)-([0-9]+)/\2:\1/g' myfile.txt

Attachment:- Software Development Tools.rar

Reference no: EM132603907

Questions Cloud

Write about what project management means to you : Write about what project management means to you. Use references if would be great from Fundamentals of Project Management 5th Edition, Joseph Heagney.
Determine mr locke charitable donations tax credit : Determine Mr. Locke's charitable donations tax credit for 2019. After receiving a large, Dave Locke has 2019 Net Income For Tax Purposes of 82,422.
Brain games continue to increase in popularity : Brain games continue to increase in popularity, especially mobile applications. You may have seen the advertisements for these apps,
How are the s-curve and the product lifecycle different : How are the S-curve and the product lifecycle different? Are they the same concept applied in different ways, or are there distinct insights that can be.
CSC2408 Software Development Tools Assignment : CSC2408 Software Development Tools Assignment Help and Solution, University of Southern Queensland - Assessment Writing Service - The Linux find command
What is the market yield of the bond : Which rate over each payment interval do you use for calculating the purchase price manually using the formula approach? What is the market yield of the bond?
Develop recommendations for an it innovation project : Develop findings and recommendations for an IT innovation project. This is the third part of a three-part project in technology innovation. Through these three.
Do you qualify as a whistleblower under the Dodd-Frank Act : Do you qualify as a whistleblower under the Dodd-Frank Act? Did the company overstate or understate its earnings guidance
Determine the total amount of education related credits : Interest on the loan she received under the Canada Student Loans Act. Determine the total amount of education related credits that would be available for Selma

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd