Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Unix/Linux and the picture please answer these 4 questions. Directions: Start a bash shell: $ bash Use an appropriate command to navigate to your

Using Unix/Linux and the picture please answer these 4 questions.

image text in transcribed

Directions:

Start a bash shell:

$ bash

Use an appropriate command to navigate to your csc209 directory.

Enter on Blackboard 2: Display the contents of the file .bashrc or .cshrc or /etc/csh.cshrc under your login directory and determine the user mask (umask) set there. If this does not work, see next page.

Command to display .bashrc: ___________________________________________________

umask value set: _______________________________________________________________

Write the rwx permissions taken away by umask value above: __________________________

Alternatively, execute the commands:

$ umask Output:_____________________

$ umask S Output:_____________________

Create a new directory named test04 under lab04. Determine the default access permissions on the directory at the time of creation.

Command to create a new directory test04: ________________________________________

Command, long listing, of (only) test04 showing its access permissions: _________________

Access permissions on test04 (write all 3 groups of 3 characters): __________________________

Create a new directory named test04 under the test04 directory created in the above step. Note that you are creating a second directory named test04 under test04. That is perfectly fine.

Command to create a second test04: ______________________________________________

Enter on Blackboard 3: Where is the executable? Navigate to the second test04 directory. Copy the file log from last week into your current directory. Copy the two shell scripts minmax1.sh and minmax2.sh into the upper test04 directory and make sure the two script files have executable permissions for the user. If you do not have these three files in your last week directory, copy the files from my directory: ~eiskrenovaekiert/CSC209/lab04 Copy the file log into your current directory. Copy the two shell scripts minmax1.sh and minmax2.sh into the upper test04 directory and make sure the two script files have executable permissions for you (the user).

Command to copy log: _________________________________________________

Command to copy minmax1.sh: __________________________________________

Command to copy minmax2.sh: __________________________________________

Execute the following commands:

../minmax1.sh log

~/csc209/lab04/minmax2.sh log

Do they run correctly?

Try to execute:

minmax1.sh log

What error message is displayed?

Enter on Blackboard 4: Where is the executable? In the last step, the shell cannot find the executable files because the directory they are located in is not in the command search path. You are still in your directory ~/csc209/lab04/test04/test04

Add the upper directory to the command search path as follows (note the two-dot notation):

export PATH=$PATH:..

echo $PATH

to check that the upper directory has been added to the PATH

Now execute:

which minmax1.sh

minmax1.sh log

minmax2.sh log

Does it run correctly?

var bin home etc usr faculty student passwd trao jlucas smitra alice bob CSC422 bin CSC205 CSC209 bear.jpg CSC209 hello lab01 lab02 lab01 lab02 hello.py hello.c hello.py hello.c var bin home etc usr faculty student passwd trao jlucas smitra alice bob CSC422 bin CSC205 CSC209 bear.jpg CSC209 hello lab01 lab02 lab01 lab02 hello.py hello.c hello.py hello.c

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

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions