Question

When you run a UNIX command where does the shell get the list of directories to...

When you run a UNIX command where does the shell get the list of directories to search for the command that you entered?

A. From the user

B. From the command

C. From the PATH variable

D. From the kernel

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1.

  • When you run a UNIX command From the PATH variable the shell get the list of directories to search for the command that you entered.
  • A PATH variable contains list of directories.
  • Shell uses the PATH variable to locate the commands.
  • All external commands can be stored in the PATH variable.

Option C

Add a comment
Know the answer?
Add Answer to:
When you run a UNIX command where does the shell get the list of directories to...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Unix questions, i need help on Hint: Commands to study to answer this question: predefined shell...

    Unix questions, i need help on Hint: Commands to study to answer this question: predefined shell variables, and .profile script file, echo SHELL, HOME, PATH, MAIL and TERM are predefined shell variables. You can use the value of a shell variable in a shell command putting $ in front of it. For example, to display the value of the HOME directory of the user, specify $HOME in the echo command like echo $HOME. Do not give just the value of...

  • UNIX Write and run a simple shell script name mymenu that creates a simple command menu....

    UNIX Write and run a simple shell script name mymenu that creates a simple command menu. The script should present menu items (see below), prompts the user for a selection, and then executes the appropriate command selected. [Submit your script and the results of a test case for a, b, c, and d selections]     COMMAND MENU a. Current date and time b. Name of the working directory c. Contents of the working directory Enter a, b, or c:

  • Explain what the following UNIX command does: Is 'echo I.txt' Please type shell commands (for Windows....

    Explain what the following UNIX command does: Is 'echo I.txt' Please type shell commands (for Windows. UNIX, or any other system that you like) for: creating a directory called hello world list the contents of this directory create a file called iwashere.txt display the contents of the file iwashere.txt from the command-line Please write a simple program in C for accepting a string from the command-line, reversing and printing the reversed string to standard output.

  • QUESTION 1 What will be the output of following Unix command: find / -name ‘*’ A....

    QUESTION 1 What will be the output of following Unix command: find / -name ‘*’ A. List all files and directories recursively starting from / B. List a file names * in / C. List all files in / directory D. List all files and directories in / directory QUESTION 2 Which command is used to extract a column/field from a text file / input. A. paste B. get C. cut D. tar QUESTION 3 Which command creates an empty...

  • 1) Write a single line UNIX command to list all sh files matching the multiple conditions...

    1) Write a single line UNIX command to list all sh files matching the multiple conditions below: • at directory "/home/test" • filename containing "exam" 2) Write a single line UNIX command to check if "/home/exam2" in the PATH variable. 3) How to obtain the value of command line arguments in a shell program? 4) Write a single line UNIX command to run an executable Java program Hello at background and output the number of lines in the result. 5)...

  • You are currently running/debugging a shell script program in the foreground that seems to be in an infinite loop, to terminate/kill the shell script program. 7. (type/enter - control C to send a &#3...

    You are currently running/debugging a shell script program in the foreground that seems to be in an infinite loop, to terminate/kill the shell script program. 7. (type/enter - control C to send a "program interrupt" ) or (contact the sysadmin person to kill your shell script program) 8. The UNIX/Linux exit command entered on the KORN shell command line will exit the shell session properly (best practice). [True / False] When killing a background process with the kill command you...

  • Project 1: Implementing a Shell 1 Overview In this individual project you will have to design...

    Project 1: Implementing a Shell 1 Overview In this individual project you will have to design and implement a simple shell command interpreter called mysh. The basic function of a shell is to accept lines of text as input and execute programs in response. The shell must be able to execute built-in commands in a process different from the one executing mysh. 2 Requirements When first started, your shell should initialize any necessary data structures and then enter a loop...

  • You are required to develop a simple Linux shell in C language “shell.c". The shell has...

    You are required to develop a simple Linux shell in C language “shell.c". The shell has to perform the following requirements: - - The shell prompt is “"myshell>". - Run commands either from current directory or from “/bin" directory using the "exec" system call. - Support output redirection like "command> filename" using "dup" system call. Note: save the output of the comment in the (filename). - Implement the “history shell command to list the last ten commands entered so far....

  • you are to create a simple “shell” for Linux systems. A shell is a command interpreter...

    you are to create a simple “shell” for Linux systems. A shell is a command interpreter whose main function is to get and execute the next user-specified command. Required Tasks You must write the shell in C/C++ for Linux systems, and the shell must have the following functionalities (or features): 1. can use command chdir to change to a given directory.

  • Creating a Shell Interface Using Java This project consists of modifying a Java program so that...

    Creating a Shell Interface Using Java This project consists of modifying a Java program so that it serves as a shell interface that accepts user commands and then executes each command in a separate process external to the Java virtual machine. Overview A shell interface provides the user with a prompt, after which the user enters the next command. The example below illustrates the prompt jsh> and the user’s next command: cat Prog.java. This command displays the file Prog.java on...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT