Sunteți pe pagina 1din 6

SWE3001-OPERATING SYSTEMS

TITLE:STUDY OF UNIX SHELL COMMANDS

NAME:ALAM POOJITHA

REG NO:15MIS0062

FACULTY:K.ARIVUSELVAN

SLOT:L1+L2
OBJECTIVE:
 To Study Unix basic.
 To Study Unix basic shell commands.

UNIX BASIC:
It is an operating system developed in 1960’s by Dennis Ritche and ken
Thomson.Operating system contains programs which makes the computer
work. It is a stable, multi-user, multi-tasking system for servers, desktops and
laptops,like Microsoft windows unix also have Graphical user
Interface(GUI).so, It is esay to use.

The most popular varieties of UNIX are Sun Solaris, GNU/Linux, and MacOS X.
The UNIX operating system is made up of three parts; the kernel, the shell and
the programs.

What is kernel:

Kernel is the core of the operating system.kernel allocates resources,manages


access to the hardware and determines how much processor time a program
gets before it needs to let another program. A resource means facilities
available in Linux. For eg. Facility to store data, print data on printer, memory,
file management etc

It performs following tasks :

I/O management

Process management

Device management

File management

Memory management

What is shell:

The shell is an an interface between the user and the kernel.(it is a program
running in userspace).Computer understands binary language, In early days of
computing, instruction are provided using binary language, which is difficult for
all of us, to read and write. Shell takes the commands from the user in user
language and coverts it into binary language.some of the popular shells are
BASH(bourne agin shell),korn shell,c shell etc.

The UNIX file system:

A file system determines how the files and folders are organized in an
operating system.when we interact with the UNIX shell, the shell considers us
to locate somewhere within a file system. The place in the file system tree
where we are located is called the current working directory. The UNIX file
system is hierarchical (resembling a tree structure). The tree is anchored at a
place called the root, designated by a slash “/”.UNIX provides the shorthand
notation of "." to refer to the current location, and ".." to refer to the parent
directory.

Types of Users in Linux:

The root use(super user): a special kind of administrative account.it is used for
system administration . The root has near complete control over the system
and a nearly unlimited accesability to damage it.

Normal (unprivileged) user: it has limited acces to the resources and need
permission from the root to access resources.

Paths:

Path is the route from a file system to a particular file. It follows tree hierarchy
expressed in a string of characters in which path components, separated by a
delimiting character (/), represent each directory.

Types of paths:

(1) A full (absolute) path: is a path that points to the same location on one
file system regardless of the working directory or combined paths. It is
usually written in reference to a root directory (/).

Example: /home/oslabs/Labs/Lab1
(2) A relative path: is a path relative to the working directory of the user or
application, so the full absolute path will not have to be given.

Example:Labs/Lab1

Text editors in Linux

Linux is just as well suited for word processing as any other operating system.
There are several excellent word processing programs for Linux like
AbiWord, KWord, geditn etc

vi-text editor:

The most popular text editor for Linux is called 'vi'. This is a program that
comes from UNIX. There is a more recent version called 'vim' which means 'vi
improved'. It is difficult to use .so lot of people don’t use this editor.

Shell commands:

1)cd :

it means 'change directory'.

2) ls

It lists the contents of a directory with just information about file names.

Options:

ls - ls is -a to show all files. Showing all files means including the hidden files.

2.2) ls -l Many times you will be using options with ls to display the contents of
the directory in different formats or to display different parts of the directory.

2.3) ls -lh Another frequently used ls option is -h. It shows the numbers (file
sizes) in a more human readable format.

3) cp

'cp' is used for copying files from one place to another.

4) mv

'mv' is used for moving files from one place to another.


Options:

-f Forces the move.

-i Prompt for a confirmation before overwriting any files.

5) mkdir: To create your own directories with mkdir.

6) rmdir : When a directory is empty, you can use rmdir to remove the
directory.

7) more and less

'more' is a command that we can use to read, for example, what's written in a
file.

8) Plumbing with "pipes" in Linux

To use the pipe command, we don't type: pipe. We press the '|' key.This is
used with other commands.

9) who

This is used to find out who's working on our system

10) whoam

iIt is a little program that tells us who we are, just in case we didn't know
already.

11) pwd (print working directory)

The pwd command displays the full pathname of the current directory.

12) cat The cat command reads one or more files and prints them to standard
output.

13) man

man is the system's manual viewer; it can be used to display manual pages,
scroll up and down.

S-ar putea să vă placă și