Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Explain the following unexpected result: What are two ways you can execute a shell script when you do not have execute permission for the

Explain the following unexpected result:

 


What are two ways you can execute a shell script when you do not have execute permission for the file containing the script? Can you execute a shell script if you do not have read permission for the file containing the script?

What is the purpose of the PATH variable?

a. Set the PATH variable and place it in the environment so it causes the shell to search the following directories in order:

• /usr/local/bin

• /usr/bin

• /bin

• /usr/kerberos/bin

• The bin directory in your home directory

• The working directory

b. If there is an executable file named doit in /usr/bin and another file with the same name in your ~/bin directory, which one will be executed?

c. If your PATH variable is not set to search the working directory, how can you execute a program located there?

d. Which command can you use to add the directory /usr/games to the end of the list of directories in PATH?

S whereis date date: /bin/date... S echo SPATH .:/usr/local/bin:/usr/bin:/bin $ cat > date echo "This is my own version of date." $ ./date Sun May 21 11:45:49 PDT 2017

Step by Step Solution

3.43 Rating (166 Votes )

There are 3 Steps involved in it

Step: 1

Lets address each part of your question Unexpected Result Explanation The unexpected result youre seeing is likely due to the fact that you have creat... 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

Operations Management

Authors: William J Stevenson

12th edition

2900078024107, 78024102, 978-0078024108

More Books

Students also viewed these Programming questions

Question

What is the kanban aspect of JIT?

Answered: 1 week ago