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

  Write a program that prompts the user to enter coordinates

Write a program that prompts the user to enter the center coordinates and radii of two circles and determines .

  Create an array of doubles and somehow put values into it

Display the array before sortingcall sort to sort the arraycall show to display the array after sortingFor this program.

  Plan a future proofing data-driven information system

COIT12209 - Data Science - Central Queensland University - plan a future proofing data-driven information system to better facilitate the payment

  Display the number of vowels in your name

Write a C program that stores your first name and your last name in separate arrays and counts and displays the number of vowels in your name.

  Describe the ethics and information management

Using Campbellsville University library and/or other sources, read at least four (4) academically reviewed articles on the ethical issues that may arise.

  Display the number of entries read

Write a proper C program that will read numbers from a text file and display the Number of entries read.

  Create public java class named benford

It's main function should prompt for the name of a data file and then the function iterates through the all of the elements in the data file.

  Summarize two disneys newest strategies being announced

Summarize one or two Disney's newest strategies (strategic moves) being announced and implemented. You do not need to use technical terms to name the strategies you found.

  How will you explain how arrays are used

If you were explaining an array ti a friend who is learning Java. how will you do so?

  How many bytes can be stored in this memory

If this memory were constructed from 1K × 1 RAMs, how many memory chips would be required?

  Discuss a current business process in a specific industry

This week discuss a current business process in a specific industry. After explaining the current situation, take the current learning from the course.

  What new equipment and software are necessary

The CIO asked you to read Too Much of a Good Thing to think about what resources you will need to get your new information system up and running.

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