Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Software Engineering Expert

Question 1.

Study the following filenames which contain wildcards.

[A-Za-z]*.txt

text.*
file?.txt
[!0-9]*.tex

• Give three examples of filenames that would match each of the following wildcard patterns.
• Give three examples of filenames that would not match each of the above wildcard patterns.

Question 2. 
Assume that a file's permissions give you read and write access.
• What operations can you perform on the file if it is in a directory which has "r" (read) only access?
• What operations can you perform on the file if it is in a directory which has "x" (execute) only access?

Question 3. 
When the shell is reading the command line what is the di?erence between text enclosed between double quotes (") and text enclosed between single quotes (')? Consider two cases.

• there are environmental variables and
• there is no environmental variable.

Question 4.

Provide English description for the regular expressions listed below.

ab.cd
ab*cd
ab.*cd
abb*cd
^abc
^abc$
[abc]d
[^abc]d
[A-Z]xy
[A-Z_][a-zA-Z0-9]*

(For instance, the regular expression "x*$" could be described as "zero or more x at the end of a line".)

Question 5.

• Give the command-line of using find to list all the files having specific username in the current directory
• Give the command-line of using find to list all the subdirectories in the current directory
• Use find to produce a long ls listing of all files in /usr/bin that are more than 750Kb long. Give all the arguments and options in the following command-line
find ..... -exec ls -l {} \;

Note that pay special attention to the arguments or options. The semicolon must be escaped, but not the {}.

Question 6.

Create a big file (If you don't know how to create a big file, try ls -l /usr/bin > bigfile). Create two copies of it using cp, and call them
big1 and big2.

• Give the command-line of compressing big1 using gzip (should produce big1.gz).
• Compress big2 using bzip2(should produce big2.bz2).
• Give the command-line of comparing the sizes of the compressed files (big1.gz and big2.bz2) and the original (bigfile) using ls -l
• Give the command-line of checking the file type of compressed files and the original.
• Give the command-line of displaying the contents of big1.gz using zcat and big2.bz2 but using bzcat without uncompress them. (You
may pipe the output to head -10 to avoid lots of output).

Question 7.
• Use tar to create an archive (don't use the z or j option) of all the files in the current directory.
• Compress the tar file with gzip.
• View the contents of archive with gunzip -c gzipped-tar-file | tar tfv -
• View without using gunzip but use the tar instead. (Hint: ?nd the right option to use from the man page).
• Create a subdirectory of the current directory.
• Use tar to unpack the archive into that directory at the current directory.

Question 8.
Assume you have a text file called file. Explain the following command lines.

1. sed "s/the/a/g" file
2. sed -n "s/[A-Z]/&/gp" file
3. sed "32,45 s/[()]//g" file
4. sed "/^$/d" file
5. sed "s/\([0-9]\)-\([0-9]\)/\1\2/g" file
6. sed "80q" file
For example, sed 's/fox/ox/g' file will replace all occurance of fox with ox and not the just the first one in file.

Software Engineering, Computer Science

  • Category:- Software Engineering
  • Reference No.:- M9905566
  • Price:- $70

Priced at Now at $70, Verified Solution

Have any Question?


Related Questions in Software Engineering

Reply to this article with apa referencehate crimes

Reply to this article with APA reference. Hate crimes According to Merriam-Webster, hate crime is any of various crimes (such as assault or defacement of property) when motivated by hostility to the victim as a member of ...

Write reply to this article with references with apa

Write reply to this article with references with APA bibliography. Hate Crimes Over the past couple of years, hate crimes have been on the rise in America's largest cities. Studies show that there were sharp spikes in th ...

Instructionsprivacy-preserving data miningdata mining

INSTRUCTIONS PRIVACY-PRESERVING DATA MINING Data mining technology can be exploited to reveal sensitive information from the original data. Thus it is important to preservethe privacy of the parties that the data refer t ...

Assignment part 1objectives to learn to identify the

Assignment Part 1 Objectives: To learn to identify the relevant use cases for a given application, describe the use cases and develop an object-oriented domain model. Problem Statement - Standing Orders Management System ...

In this assignment you will answer the following questions

In this assignment, you will answer the following questions related to Android platform and Android security design. 1. Describe Android architecture in detail by explaining the four conceptual layers. 2. Describe Androi ...

The research paper for this course is about some of the

The research paper for this course is about some of the best sources of digital evidence for child abuse and exploitation, domestic violence, and gambling according to the National Institute of Justice. Research commerci ...

In this assignment you will answer the following review

In this assignment, you will answer the following review questions from the reading materials of the module/week. 1. "What are the key components of a typical P2P application? Describe their functions." 2. "What are the ...

Overviewyou are required to modify and logically extend

Overview You are required to modify and logically extend the functionality of a provided code base to implement a game. This requires you to modify the code base as well as create documentation and implement various user ...

Research projectin the course we have covered various

RESEARCH PROJECT In the course, we have covered various security and privacy issues that arise in the cyberspace field. We have learned to identify these risks and have discussed the current approaches and developments f ...

Assignment lab - statement of workclient liberty vacation

Assignment Lab - Statement of Work Client: Liberty Vacation Planning Inc. (LVP) Project: Website Assessment 1. Project Objectives With this statement of work, LVP is engaging you to conduct a website assessment to determ ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As