Please help with Q1,3,4
With features such as command line completion it is good to know where the commands are coming from. Shell commands like which and whereis can be used to determine where the actual executable file for a command resides. For example, which more tells you that the more command is actually a program and the executable file is /bin/more. Not all commands are associated with an executable file. Some are built into the shell itself. For example, which jobs tells you that jobs is a shell built-in command Exercise: Answer the following about tesh. You many need to experiment a bit to work out the behaviour path: Find the value of the path variable for your default shell on phys-ugrad.memaster.ca and list it here. 2. path: What is the function of the path variable? (You may want to look at the man page for tcsh or google about path in unix) PATH is an enronmental vanabie and it telis me shen If you type xeyes
at the command prompt, which would run, the standard xeyes program or a program in your current directory also called xeyes? Why? (NB: It is a 3 bad idea to give a program the same name as an existing command.) Hint: The . character indicates the current directory -where you are now. There is a command to tell you which program would run without running it. You can make an runable xeyes in your directory by creating the file called xeyes (eg. touch xeyes) and then making it executable (runable) with chmod +x xeyes 4 TAB completion: The TAB key attempts to complete the current word you are typing at the command line. Which files does the shell examine for completions to the first word on command line? 5 TAB completion: Which files does the shell examine for completions to the second word z se cond part of commandl a command line? They use built ins to chec complete and compge With features such as command line completion it is good to know where the commands are coming from. Shell commands like which and whereis can be used to determine where the actual executable file for a command resides. For example, which more tells you that the more command is actually a program and the executable file is /bin/more. Not all commands are associated with an executable file. Some are built into the shell itself. For example, which jobs tells you that jobs is a shell built-in command Exercise: Answer the following about tesh. You many need to experiment a bit to work out the behaviour path: Find the value of the path variable for your default shell on phys-ugrad.memaster.ca and list it here. 2. path: What is the function of the path variable? (You may want to look at the man page for tcsh or google about path in unix) PATH is an enronmental vanabie and it telis me shen If you type xeyes at the command prompt, which would run, the standard xeyes program or a program in your current directory also called xeyes? Why? (NB: It is a 3 bad idea to give a program the same name as an existing command.) Hint: The . character indicates the current directory -where you are now. There is a command to tell you which program would run without running it. You can make an runable xeyes in your directory by creating the file called xeyes (eg. touch xeyes) and then making it executable (runable) with chmod +x xeyes 4 TAB completion: The TAB key attempts to complete the current word you are typing at the command line. Which files does the shell examine for completions to the first word on command line? 5 TAB completion: Which files does the shell examine for completions to the second word z se cond part of commandl a command line? They use built ins to chec complete and compge