You are on page 1of 31

BCD or Binary Coded Decimal

BCD or Binary Coded Decimal is that number system or code


which has the binary numbers or digits to represent a decimal
number.
A decimal number contains 10 digits (0-9). Now the equivalent
binary numbers can be found out of these 10 decimal numbers. In
case of BCD the binary number formed by four binary digits, will be
the equivalent code for the given decimal digits. In BCD we can use
the binary number from 0000-1001 only, which are the decimal
equivalent from 0-9 respectively. Suppose if a number have single
decimal digit then its equivalent Binary Coded Decimal will be the
respective four binary digits of that decimal number and if the
number contains two decimal digits then its equivalent BCD will be
the respective eight binary of the given decimal number. Four for
the first decimal digit and next four for the second decimal digit. It
may be cleared from an example.
Let, (12)10 be the decimal number whose equivalent Binary coded
decimal will be 00010010. Four bits from L.S.B is binary equivalent
of 2 and next four is the binary equivalent of 1.
Table given below shows the binary and BCD codes for the decimal
numbers 0 to 15.
From the table below, we can conclude that after 9 the decimal
equivalent binary number is of four bit but in case of BCD it is an
eight bit number. This is the main difference between Binary
number and binary coded decimal. For 0 to 9 decimal numbers both
binary and BCD is equal but when decimal number is more than one
bit BCD differs from binary.

Decimal number

Binary number

Binary Coded Decimal(BCD)

0000

0000

0001

0001

0010

0010

0011

0011

0100

0100

0101

0101

0110

0110

0111

0111

1000

1000

1001

1001

10

1010

0001 0000

11

1011

0001 0001

12

1100

0001 0010

13

1101

0001 0011

14

1110

0001 0100

15

1111

0001 0101

Gray Code

Code is a symbolic representation of discrete information. Codes are


of different types. Gray Code is one of the most important codes. It
is a non-weighted code which belongs to a class of codes called
minimum change codes. In this codes while traversing from one
step to another step only one bit in the code group changes. In case
of Gray Code two adjacent code numbers differs from each other
by only one bit. The idea of it can be cleared from the table given
below.
As this code it is not applicable in any types of arithmetical
operations but it has some applications in analog to digital
converters and in some input/output devices. Now let us
concentrate on the table of Gray Code given below where we can
find the difference of binary code from gray code while traversing
through the table for their respective decimal numbers.

From this table we can obtain the equivalent gray code of the
decimal numbers. There are several steps which will make you
understand how the codes are formed.
(1) In case of gray code one bit will change from its previous in
each steps. One thing must be kept in mind that the change of bit
always occurs from the right side i.e from L.S.B towards the M.S.B.
At first the first three bits are constant I,e 000 and the fourth bit
changes from 0 to 1. We know that for binary digit possible

combination is 0 and 1, so keeping first three bit constant the


possible combination of 4th bit is over for decimal 0 and 1
respectively.
(2)Now move to the next bit from L.S.B i.e 3rd bit, that changes
from 0 to 1 which is the decimal equivalent for 2. Now one more
combination is left for the fourth bit keeping the first three constant
i.e 001. We can change 4th bit from 1 to 0. Thus the gray code for
decimal number 3 is 0010.
(3)Traverse to the next code. Here we can do only one thing i.e we
can change the second bit as all possible combinations are over.
Question may strike in your mind that why cant we change the
third bit again which will also be a one bit change from its previous.
But changing third bit would give the equivalent gray code 0000
which has occurred earlier. So you must remember that a number
occurring previously must not be repeated. So the equivalent code
for 4 will be 0110. Here only the second bit has changed from the
previous code. Now again we will keep first and second bit constant
and find the possible combinations of the third and the fourth bit by
only changing 1 bit in each steps.
Now for 5 only the fourth bit has changed. Again for 6 only the third
bit is changed keeping others constant. Lastly at 7 again the fourth
bit has changed from 1 to 0 where all other bits are constant. In 8
you can see that the equivalent gray code is 1100. Here the 1st bit
changes from 0 to n1 as all the combination of the 2nd,3rd and 4th
bits are completed keeping the 1st constant at 0. Now in same way
the 1st bit is kept constant and all the possible combination
changing single bit in each step from right to left is done.

Binary to gray code conversion

Binary to gray code conversion is a very simple process. There


