Question

In: Computer Science

1. What are the names of the parts of a UNIX command? list them, and give...

1. What are the names of the parts of a UNIX command? list them, and give a brief description of each.

2. Can multiple UNIX commands be typed on the same single command line? Explain how

3. How can you find out which utilities are available on your system for editing files? Which utilities are available for editing on your system?

4. What does the following command do? What is $PATH and echo $PATH?

5. What is the result of giving the which utility the name of a command that resides in a directory that is nor in your search path?

Solutions

Expert Solution

  1. The names of parts of a UNIX command is as follows:
    1. Command name:- This is the name by which the command to be used is identified.
    2. Options/s:- These are single letters preceded by a hyphen. These instruct UNIX to perform an action by executing the command in a particular way which is determined by the option used.
    3. FIlename/s:- There are many commands in UNIX that operate on a file. These commands require the filename of the file to be specified just after the command.
    4. Argument/s:- UNIX commands require some information in order to their job. These pieces of information are known as arguments.
  2. Yes, multiple UNIX commands can be typed on the same command line. These are possible in the following ways:
    1. separating commands written on the same line using ';'. For example, ls;pwd.
    2. using operators like '&&' or '||'. For example, cd MyDir && ls. This command makes MyDir as the present working directory and lists out its content.
    3. Using pipes. The syntax for the same is command1 | command2 | command3... | commandN.
  3. In order to find out which utilities are available on your system, one can use the command apropos editor. The utilities available for editing on my system are vim, ex, gedit, pico, vi.
  4. 1st Part

(Command not given)

2nd part

$PATH: In UNIX, $PATH is an environmental variable. It is used by the shell to know where it should search for the executable files in response to the command entered by the user. In other words, it tells the location of the executable files to the shell.

echo $PATH: This is used to view the directories specified by the PATH variable.

5. If we give the utility, the name of a command residing in a directory that is not in our search path then it will not work. This is because the utility cannot find the destination.


Related Solutions

Question 1 What Unix command can be used to change the access permission of a file...
Question 1 What Unix command can be used to change the access permission of a file ?   and how ? Explain how pipe works in Unix. Give one example; Explain how redirect works in Unix and give an example. Explain the structure of Unix file system and how absolute and relative paths work What is UML ?   Briefly explain two types of diagrams in UML. Briefly explain two types of testing methods for software development and the major stages in...
unix/Linux Create a tar command using the man command and the link referred to in To...
unix/Linux Create a tar command using the man command and the link referred to in To Practice and Explore: Text File Utilities #9. Preliminaries Use the man pages to learn more about tar Review the links referred to in To Practice and Explore: Text File Utilities #9 to see examples of using tar command Perform Use tar "to stuff" three files and then "unstuff" them into a new directory. Include the -v option. Task ll to show the original 3...
What are VT features with UNIX and give examples.
What are VT features with UNIX and give examples.
Please list 3 of your favorite brand names, and answer the following: 1- Which of them...
Please list 3 of your favorite brand names, and answer the following: 1- Which of them are global brands? 2- What image does each brand have in your mind? 3- How loyal are you toward each brand & why?
List the names of five parts of your first line of defense IN DETAIL.
List the names of five parts of your first line of defense IN DETAIL.
Open the Command Prompt window and use the nslookup command to identify the domain names that...
Open the Command Prompt window and use the nslookup command to identify the domain names that correspond to the following IP addresses: 161.170.244.20 205.251.242.103 144.160.155.43 Use the Command Prompt window and nslookup command to identify the IP addresses that correspond to the following domain names: walmart.com amazon.com att.com Close the Command Prompt window. Submit your findings.
please use linux or unix to complete Diff command The diff command displays differences between two...
please use linux or unix to complete Diff command The diff command displays differences between two files on a line-by-line basis. It displays the differences as instructions that you can use to edit one of the files ( using the vi editor) to make it the same as the other. When you use diff, it produces a series of lines containing Append (a), Delete (d), and Change (c) instructions. Each of these lines is followed by the lines from the...
Unix / Linux 6. vi editor: In vi command mode, what are the keystrokes you would...
Unix / Linux 6. vi editor: In vi command mode, what are the keystrokes you would type to... Quit the vi editor and save any changes? 7. C language source files, by convention, have the suffix ".c". The associated "header" files have the suffix ".h". What is the command to perform the following task: List all the C source and C header files in the current directory. [Hidden files may remain hidden.] 8. C language source files, by convention, have...
Please execute the appropriate Unix command to perform the action described. 1 - Put your login...
Please execute the appropriate Unix command to perform the action described. 1 - Put your login name in the file session03_hw. 2 - Put the date in mm/dd/yy format in the file session03_hw. 3 - Put the abbreviated weekday name in the file session03_hw. 4 - Put the time in hh:mm format in the file session03_hw. 5 - Use the command for a short listing with the option to list entries by columns. List files that start with mno and...
What are the 4 different kinds of mergers? List them and give a hypothetical example of...
What are the 4 different kinds of mergers? List them and give a hypothetical example of each?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT