Shell Scripting

LINUX: Process handling

What is a Process?

Process is kind of program or task carried out by your PC.

For e.g. $ ls -lR , ls command ( a request to list files in a directory and subdirectory in your current directory) - It is a process.

Ubuntu Files Tree Overview

Main directories

Name of common directories of linux file tree have been listed and described below: (ubuntu)

NOTE: “/”slash denotes root

TYPES OF PERMISSIONS

Depending upon owner, group and others, a file or folder can have three types of permission, namely –READ (r or 4) , WRITE (w or 2) and EXECUTE (x or 1).

Interpretation of permissions for files

vi-Editor at a glance

To open a new or an existing file in vi use the following command in terminal:

$vi filename

Now use the following shortcuts for file editing.

Any programming language need variables, loops, arrays, …

So let’s start with discussing variables in Shell Script:

In Linux (Shell), there are two types of variables:

System variables - Created and maintained by Linux itself. This type of variable defined in CAPITAL LETTERS

if-then-else-if

if condition is used for decision making in shell script.

If given condition is true then command1 is executed as shown below.


Syntax: