Posts

Showing posts from July, 2021

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...