Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Explain the difference between the /etc/profile and the ~/.bash_profile file. Which one is executed first? 2. Edit your .bash_profile file as follows: 1. Welcome

1. Explain the difference between the /etc/profile and the ~/.bash_profile file. Which one is executed first?

2. Edit your .bash_profile file as follows:

1. Welcome the user

2. Add your home directory to the path if it is not there

3. Set erase to the Backspace key using stty.

4. Type source .bash_profile. What is the function of the source command?

3. What is the default primary prompt?

1. Change the prompt to include the time of day and your home directory.

2. What is the default secondary prompt? What is its function?

4. What is the difference between a program and a process? What is a job?

5. What command brings a background job into the foreground?

6. How do you list all running jobs? All stopped jobs?

7. Make a directory called wildcards. Cd to that directory and type at the prompt:

touch ab abc a1 a2 a3 all a12 ba ba.1 ba.2 filex filey AbC ABC ABc3 abc

Write and test the command that will do the following:

a. List all files starting with a.

b. List all files ending in at least one digit.

c. List all files starting with a or A

d. List all files ending in a period, followed by a digit.

e. List files ending in x or y

f. List all files ending in a digit, an uppercase letter, or a lowercase letter.

8. What command would you use to do the following:

1. Redirect the output of the ls command to a file called lsfile?

2. Redirect and append the output of the date command to lsfile?

3. Redirect the output of the who command to lsfile? What happened?

9. Use the find command to find all files, starting from the parent directory, of type directory. Save the standard output in a file called found and any errors in a file called found.errs.

10. What is a positional parameter? Type at the command line:

set dogs cats birds fish

1. How do you list all of the positional parameters?

2. Which positional parameter is assigned birds?

3. How do you print the number of positional parameters?

4. How do you remove all the positional parameters from the shells memory?

11. What is an environment variable? What is the command used to list them? Create an environment variable called CITY and assign it the value of your hometown. How do you export it?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Object Oriented Deductive Hypermedia Technologies

Authors: Kamran Parsaye, Mark Chignell, Setrag Khoshafian, Harry Wong

1st Edition

0471503452, 978-0471503453

More Books

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago