What is Open Source Technology ?
=> In simple term open-source software is software whose source code is published and made available to the public, enabling anyone to copy, modify and redistribute the source code without paying royalties or fees. Open Source code can evolve through community co-operation. These communities are composed of individual programmers as well as large companies.
Linux , Apache, MYSQL & Php are some of the open-source software service Benefits. Use gor the development and hosting of our popular BWEB content management software.
Explain file system hierarchy ?
=> File system hierarchy standard describes directory structure and its content in unix and unix like operating system. It explains where file and directories should be located and what it should contain.
Only linux distributions follow the fHS and that to do partially. Because every distro have their own policy due to which you may notice some differences in the directory tree structure of different distros.
If you want to find out information about your system's FHS, enter the command 'man nier'. It will display directory structure of your system.
Explain the following commands :-
a) ls ---->
ls command is used to list directory.
b)man---->
The man command is short for manual and provides in depth information About the the requested command or allows user to search for command related to a particular world.
c)grep---->
It scans its input for a pattern and displays lines containing to pattern, the lines number of files where the pattern occurs.
grep option pattern file name (s).
d)short ---->
Shrorting is the ordering of data in ascending or descending order.
e)who---->
The 'who' command is used to get information about currently logged in
on to system.
f) tty---->
Print file name or standard input's terminal.
g)head & tail---->
The 'head' command, as name implies, displays the top of the file. When used without an option, it display first 10 line of the code.
head.emp.list---> shows the file 10 lines.
The tail has more options the command displays the end of the file. It provides an addition method of addressing lines and like head, it display the last 10 by default.
tail.tll.emp. list
h)pwd---->
pwd command shows you what your present working directory is.
i)cat and touch ---->
Cat command allow us to create single or multiple file, view contain of file, or concatenate file and re-direct output terminate .
Touch command is the easiest way to create new, empty file It is also used to change timestamp on existing files and directories.
How can we change the permission of the file and directory?
==> [ me linuxbox ME ] $ls -e
Dome-file- rw - wr - r - - 1 mE
me lo 97379 sep 26 18:48 some-file owner
--> The file some file "Some-file" is owned by user "mE"
--> User "mE" has the right to read and write this file.
--> The file owned by the group "mE".
--> Member of the group "mE" can also read and write this file.
--> Everybody else can read this file
{ me ૬ linux me } $ ls - e|bin|besh -rwxr - xr -x1 root not 36484 teb27 200/bin/besh
--> The file|bin|bash " is owned by user "root"
--> The super user has the right to read, write and execute this file.
--> Member of the group "root" can also read , write and execute this file.
--> Every body else can read and execute this file.
ã…¡ -------> File type , "ã…¡" indicates a regular file A.
rwr ------> Read, Write and execute permission for the owner of the file.
rwã…¡ -------> Read, Write and execute permission for members of the group owning the file.
rã…¡ã…¡ --------> Read, Write and execute permission for all other user.
chmod :----> Command is used to change the permission of a file or directory.
' ' ' ' ' ' ' ' '
r w x r w x r w x = 111 111 111
rwã…¡ rwã…¡ = 110 110 110
rwx ã…¡ã…¡ã…¡ ã…¡ã…¡ã…¡ = 111 000 000
-----> and so on.
rwx = 111 in binary 7
rwã…¡ = 110 in binary 6
r ã…¡ x = 101 in binary 5
r ã…¡ã…¡ = 100 in binary 4
Draw the architecture of unix system and describe each layer ?
-> Dos, windows are one the operating system and also there's another operating system linux/ unix.
-> Linux is a free open source, linux like operating system. It is available in several different distributions, including cent os, Debian, Ubuntu and Red Hat.
* Mostly it is used widely bt the web hosting companies and many other specialized applications.
Kernel-->
-> It is heart of linux OS.
-> It is core of OS.
-> The karnel act as an intermediate between the computer hardware and various programs/ application shell.
Shell-->
Shell is a user program or it's environment provided gor user instraction. Shell is an command language interpreter that execute comments read from the execute commands read from the standard input device { keyboard} or from a file.
How the read , write and execute permissions attached with a file are different from that attached to directory?
=> When applying permissions to directories on linux, the permission bits have different meanings than or regular files.
- The read bit (r) allows the affected user to list the files within the directory.
- The write bit (w) allow the affected user to create, rename , or delete files within directory, and modify the directory's attributes.
- The execute bit (x) allows the affected user to enter the directory, and access files and directories inside.
- The sticky bit (T, or t if the execute bit is set for others) States that files and directories within that directory may only be deleted or renamed by their owner.
- It is available on almost linux and unix system.
- 'Vi' can be used from any types of terminal.
- It is also called visual editor.
- It is like as notepad to write anything.
Modes of vi editor --->
Vi editor consist the three modes which one given below:
- Command mode
- Insert mode
- Ex - mode [ execute mode ]
Figure: Modes of vi editor |
1. Command mode
-> In this mode, commands are used to move around and edit text objects such as letters, words, sentences and paragraphs.
-> Pressing the 'ESC' key will return us to command mode if we want to resume ourselves that we should here a beep.
-> In command mode we can use several commands. i.e. [ i, I,o,O, a, A]
-> In the command mode, the commands are case sensitive.
Insert mode --->
In this modes we insert text into a buffer. There are several commands that we can use enter this mode.
Commands which is used in this mode are given below :-
A Append at the end of the current line.
I Insert the beginning of a line.
O Enter insert mode in a new line above the current cursor position.
a Enter insert mode, the characters type will be inserted after the current cursor position.
I Inserted before the cursor.
O Enter insert mode in a new below the current cursor position.
c Change to the end of the line from the current cursor position.
R Replace characters on the screen with a set of character ending with escape key.
S change an entire line.
C change until "cc" changes the current line . A count changes many time.
r Replace one character under the cursor.
s Substitute one character under the cursor , and goto insert mode . Specify a count to substitute a number of characters. A dollar sign ($) will be put at the last character to be substituted.
Execute mode :-
The vi editor is built upon another editor, called ex editor only edits line. From the vi editor we can use the : Command such as [ ": s" and ":w" ] the range must be specifies before the command.
: abstracting string.
Explain the advanced editing techniques?
=> There are a lots of techniques. Some of them are given below:-
- Making a line
- Vi line buffers [ yank command]
- Command line.
- Executing Unix command in vi
- Line numbers
- Sorting
- Moving Columns , manipulating fields and awk.
- Source code formatting c++/ java .
- Text formatting
- Macros
- Double spacing
- Delete all lines beginning with or matching pattern.
- Editing multiple files.
- Hyper - linking to in include files.
- Batch execution of vi from a command file.
Explain yank and put command with the example.
The 'vi' command is similar to the copy command in many editors. It copies the specified line from the content file using various command and put these commands to another location of the file.
y --> Copy current character
yy --> (yonk yonk ) copy the current line or single line defined by current cursor position in the buffer.
yt--> use fo multiple lines. yanks from current cursor position to the marked "t".
5yy ---> Copy [without cutting] 5 lines
5yb ----> yank fire words back.
put command :-
The vi command is similar to the paste command in many other editors. It will paste whatever is in buffer from the previous yank command.
p : ---> paaste the specified buffer before the current postiong or line. It no buffer is specified the "p" uses the general buffer.
P : ----> paaste the specified buffer the current position or line. If no buffer is specified the "p" uses teh general buffer.
What will happen on execution of following vi commands ?
j Move cursor down one line.
control + G Leave history searching mode without running command.
period The period (.) is short hand for the bash built in source . It will read and execute commands from a file in the current environment and return the exit.
show the octal representation of thse file permission.
=> a) rwx --- x --- w
=> 111 001 010
b) --- --- ---
=> 000 000 000
=>(0,0,0)octal
c) --- -xr --x
=> 1010 001
=> (5,1)octal
d) --- rwx ---
=> 111
=> (7)octal
Explain about file security in linux.
=> The linux security model is based on the one used on UNIX systems, and is as rigid as the UNIX security model, which is already quite robust. On a linux system, everyfile is owned by a user owner and don't belong to the group owning the file . For each category of users, read, write and execute permissions can be granted or denied.
We already used to long option to list files using teh ls -l command, through for other reasons. This command alos displays file permission for these three user categories; they are indicated by the nine characters that follow the first character , which is the file type indicator at the beginning of the file properties line. As seen in the example below:-
marise : -> -1 TO DO
-rw-rw-r-- 1 marise users 5 jan 15:39 TODO
marise : -> 1 s -l/bin/ls -rwxr-xr-x 1rorot 45948 Aug 9 15:01/bin/ls*
What is Searching and Submitting operation ?
=> Searching:
In case of vi-editor has two kind of searches.
----- String Search
----- Character Search
For string search, the \ and ? commands are used. These two commands differ only in the direction whre the search takes place.
- \ command :- The \ command searches forward [ downwards ] in the file.
- ? command :- The ? command searches backwards [upwards] in the file.
- The 'n' and 'N' commands repeat the previous search command in the same or opposite direction, respectively.
--> let us suppose we want to change just a few character and not the word. The substitude command(s) by itself, replaces a single characters.
--> The S command, as is usually the case with upper caase command.
C: Change to the end of the line from the current cursor position.
R: Replace to the end of the line from the current cursor position.
S: change the entire line.
C: change until "cc" changes the current line. A count changes that many lines.
What is shell ? Explain types of shell.
=> Shell is a user program or it's environment provided for user instruction. shell is an command language interpreter that execute commands read from the standard input device {keyboard } or from a file .
shell |
shell is not part of system kernel, but uses system kernel to execute the program, create file.
Types of shell :-
To find all available shell in your system type following command
$cat/etc/shell
To find your current shell type following command
$echo $shell
Explain features of vi editor?
=>
- It is available on almost all Linux and Unix system.
- Vi can be used from any type of terminal.
- It is also called visual editor.
- It is like as notepad, to write anything.
Features of vi editor:
Powerful undo features:-Speed :-
word and character:-
- The x-window system makes it possible to run graphical applications on linux. x is the responsible for the hardware related settings; for example mouse, keyboard and the monitor settings like refresh rate and resolution.
- The applications just talk to x and tell it what they want to display. X listens to the applications and converts the applications display commands into something that the graphics hardware can display.
- Microsoft windows is base on graphical user interface where we can control the application by pointing and clicking . But linux, just like unix or ms-DOS , is completely trend base.
- Because linux is text based, we run teh GUI on the top of it. In unix the GUI is called x-window system or c-for short.
fig: the architecture of x-window system. |
- The xterm client
- The x men client
- The x biff client
- The x edit client
- The x clock client ---> It display an analogue clock on your screen.
- x-term : our home base
- starting up term
- scrolling
- outing and posting selections.
- choosing fonts.
- blocks
- smacks
- Ghostview: Displaying post script.
- A simple virtual desktop, which provides automatic desktop scrolling when the pointers reaches the screen bounding.
- A programming interface for extensions allowing us to add new features to FVWM.
- Fully configurable desktop means which appear when we press the mouse buttons.
- an application displaying to a window of another display system.
- a system program controlling the video output of a pc.
- a dedicated piece of hardware.
- The window manager provide everything we need for controlling the window on our desktop but we may want to some addition features and window manager to take care of the desktop.
- A desktop manager takes care of whole desktop by providing and controlling additional features.
- The two big players in the desktop manager field are KDE [K desktop environment] and GNOME [GNU network object mode environment]
- include a single window manger which manages and control the behaviour of window .
- KDE called applets.
fig: some standard unix shell. |
pipe |
- Pipes is an operator, not a command . It tells the shell to immediately take the output of first command, which must be sent to standard output and convert or turn it into input for second command which must be get its input from standard input.
- A pipe operator receives its input from standard output and sends it to the next command through standard input.
0 Comments