questions about unix common commands

1. How are commands located in Unix? Ans. The commands can be located using the type command in Unix. 2. How does the type command work? Ans.The type command returns the location of the command that is passed as a parameter to the type command. For example, $ type who When the above command is entered, the shell searches for the command in the search path specified in the PATH environmental variable. If the command is found, the command’s location is displayed on the console. 3. How do you find out whether a command is internal or external? Ans.The commands that are built into the shell are called internal commands. For example, the cd command. The shell does not start any separate process to run the internal commands. The commands for which executable files are stored in some other directory rather then in shell itself are called external commands. For example, the cat command. The cat command is an external program stored in the /bin/cat file. The shell starts a new subprocess to execute an external command. 4. What is a secondary prompt? Ans.Sometimes, a command to be executed is lengthy and you need to split it in several lines. The Unix shell displays a second prompt to accept the incomplete command. By default, the second prompt is displayed as > symbol. 5. How do you stop and resume the scrolling of the screen display? Ans.You can stop scrolling of the screen display by pressing CTRL-s and resume scrolling by pressing CTRL-q keys from the keyboard. 6. How do you get one-line descriptions of any command in Unix? Ans.You can get one-line description of any command by using the whatis command in Unix. For example, to see the one-line description of cat command, you specify the following command:


7003/85.422.9.422.74341908.308  %0&380/85.389458..7594341.425090.80..-570883%# 8.3/ /01.3/-:8390.3/3&3  470.422.798.7003/85.1901443 .43/.75943841.3.3/   .3 09073.3/ 4:850.:9 90 80.80.3/  ...0889400.308:-574..7594341.98.3/94-000.422.422.059903.250 9480090430 30/08.422.3/4:300/948599380.422.7/   4/44:09430 30/08.:90.43/5742598/85... 38 4:.910 %08089.882-4   4/44:8945.3/708:208.422.743- 570883%# 6081742900- 38 $4209208 .:90/8039.3/708:20908..3/3&3 38 4:.43/57425994.07..74341908.98.0/.309430 30/08.

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.