OSY

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 21

Contents

SR. NO Topics

1. Linux Operating System


2. Aim Of The Project
3. Files And Directories In Linux
4. Linux Commands For File Operations
5. Execution Of Commands
6. Advantages Of The File Management
7. Advantages Of Linux Over Others OS
8. Conclusions And References
9. Project Report
Chapter 1

Linux Operating System

Linux operating system is one of the popular versions of the UNIX operating system, which is designed

to offer a free or low cost operating system for personal computer users. It gained the reputation as a fast performing

and very efficient system. This is a remarkably complete operating system, including a GUI (graphical user

interface), TCP/IP, the Emacs editor, can X Window System etc.

It is open source as its source code is freely available. It is free to use. Linux was designed considering UNIX

compatibility. Its functionality list is quite similar to that of UNIX.

Components Of The Linux OS :

1.1 Components Of Linux OS

Linux Operating System has primarily three components

1. Kernel − Kernel is the core part of Linux. It is responsible for all major activities of this operating system.

It consists of various modules and it interacts directly with the underlying hardware. Kernel provides the

required abstraction to hide low level hardware details to system or application programs.
2. System Library − System libraries are special functions or programs using which application programs or

system utilities accesses Kernel's features. These libraries implement most of the functionalities of the

operating system and do not requires kernel module's code access rights.

3. System Utility − System Utility programs are responsible to do specialized, individual level tasks

Basic Features :

Following are some of the important features of Linux Operating System.

4. Portable − Portability means software can works on different types of hardware in same way. Linux

kernel and application programs supports their installation on any kind of hardware platform.

5. Open Source − Linux source code is freely available and it is community based development project.

Multiple teams work in collaboration to enhance the capability of Linux operating system and it is

continuously evolving.

6. Multi-User − Linux is a multiuser system means multiple users can access system resources like memory/

ram/ application programs at same time.

7. Multiprogramming − Linux is a multiprogramming system means multiple applications can run at same

time.

8. Hierarchical File System − Linux provides a standard file structure in which system files/ user files are

arranged.

9. Shell − Linux provides a special interpreter program which can be used to execute commands of the

operating system. It can be used to do various types of operations, call application programs. etc.

Security − Linux provides user security using authentication features like password protection/ controlled

access to specific files/ encryption of data

Chapter 2
Aim Of The Project

The operating system is the system software which performs the basic tasks such as Process Management,

Memory Management, File System and control the execution of the user programs.

The Project entitled ‘File Operations In Linux ‘ is based on the study of the different file operations supported

by the Linux Operating system. And also deals with the different Linux Commands which performs the

various operations on the files.

The Linux OS provides shell or terminal that is used to type and execute the users typed commands For this

Project we have to. Know the basics of the operating system and especially the Linux Operating system

because entire project is based on it.

We have to execute the different commands for different types of file operations. The output of these

commands is seen on the Linux Shell or Linux Terminal.

The Operating system performs the following tasks for user Applications which are follows :

1. Process Management

2. Memory Management

3. File Management

4. I/O Device Management

5. Protection and Security

6. User Interface

7. Booting to the Computer

Out of the these we have to deals with the File Management System which the important duty of the operating

system.

Chapter 3
File And Directory Structure In Linux

The file is nothing but the collection of information that is created by its creator, these files are stored on secondary

storage disk on the computer. The important function of the operating system is to support the file system

manipulation.

Every operating system has a particular structure of files and directories stored in the system. Here we have to deals

with the Linux File System structure.

Directory Structure

Unix uses a hierarchical file system structure, much like an upside-down tree, with root (/) at the base of

the file system and all other directories spreading from there.

A Unix file system is a collection of files and directories that has the following properties –

The following picture shows the complete directory structure of the Linux Operating system

The directories have specific purposes and generally hold the same types of information for easily

locating files. Following are the directories that exist on the major versions of Unix –

Everything on your Linux system is located under the / directory, known as the root directory. You can

think of the / directory as being similar to the C:\ directory on Windows – but this isn’t strictly true, as

Linux doesn’t have drive letters. While another partition would be located at D:\ on Windows, this other

partition would appear in another folder under / on Linux.


The following picture shows the important directions in the Linux Operating system.

Fig 1.4 Important Linux Directories


Chapter 4

Linux Commands For File Operations

The following are the list of same basic Linux Commands which are
used to perform various operations on the given file as a input.

Sr.No. Command & Description

1
cat filename

Displays a filename

2
cd dirname

Moves you to the identified directory

3
cp file1 file2

Copies one file/directory to the specified


location

4
file filename

Identifies the file type (binary, text, etc)

5
find filename dir

Finds a file/directory

6
head filename

Shows the beginning of a file


7
less filename

Browses through a file from the end or the


beginning

8
ls dirname

Shows the contents of the directory specified

9
mkdir dirname

Creates the specified directory

10
more filename

Browses through a file from the beginning to