are several steps to do this types of conversions. Steps given below
elaborate on the idea on this type of conversion.
(1) The M.S.B. of the gray code will be exactly equal to the first bit
of the given binary number.
(2) Now the second bit of the code will be exclusive-or of the first
and second bit of the given binary number, i.e if both the bits are
same the result will be 0 and if they are different the result will be
1.
(3)The third bit of gray code will be equal to the exclusive-or of the
second and third bit of the given binary number. Thus the Binary to
gray code conversion goes on. One example given below can
make your idea clear on this type of conversion.
Let (01001) be the given binary number

Thus the equivalent gray code is 01101.


Now concentrate on the example where the M.S.B. of the binary is 0
so for it will be 0 for the most significant gray bit. Next, the XOR of
the first and the second bit is done. The bits are different so the
resultant gray bit will be 1. Again move to the next step, XOR of
second and third bit is again 1 as they are different. Next, XOR of

third and fourth bit is 0 as both the bits are same. Lastly the XOR of
fourth and fifth bit is 1 as they are different. That is how the result
of binary to gray code conversion of 01001 is done whose
equivalent gray code is 01101.
Gray code to binary conversion

Gray code to binary conversion is again very simple and easy


process. Following steps can make your idea clear on this type of
conversions.
(1) The M.S.B of the binary number will be equal to the M.S.B of the
given gray code.
(2) Now if the second gray bit is 0 the second binary bit will be
same as the previous or the first bit. If the gray bit is 1 the second
binary bit will alter. If it was 1 it will be 0 and if it was 0 it will be 1.
(3) This step is continued for all the bits to do Gray code to binary
conversion.
One example given below will make your idea clear.
Let the gray code be 01101

The M.S.B of the binary will be 0 as the M.S.B of gray is 0. Now


move to the next gray bit. As it is 1 the previous binary bit will alter
i.e it will be 1, thus the second binary bit will be 1. Next look at the
third bit of the gray code. It is again 1 thus the previous bit i.e the

second binary bit will again alter and the third bit of the binary
number will be 0. Now, 4th bit of the given gray is 0 so the previous
binary bit will be unchanged, i.e 4th binary bit will be 0. Now again
the 5th grey bit is 1 thus the previous binary bit will alter, it will be
1 from 0. Therefore the equivalent Binary number in case of gray
code to binary conversion will be (01001)

Alphanumeric codes
Alphanumeric codes are sometimes called character codes due to
their certain properties. Now these codes are basically binary codes.
We can write alphanumeric data, including data, letters of the
alphabet, numbers, mathematical symbols and punctuation marks
by this code which can be easily understandable and can be
processed by the computers. Input output devices such as
keyboards, monitors, mouse can be interfaced using these codes.
12-bit Hollerith code is the better known and perhaps the first
effective code in the days of evolving computers in early days.
During this period punch cards were used as the inputting and
outputting data. But nowadays these codes are termed obsolete as
many other modern codes have evolved. The most common
alphanumeric codes used these days are ASCII code, EBCDIC
code and Unicode. Now we will discuss about them briefly.

ASCII CODES
ASCII stands for American Standard Code for Information
Interchange. Computers can only understand numbers, so an
ASCII code is the numerical representation of a character such as
'a' or '@' or an action of some sort. ASCII was developed a long

time ago and now the non-printing characters are rarely used for
their original purpose. Below is the ASCII character table and this
includes descriptions of the first 32 non-printing characters. ASCII
was actually designed for use with teletypes and so the
descriptions are somewhat obscure. If someone says they want
your CV however in ASCII format, all this means is they want
'plain' text with no formatting such as tabs, bold or underscoring the raw format that any computer can understand. This is usually
so they can easily import the file into their own applications
without issues. Notepad.exe creates ASCII text, or in MS Word
you can save a file as 'text only'

EBCDIC code
The EBCDIC stands for Extended Binary Coded Decimal Interchange
Code. IBM invented this code to extend the Binary Coded Decimal
which existed at that time. All the IBM computers and peripherals
use this code. It is an 8 bit code and therefore can accommodate
256 characters. Below is given some characters of EBCDIC code to
get familiar with it.
Char

EBCDIC

HEX

Char

EBCDIC

HEX

Char

EBCDIC

HEX

1100 0001

C1

1101 0111

D7

1111 0100

F4

1100 0010

C2

1101 1000

D8

1111 0101

F5

1100 0011

C3

1101 1001

D9

1111 0110

F6

1100 0100

C4

1110 0010

E2

1111 0111

F7

1100 0101

C5

1110 0011

E3

