Posts

Disk Management In Operating System

Image
 Disk Management  Disk is a secondary storage device that is used to store data.  The external devices such as hard disk, magnetic disks and floppy disks stores data in the sectors.  These devices provide the data to user programs by means of I/O requests.  Disk Management is an important function of operating system and includes disk buffering and management of swap area and disk cache.  Disk Structure  Disks provide a means to store a large amount of information for modern computer.  A disk is usually divided into tracks, cylinder and sectors.  Below fig shows the various components of a disk system.  Data is stored on a series of magnetic disks called platters. These disks are connected by a common spindle that spins at very high speed (some spindle rotate at speeds of 3600 revolutions per minute).  The two surfaces of a platter are covered with a magnetic material similar to that on a magnetic tape. Information is recorded mag...

Inserting Files in Linux Operating System

 Linux Operating System  Inserting Files :  Let us assume that two people have worked on a project. To cut down on time they have split up writing the report. To combine the finished reports together, they can use the facility provided by 'vi' to insert files into the currently open the document. This can be done by opening the file that contains the first part of the report and positioning the cursor at the end of the report file. After this is done, the 'vi' mode has to be switched to command mode by pressing the 'esc' key.  1. Create a file as first report and insert lines as shown below, save it by pressing wq at the command prompt.  [user1 @linux-mac user1]$cat>>first_report  line1 of report 1 line2 of report 1 line3 of report 1 2. Create a file as second report and insert lines as shown below, save it by pressing by wq at the command prompt.  [user1 @linux-mac user1]$cat>>second_report This is the second report  Line1 of rep...

Text Editor in Linux Operating System

 Introduction  An editor is a program used to edit files. Files can be of different types such as : Text Files, Graphic Files etc. Depending upon what they contain.   An editor is a program used to edit files that contain text only. For e.g. : A letter of source code of a program.  Linux offers editors such as 'PICO', 'VI' and many others.  The 'VI' Editor  The vi (visual) editor is a full screen editor. This means that you will be able to position the cursor to the location in the file where you want to place the changes and addition.  The changes that you make will reflect on the screen. Vi will work with many different types of terminals if u set the terminal type correctly before invoking the editor.  Vi editor is one of the most powerful and earliest editor available in Linux and Unix environment.  VI Basic Concepts  The three models of operation in vi are :  1. Command Mode   2. Insert or Input Mode  3...

Filters in Linux Operating System

Image
 FILTERS  A filter is a program that reads data from the output of another program or the standard input, processes it in some way, and sends the processed data to standard output or to another program.  There are many filters that are available in linux.  'wc' Command  'wc' stands for 'word count'. The 'wc' command counts the 'lines' , 'words' and 'characters' in a specified file.  Syntax : wc [options]  [filename]  [user1 @linux-mac user1] $ wc names     1          5          22            names  Option                  Purpose             -c          Prints only the character count  -w         Prints only the word count   -l           Prints only the line count  's...

Editors in Linux Operating System

Image
 Editors  In Unix, a text file is created and modified by a program, called text editor or simply editor. Unix operating system also comes with several editors.  Types Of Editors : LINE EDITORS : The Unix editors that edit processes one line at a time are called line editors. Common example are ED and EX.  SCREEN EDITORS : Editors that makes use of whole screen for editing or processing more than one line at a time are called screen editor. With screen editor you can display and edit many lines by giving a single command. Example Vi.  Various Commands of Linux  Listing of files  '1s' command lists the files in the specified directory.  Syntax : 1s[options]  At the command prompt type 1s  [user1 @linux-mac user1]$ 1s The screen will look like this, because we have not created any directory or file.  [user1 @linux-mac user1]$ 1s [user1 @linux-mac user1]$ Find Out Where You Are  The command used for this purpose is 'pwd'. Thi...

Linux Operating System

Image
 Linux Operating System Linux is an operating system that is modeled on UNIX operating system and is advanced version of UNIX.  Linux was originally developed by Linus Torvalds at the University of Helsinki.  It was initially developed for Intel 80386 processor based IBM compatible personal computer.  Over the years Linux has been ported to other platforms based on different processor architectures such as DEC (now HP) Alpha, Sun, SPARC, Motorolla etc.  Linux is an open source product and its source code is easily available.  It is a multi user system which means that more than one user can work at the same computer system at the same time.  It also supports multi - tasking that means more than one program can be made to run at the same time.  These important characteristics have helped it gain widespread acceptance among a large variety of users.  The various features of Linux are :-  Portability  The Strong thing about Linux...