Você está na página 1de 18

GROUP 1 QUESTION PAPER MAY 2011

PRESENTED BY, NEENA JOSEPH

3 marks
Which are widely used shells in Linux? A shell is any program that takes input from the user, translates it into instructions that the operating system can understand, and conveys the operating system's output back to the user.

Sh simple shell BASH Bourne Again Shell KSH Korne Shell CSH C Shell SSH Secure Shell

SH (BOURNE SHELL) The sh shell was the earliest shell, being developed for UNIX back in the late 1970s. It is the most Popular-that is why it is bundled with every Unix System This is the shell used by many Unix users Steve Bournes Creation CSH (C SHELL) The csh shell was originally developed for BSD UNIX. It uses a syntax that is very similar to C programming. Created by Bill Joy Two Advantage over Bourne Shell 1. Allows Aliasing of commands- you can decide what name you want to call command by. Instead of typing lengthy commands you simply use short alias at the command line.

2. Command history feature Previously typed commands can be recalled, since C shell keeps track of all commands issued at the command line.

Korn shell
Very powerful Super set of Borne Shell Designed by David Korn of AT & T Bells Labs Offers lot more capabilities and decidedly more efficient than the other

BASH (BOURNE-AGAIN SHELL) The bash shell is an improved version of the sh shell and is one of the most popular shells today. Its the default shell used by most Linux distributions. TSCH The tsch shell is an improved version of the C Shell. It is the default shell used on FreeBSD systems. ZSH (Z SHELL) The Z Shell is an improved version of the bash shell.

9 marks
Explain any two text editors in detail?

Vi
The visual editor on the Unix.
a very powerful

There are two modes in vi


Command mode Input mode

Editing Commands (Within Command Mode)


Error Correction CTRL-h Delete a letter CTRL-w Delete a word CTRL-u Delete a line d Deletes current character dw Deletes to the end of the word dd Deletes the current line u Undo. Undoes the last operation that user performed

To exit from vi
:q <enter> is to exit, if you have not made any changes to the file :q! <enter> is the forced quit, it will discard the changes and quit :wq <enter> is for save and Exit :x <enter> is same as above command ZZ is for save and Exit The ! Character forces over writes, etc. :wq!

The standard keys for moving cursor are: h - for left l - for right j - for down k - for up w - to move one word forward b - to move one word backward $ - takes you to the end of line <enter> takes the cursor the the beginning of next line

Control-d scrolls the screen down (half screen)

Control-u scrolls the screen up (half screen)


Control-f scrolls the screen forward (full screen) Control-b scrolls the screen backward (full screen).

Copy, cut and paste in vi


yy - (yank) copy current line to buffer nyy - Where n is number of lines p - Paste the yanked lines from buffer to the line below

PICO
Pico is an easy-to-use editor that resembles Pine. simplified version of emacs. Although it lacks most of emacs' sophisticated functions. Unlike emacs, pico is a shell or terminal-based editor only. There are no added benefits of running pico under X window. There is no toolbar, but pico always displays a list of commands at the bottom of the screen. Pico does not have as extensive of a tutorial as EMACS, but it does offer a built in help screen. To access it type ctrl-g.

Commands In PICO
^G - Display help. ^X - Exit pico, saving buffer. ^O - Saves the current buffer to a file. ^^ - Mark cursor position as beginning of selected text. ^K - Cut selected text. Note: The selected text's boundary on the cursor side ends at the left edge of the cursor. ^U - Paste last cut text at the current position. ^W - Search for text. ^T - Invoke the spelling checker. ^L - Refresh the display. ^J - Format (justify) the current paragraph.

Contd.
^V - Move forward a page of text. ^Y - Move backward a page of text.

^F - Move forward a character. ^B - Move backward a character. ^P - Move to the previous line. ^N - Move to the next line. ^A - Move to the beginning of the current line. ^E - Move to the end of the current line.
^C - Report current cursor position. ^D - Delete the character at the cursor. ^I - Insert a tab at the cursor. ^R - Insert an external file at the cursor.

Create the file Hello pico hello.pl Run it! ./hello.pl

Você também pode gostar