1111 1000

F8

1100 0110

C6

1110 0100

E4

1111 1001

F9

1100 0111

C7

1110 0101

E5

blank

...

...

1100 1000

C8

1110 0110

E6

...

...

1100 1001

C9

1110 0111

E7

...

...

1101 0001

D1

1110 1000

E8

...

...

1101 0010

D2

1110 1001

E9

...

...

1101 0011

D3

1111 0000

F0

...

...

1101 0100

D4

1111 0001

F1

...

...

1101 0101

D5

1111 0010

F2

...

...

1101 0110

D6

1111 0011

F3

System Calls &Categories of System Calls

System calls provide an interface between the process an the operating system. These calls are
generally available as Assembly language instruction.System Calls can also be made directly
through HLL programs for certain systems.UNIX System calls can be invoked directly from a C
or C++ program.System calls allow user-level processes to request some services from the
operating system which process itself is not allowed to do. In handling the trap, the operating
system will enter in the kernel mode, where it has access to privileged instructions, and can
perform the desired service on the behalf of user-level process. It is because of the critical nature
of operations that the operating system itself does them every time they are needed. For example,
for I/O a process involves a system call telling the operating system to read or write particular
area and this request is satisfied by the operating system.System programs provide basic
functioning to users so that they do not need to write their own environment for program
development (editors, compilers) and program execution (shells). In some sense, they are
bundles of useful system calls.

How System Calls Occur?


System Calls occur in different ways depending on the computer in use:More information is
required than just the identify of the desired System call.The exact type and amount of
information varies according to the operation system and call.
For instance to get an input we need to specify the file of device to use as source and the address
and length of memory buffer into which the input should be read.

An Example of how system calls are used.

Consider a simple program to copy data from one file to another file .The first input of the
program will be the name of both files.These names can be specified depending on the design of
Operation System.Once the file names are obtained,the program opens an input file and create
an output file.Each of this operations require other System calls and may encounter possible
error conditions.
Methods of Passing Parameters to Operating System
Three methods are used in passing parameters to the operation system.

The simplest is approach is to pass parameter through registers.


The second is by storing parameters in blocks and passing the address through registers.
Finally parameter can be pushed into stack by the program and popped of by the Operating
System.

Categories of System Calls

System calls can be grouped into five major categories as follows.

Process control

File management.

Device management

Information Maintenance and

Communication.

Process control

Some system calls under process control are:

End, abort

Load, execute

Create process, terminate process

Get process, terminate process

Wait for time

Allocate and free memory

File management

Some system calls under file management are:

Create file, delete file

Open , close

Read, write, reposition.

Get file attributes, set fil attributes

Device management

Some system calls under device management are:

Request Device, release device

Read, write, reposition.

Get device attributes and set device attributes

Logically attach or detach devices

Information Maintenance

Some system calls under information maintenance are:

Get time or date, Set time of date

Logically attach or detach devices

Information maintenance

Get system data, Set Systems data

Get process, file of device attributes

Set process, file or device attributes

Communication

Create, delete communication connection.

Send, receive messages

Transfer status information

Attach or detach remote devices.

System Call of Process Control


fork()
NAME
fork - create a child process
SYNOPSIS
#include <sys/types.h>
#include <unistd.h>
pid_t fork(void);
DESCRIPTION
fork() creates a child process that differs from the parent process only in its PID and PPID, and in
the fact that resource utilizations are set to 0. File locks and pending signals are not inherited.
Under Linux, fork() is implemented using copy-on-write pages, so the only penalty that it incurs
is the time and memory required to duplicate the parents page tables, and to create a unique task
structure for the child.
RETURN VALUE
On success, the PID of the child process is returned in the parents thread of execution, and a 0 is
returned in the childs thread of execution. On failure, a -1 will be returned in the parents
context, no child process will be created, and errno will be set appropriately.
ERRORS
Error Code
EAGAIN

Description
fork() cannot allocate sufficient memory to copy the parents page tables
and allocate a task structure for the child.

EAGAIN

It was not possible to create a new process because the callers


RLIMIT_NPROC resource limit was encountered. To exceed this limit,
the process must have either the CAP_SYS_ADMIN or the
CAP_SYS_RESOURCE capability.

ENOMEM

fork() failed to allocate the necessary kernel structures because memory is


tight.

Shells in Linux