the end

11
mv file1 file2

Moves the location of, or renames a


file/directory

12
pwd

Shows the current directory the user is in

13
rm filename

Removes a file

14
rmdir dirname

Removes a directory

15
tail filename

Shows the end of a file


16
touch filename

Creates a blank file or modifies an existing file


or its attributes

17
whereis filename

Shows the location of a file

18
which filename

Shows the location of a file if it is in your


PATH
Chapter 5

Execution Of The File Commands

In order to execute the different file operation commands we must know


about the Linux shell and how it work.

 The shell is a user program or it is an environment provided for user interaction.

 It is a command language interpreter that executes commands read from the standard input device such as

keyboard or from a file.

 The shell gets started when you log in or open a console (terminaThe following picture shows an example

of the Linux terminal or shell used for executing the different commands.

Fig Linux Shell

Execution Of Commands
Listing Files
To list the files and directories stored in the current directory, use the following command −

$ls

Output

Creating Files

In the following example we are creating a new file named file1.txt :

Cat filename> Example


Displaying The Content Of File

Syntax:- cat filename

Example :-

Copying Files
To make a copy of a file use the cp command. The basic syntax of the command is −
$ cp source file destination file
Output
Change Directory

cd command is used to change the current directory

Syntax :- cd dirname

Example :-

Making The directories

The mkdir command is used to make a directory

Syntax :- mkdir directory name

Example :-
Counting Words in a File
You can use the wc command to get a count of the total number of lines,
words, and characters contained in a file. Following is a simple example to
see the information about the file created above –

Syntax :- wc filename

Example :-

Showing The beginning of File

The head command is used to display the beginning of the File.

Syntax :- head filename

Example :-
Deleting Files
To delete an existing file, use the rm  command. Following is the basic
syntax −
$ rm filename

Example:-

Moving The Files


from source directory to destination directory

The mv command is used to move files from source to destination

Syntax :-

mv src_filename dest_directory

Example :-
Finding Files And Directories

The find command is used to find files and folders in your system

Syntax :-

find filename

find Directory_name

Example

Deleting The Directories


The rmdir command us used to delete the folders in your
system.
Syntax :- rmdir Directory_name

Example:-
Exiting From Terminal
To exit from Linux Shell just type exit command and
press
Enter key.

Example
Chapter 6

Advantages Of The Linux OS

The main Advantages of Linux over other Operating system are follows:

Open source

Linux is an Open source operating systems. You can easily get the source code for Linux and edit it to develop your
personal operating system. Today, Linux is widely used for both basic home and office uses. It is the main operating
system used for high performance business and in web servers. Linux has made a high impact in this world.

Low cost

There is no need to spend time and huge amount money to obtain licenses since Linux and much of it's software
come with the GNU General Public License. There is no need to worry about any software's that you use in Linux.
Stability

Linux has high stability compared with other operating systems. There is no need to reboot the Linux system to
maintain performance levels. Rarely it freeze up or slow down. It has a continuous up-times of hundreds of days or
more.

Performance

Linux provides high performance on various networks. It has the ability to handle large numbers of users
simultaneously.

Flexibility

Linux is very flexible. Linux can be used for high performance server applications, desktop applications, and
embedded systems. You can install only the needed components for a particular use. You can also restrict the use of
specific computers.

Compatibility

It runs all common Unix software packages and can process all common file formats.

Security

Linux is one of the most secure operating systems. File ownership and permissions make linux more secure.

Networking

Linux provides a strong support for network functionality; client and server systems can be easily set up on any
computer running Linux. It can perform tasks like network backup more faster than other operating systems.

Multitasking

Linux is a multitasking operating system. It can handle many things at the same time.

Fast and easy installation

Linux distributions come with user-friendly installation.

Better use of hard disk

Linux uses its resources well enough even when the hard disk is almost full.

Wider Choice

There is a large number of Linux distributions which gives you a wider choice. Each organization develop and
support different distribution. You can pick the one you like best; the core function's are the same.
Chapter 7

Conclusions and References

Conclusion :- The Project entitled ‘Files Operations In Linux Operating System ‘is was

Based on the basic study of the Linux OS and its File Management Organization. By doing this project we got the
knowledge about operating system and its File System which is an important duty of any operating system.

We have see the File hierarchical structure of Files in Linux and we haca executed different Linux Commands for
performing the various operations on the files.

This project clears some basic concepts regarding the File System Manipulation in Linux Operating System.

So, in this way we have completed the Micro Project ‘Different File Operation In Linux OS successfully and
learned many new things and concepts during this project.

References :-
Websites :-

1. https://www.tutorialspoint.com/operating_system/
2. https://www.javatpoint.com/os-tutorial
3. https://www-geeksforgeeks-
4. https://www.guru99.com/must-know-linux-commands.html

Books :-

1. Operating system (Technical Publication)


2. Operating system (Tech-Knowledge Publication)

You might also like