Linux Kernel
Computers understand the language of zeros and ones known as binary
language. In the early days of computing, instructions were provided using
binary language, which is difficult for all of us to read and write. Therefore, in
an operating system there is a special program called the shell. The shell
accepts human readable commands and translates them into something the
kernel can read and process.

What Is a Shell?

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 (terminal).

Quick and dirty way to execute utilities.

The shell is not part of system kernel, but uses the system kernel to execute programs,
create files etc.
Several shells are available for Linux including:
o BASH ( Bourne-Again SHell ) - Most common shell in Linux. It's Open Source.
o CSH (C SHell) - The C shell's syntax and usage are very similar to the C
programming language.

o KSH (Korn SHell) - Created by David Korn at AT & T Bell Labs. The Korn Shell
also was the base for the POSIX Shell standard specifications.
o TCSH - It is an enhanced but completely compatible version of the Berkeley
UNIXC shell (CSH).
Please note that each shell does the same job, but each understands different command syntax
and provides different built-in functions. Under MS-DOS, the shell name is COMMAND.COM
which is also used for the same purpose, but it is by far not as powerful as our Linux Shells are!

Shell Prompt
There are various ways to get shell access:

Terminal - Linux desktop provide a GUI based login system. Once logged in you can
gain access to a shell by running X Terminal (XTerm), Gnome Terminal (GTerm), or KDE
Terminal (KTerm) application.

Connect via secure shell (SSH) - You will get a shell prompt as soon as you log in into
remote server or workstation.

Use the console - A few Linux system also provides a text-based login system. Generally
you get a shell prompt as soon as you log in to the system.

Several shells are available in Linux including:

Shell Name

Developed by

Where

Remark

BASH ( Bourne- Brian Fox and Chet Free


Software Most common shell in
Again SHell )
Ramey
Foundation
Linux. It's Freeware shell.

CSH (C SHell)

Bill Joy

University
of The C shell's syntax and
California (For BSD) usage are very similar to
the
C
programming
language.

KSH (Korn SHell)

David Korn

AT & T Bell Labs

TCSH

See the man page. -Type $ man tcsh

-TCSH is an enhanced but


completely
compatible
version of the Berkeley
UNIX C shell (CSH).

Note that each shell does the same job, but each understand a different command syntax and
provides different built-in functions.
In MS-DOS, Shell name is COMMAND.COM which is also used for same purpose, but it's not
as powerful as our Linux Shells are!
Any of the above shell reads command from user (via Keyboard or Mouse) and tells Linux Os
what users want. If we are giving commands from keyboard it is called command line interface
( Usually in-front of $ prompt, This prompt is depend upon your shell and Environment that you
set or by your System Administrator, therefore you may get different prompt ).
Tip:
To
find
$ echo $SHELL

your

current

shell

type

following

command

Login Settings for the Bash Shell


When you login to a shell a number of variables and settings are configured for your shell. The
files that are most commonly used by bash are:
1.

/etc/profile

2.

~/.bash_profile

3.

~/.bashrc

4.

~/.bash_logout

These files are text based shell scripts that can be used to define settings for either system wide
settings (those in the /etc directory), or for an individual user (those in the users home directory

specified by ~). Different files are called depending upon whether it is an interactive login shell
or a non-interactive shell.

Bash as an Interactive Login Shell


The following is followed if bash is invoked as an interactive login shell, or as a non-interactive
shell with the --login option.
First the shell reads and executes commands from the file '/etc/profile', if that file exists. After
reading that file, it looks for '~/.bash_profile'. If this is not found then it can instead use
'~/.bash_login', or '~/.profile'. The `--noprofile' option may be used when the shell is started to
inhibit this behavior.
The .bash_profile file is normally configured so that it also calls the ~/.bashrc file (if it exists)
towards the end of the .bash_profile.
When the login shell exits, Bash reads and executes commands from the file `~/.bash_logout', if
it exists.

Bash as an Interactive Non-Login Shell


The following is followed when an interactive shell that is not a login shell is started (e.g. if
switching user or launching from inside a shell). Bash reads and executes commands from
'~/.bashrc', if that file exists. This may be inhibited by using the `--norc' option. The `--rcfile file'
option will force Bash to read and execute commands from file instead of `~/.bashrc'.

Bash as a Non-Interactive Shell


If bash is run as a non-interactive shell then the scripts are not called, unless the login option is
used. If there is a script given in the BASH_ENV variable then this will be run.
Normally the PATH variable is not set for any non-interactive shells so when running tasks in a
non-interactive shell commands should be called using their full path names.

~/etc/profile

The /etc/profile file provides the system wide default environment variables. Typically this sets
up the umask, LOGNAME, and mail directories etc. It can also be used to change the default
command search path (PATH) for all users on the system. As most systems don't have a
/etc/bashrc file aliases are sometimes included in the /etc/profile file.The file /etc/profile is
maintained by the system administrator of your UNIX machine and contains shell initialization
information required by all users on a system.

The file .profile is under your control. You can add as much shell customization information as
you want to this file. The minimum set of information that you need to configure includes

The type of terminal you are using

A list of directories in which to locate commands

A list of variables effecting look and feel of your terminal.

You can check your .profile available in your home directory. Open it using vi editor and check
all the variables set for your environment.

~/.bash_profile

This provides the user specific environment variables, and is often used to add local search paths
onto the PATH. This is called after the /etc/profile script.

~/.bashrc

This file is called for non-interactive shells, and is normally called from the ~/.bash_profile for
interactive shells. It is normally used for setting up aliases and any other commands that are run
during the startup.

~/.bash_logout

The ~/.bash_logout script is called when the user logs out of the interactive shell.

Different Features of Linux

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

Architecture Independence - Portability means softwares can works on different types of


hardwares in same way.Linux kernel and application programs supports their installation on any
kind of hardware platform.

Open source - Linux source code is freely available and it is community based development
project. Multiple teams works in collaboration to enhance the capability of Linux operating
system and it is continuously evolving.

Multiuser - Linux is a multiuser system means multiple users can access system resources like
memory/ ram/ application programs at same time.

Multiprogramming - Linux is a multiprogramming system means multiple applications can run


at same time.

Multiprocessor - SMP support is available on the Intel and SPARC platforms (with work
currently in progress on other platforms), and Linux is used in several loosely-coupled MP
applications, including Beowulf systems.

Multithreading - Linux has native kernel support for multiple independent threads of control
within a single process memory space.

Hierarchicalfilesystem - Linux provides a standard file structure in which system files/ user
files are arranged.

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.

Demandloads executables - Linux only reads from disk those parts of a program that are
actually used.

Multiple virtual consoles - Several independent login sessions through the console, you switch
by pressing a hot-key combination (not dependent on video hardware). These are dynamically
allocated; you can use up to 64.

Support for different filesystems - Supports several common filesystems including minix,
Xenix,and all the common system V filesystems and has an advanced filesystem of its own,
which offers filesystems of up to 4 TB, and names up to 255 characters long.

Paging - Despite the best efforts to use physical memory efficiently, it may be that the available
memory is fully occupied. Linux then looks for 4 Kbyte pages of memory which can be freed.
Pages whose contents are already stored on hard disk are discarded. If one of these pages is
subsequently accessed, it has to be reloaded.

TCP/IP, SLIP & PPP support-Linux can be integrated into local unix networks. In principle, all
network services such as the network file system and remote login, can be used. SLIP & PPP
support the use of the TCP/IP protocol over serial lines. This means that it is possible to link into
the internet via the public telephone network using a high-speed modem.

Support for national keyboards & fonts- In linux you can use various national keyboards and
fonts. Since the latin1 font defined by the International Organisation for Standardisation (ISO)
contains umlauts, for example, the use of other fonts in Germany is not strictly necessary.

Shared libraries- These are collections of routines needed by a program to work. There are a
number of standard libraries used by more than one process at the same time. It therefore makes
sense to load the program code for these libraries into memory only once, rather than once for
each process.

SHELL COMMANDS
1.Pwd
Since a command line interface cannot provide graphics pictures of the file system
structure. It must have a different way of representing it. Think of the file system
tree as a maze , and you are standing in it. At any given moment, you stand in a
single directory. Inside that directory , you can see its file and the pathway to its
parent directory and the pathways to the subdirectories of the directory in which
you are standing.
The directory you are standing in is called the working directory .to find the name of
the working directory ,use the pwd command.

2.Cd

To change your working directory (where you are standing in the maze) you use the
cd command. To do this, type cd followed by the pathname of the desired working
directory. A pathname is the route you take along the branches of the tree to get to
the directory you want. Pathnames can be specified in one of two different ways,
absolute pathnames or relative pathnames. Lets deal with absolute pathnames
first.

3.Ls
One of the most used commands by Linux users and the one that a Linux beginner
must learn is- 'ls' Command. It is usually used to view the contents of current
directory. So, when you run this command, the files and sub-directories included
under the current directory will be listed before you. Very useful command and
everyone who uses Linux should know this command.

3.cat
cat is one of the most frequently used commands on Unix-like operating systems. It
has three related functions with regard to text files: displaying them, combining
copies of them and creating new ones.
syntax is
cat [options] [filenames] [-] [filenames]

The square brackets indicate that the enclosed items are optional.
Reading Files
The most common use of cat is to read the contents of files, and cat is often the
most convenient program for this purpose. All that is necessary to open a text file
for viewing on the display monitor is to type the word cat followed by a space and
the name of the file and then press the ENTER key. For example, the following will
display the contents of a file named desktop:
catdesktop
The standard output (i.e., default destination of the output) for cat, as is generally
the case for other command line (i.e., all-text mode) programs, is the monitor
screen. However, it can be redirected from the screen, for example, to another file
to be written to that file or to another command to use as the input for that
command.
In the following example, the standard output of cat is redirected using the output
redirection operator (which is represented by a rightward pointing angular bracket)
to file2:
cat file1 > file2
That is, the output from cat is written to file2 instead of being displayed on the
monitor screen.

4.APPEND FILE USING cat

>>FILTERS::
1.head COMMAND
This command gives the top most lines existed inside a file in a working directory.

2.head n5
This command gives the top five lines of a existed file.

3.tail COMMAND

This command gives the last most lines existed inside a file in a working directory.

4.tail n5
This command gives the last five lines of a existed file.

6.Sort
Sort command is helpful to sort/order lines in text files. You can sort the data in text
file and display the output on the screen, or redirect it to a file. Based on your
requirement, sort provides several command line options for sorting data in a text
file.

SHELLS WILD CARD COMMANDS

In Linux whenever you are not sure about the name of a file and you want to do
something with files such as either search for them or copy them or delete some
files based on some knowledge you have about the filenames then you can use
Wildcards. Wildcards are basically an indicator to the shell that some particular part
of the filename is not known to you and the shell can insert a combination of
characters in those places and then work on all the newly formed filenames.

1.ls x ch0[14]
Would list all the files that begin with the letter sequence ' beckham ' and end with
either a 1, 2 or 3. Thus the possible filenames that could be listed (if they exists) are
beckham1.jpg , beckham2.jpg and beckham3.jpg

2.ls x ch0[1-3]
Remember that [] represents a range from which any character can be present. This
range can be something like [0-4] or [1-9] or anything like that in case of numbers.
Letters could also be selected such as [a-g] or [F-Z] or [A-Z].

9.CHANGE MODE COMMANDS(chmod)


chmod is used to change the permissions of files or directories.
On Linux and other Unix-like operating systems, there is a set of rules for
each file which defines who can access that file, and how they can access it.
These rules are called file permissions or file modes. The command

name chmod stands for "change mode", and it is used to define the way a
file can be accessed.
Before continuing, you should read the section What Are File Permissions,
And How Do They Work? in our documentation of the umask command. It
contains a comprehensive description of how to define and express file
permissions.
In general, chmod commands take the form:
chmodoptionspermissionsfilename

If no options are specified, chmod modifies the permissions of the file


specified byfilename to the permissions specified by permissions.
permissions defines the permissions for the owner of the file (the "user"),
members of the group who owns the file (the "group"), and anyone else
("others"). There are two ways to represent these permissions: with symbols
(alphanumeric characters), or withoctal numbers (the digits 0 through 7).
Let's say you are the owner of a file named myfile, and you want to set its
permissions so that:
1. the user can read, write, and execute it;
2. members of your group can read and execute it; and
3. others may only read it.
This command will do the trick:
chmod u=rwx,g=rx,o=r myfile

This is an example of using symbolic permissions notation. The letters u, g,


and ostand for "user", "group", and "other". The equals sign ("=") means "set

the permissions exactly like this," and the letters "r", "w", and "x" stand for
"read", "write", and "execute", respectively. The commas separate the
different classes of permissions, and there are no spaces in between them.

NETWORK COMMANDS
1.NETSTAT Command
Netstat (Network Statistic) command display connection info,
routing table information etc. To displays routing table information
use option as -r.

2. PING Command
PING (Packet INternet Groper) command is the best way to
test connectivity between two nodes. Whether it is Local Area
Network (LAN) or Wide Area Network (WAN). Ping use ICMP
(Internet Control Message Protocol) to communicate to other
devices. You can ping host name of ip address using below

command

You might also like