SlideShare a Scribd company logo
1 of 41
UNIX System Architecture
Hardware
Kernel
Shell
Tools and Applications
Kernel
• Core of the operating system
• Collection of programs and sub routines written
in C
• Is in direct control of the underlying hardware
Functions include:
1. File management
2. Process management
3. Memory management
4. Converting data from user level to machine
level.
5. CPU scheduling
6. Dealing with interrupts from hardware
devices.
Shells and GUIs
• Shell acts as a command interpreter, which interprets
the user commands and transfers them to the kernel
for execution
• Performs as an interface between the user and the
kernel.
• Only one kernel and there can be several shells running
in the memory, one for every logged – in user.
• Shell invokes a command line prompt (for ex: $), where
the user can type a UNIX command.
Types of shells
1. Bourne shell
2. C shell
3. Korn shell
4. Bourne – again shell
Bourne shell
• Most common shell distributed with UNIX system.
• Is named after its author Stephen Bourne
• Most widely used shell
• Executable filename is sh
C shell
• Developed by Bill Joy
• Coding is similar to C programming language
• Shell scripts of this will not work with Bourne
shell
• Major advantage over Bourne shell is its ability
to execute processes in the background.
• Executable file is csh
• TC shell(tcsh) is a free version of C shell under
Linux
Korn shell
• Developed by David Korn
• Combines the best features of Bourne shell and C
shell
• One of the widely used shells
• Runs Bourne shell scripts without any changes
• Executable file is ksh
Bourne – Again shell
• Developed by Fox and C Ramey
• Default shell for most Linux operating systems and
its variants
• Executable file is sh
File system
• A major component.
• Is organized in an hierarchical manner.
• In UNIX, everything including hardware devices is
treated as a file.
• Resembles a tree structure with its root at the
top.
• Can be local or distributed.
System utilities and application programs
• System utilities such as ls, cp, grep, bc etc.
perform a single task extremely well.
• System utilities provide remote network and
administration services
• Application programs in Linux include editor, c
compiler, drawing package, Soffice (StarOffice)
etc.
UNIX command format
• UNIX commands can be very simple one word
commands or they can take a number of additional
arguments (parameters) as part of the command.
• In general a UNIX command has the following
general form...
$command option(s) filename(s)
• The command is the name of the utility or program
that we are going to execute.
Ex: $rm –i test1 #the command rm deletes the file test1, -i
prompts before deleting file.
• The options are passed into the command to
modify the way the command works. It is typical
for these options to have be a hyphen followed by a
single character, such as-l.
• The filename is the last argument for a lot of UNIX
commands. It is simply the file or files that we want
the command to work on.
• Take note that not all commands work on files, such
as ssh which takes the name of a host as its
argument.
(The ssh command is used to logging into a remote host and
execute commands on the remote machine.)
• The clear command, which is used to remove
all previous commands and output from the
display screen, is one of the rare commands
that accepts neither options nor arguments.
UNIX internal and external commands
• UNIX commands are classified into two types
Internal Commands - Ex: cd, echo,fg
External Commands - Ex: ls, cat
Internal Command:
• Internal commands are something which is built into the shell.
• For the shell built in commands, the execution speed is really high. It is because no
process needs to be generated for executing it.
• For example, when using the "cd" command, no process is created. The current
directory simply gets changed on executing it.
External Command:
• External commands are not built into the shell.
• These are executables present in a separate file.
• When an external command has to be executed, a new process has to be
generated and the command gets executed.
• For example, when you execute the "cat" command, which usually is at /usr/bin,
the executable /usr/bin/cat gets executed.
Directory commands
• pwd
• cd
• mkdir
• rmdir
• mv
• tree
pwd - print working directory or present working directory)
• Prints the absolute pathname of our current working directory
• The pwd command can have options, but it doesn’t take any arguments
Syntax & Ex: $pwd
cd - changing the directory
• Is used to move from one directory to another.
• Uses a pathname (either relative or absolute) as its argument.
Syntax: $cd directoryname
Ex: $cd /home/harley/essays
• To change to the / (root directory), use:
$cd /
• To return to home, use:
$cd
• To change to the parent directory, use:
$cd ..
Please note: There is a space between the command cd and its argument
mkdir – making directory
• To make a directory, we use mkdir command.
Syntax: $mkdir directoryname
Examples:
$mkdir extra
$mkdir sample1 sample2
rmdir – removing directory
• Removes one or more directories or sub –
directories
• Directories can be removed only when they are
empty.
Ex: $rmdir sample1
• A directory tree can be removed recursively and
forcefully using the rm command with the –r and –f
options
mv – moving or renaming a directory
• To move or rename a directory, we use mv command
Syntax: $mv directory target
where directory is the directory we want to move or
rename and target is the target or new name
Ex: $mv data extra
• We use mv command to “move” a directory from one
place to another.
• The command mv both moves and renames.
tree
• Lists the contents of directories in a tree like
format.
• Options –d (list directories only), -f (prints the
full path prefix for each file), -p (list a tree that
also shows the file permissions)
Ex: $tree -p
File related commands
• cat
• cp
• mv
• rm
• touch
• ls
• more
• head
• tail
cat
• Is used for creating files, displaying contents of
the files, concatenating files and for appending
files.
Creating files:
• Can be used to create small files.
• Takes input from keyboard and sends the output
to the monitor.
Ex: $cat > fruits
Apple
Orange
Grapes
<ctrl d>
Displaying contents of files
• cat can be used to display the contents of the one
file or more than one files
Examples:
$cat fruits
$cat fruits vegs
Concatenation of files
• cat command can concatenate the contents of two
or more files and store them in another file.
Ex: $cat test1 test2 > test3
Append files
• The cat command can be used to append or add
data to the contents of the file using the symbol >>
Ex: $cat >> fruits
Pineapple
Guava
<ctrl d>
• Can also be used to append the contents of one file
to another file
Ex: $cat fruits >> item
• Options with cat command are –v (displays non –
printable ASCII characters also), -n (numbers the
lines in the file) etc.
cp
• Can copy a file or a group of files, across
directories.
Syntax: $cp <source_file> <new_filename>
Ex: $cp test1 test2 #creates an exact copy of test1 with
file name as test2
• More than one file can be copied into another
directory
Ex: $cp test1 test2 testdir
cp options
• -i : interactive, prompts the confirmation
before overwriting the target file.
• -r : is recursive copying
• -p : copies the file and preserves the attributes
such as owner id, group id, permissions and
last modification time
mv – moving or renaming a file
• To move or rename a file, we use mv command
Syntax: $mv filename target
Where filename indicates the file we want to move
or rename and target is the target or new name
Ex: $mv veg vegetables
• We use mv command to “move” a file from one
place to another.
• The command mv both moves and renames.
• A group of files can also be moved into a
directory.
mv options:
• -f : suppresses all prompting and forces
overwriting of target file.
• -i : prompts before overwriting of destination
file
• -p : preserves the attributes such as owner id,
group id, permissions and last modification
time
rm
• Is used to delete one or more files
• Meta characters(*,? etc.) can be used to delete
files with common patterns
Syntax: $rm filename
Ex: $rm fruits
rm options:
• -f : suppresses all prompting.
• -i : prompts before deleting files
• -r : is recursively removes the files. (Ex: $rm –r*)
touch
• Is used to create empty files
Examples:
$touch course1
$touch course1 course2
touch options
• -a : to change the access time
• -m : to change the modification time
ls
• Is used to display all the files and sub directories in a
current directory
ls options:
• -a : list all files including hidden files.
• -x : list the content in a row – wise format.
• -r : list the contents, sorted in a reverse alphabetical
order.
• -i : displays inode numbers of files
• -l : display all the files and subdirectories in the long
format including permissions, file type, owner id, group
id etc.
• -u : list the contents based on the access time or usage
time.
Meta characters can be used with ls command as
follows:
• $ls *t : list all files ending with the letter t.
• $ls p* : list all files starting with the letter p.
• $ls ?at : list all three letter file names ending with
‘at’ and starting with any character.
• $ls [abc]* : list all files starting with the letters a, b
or c.
• $ls [!abc]* : list all file names which do not start
with the alphabets a, b or c
• $ls / : lists the contents of the root directory
more
• Is used to view the contents of a file page by
page.
• Takes one or more file names as arguments
Ex: $more studdet.txt
• The user can quit from more by typing q
head
• Is used to display the first few lines of one or
more files
• Without any options, by default, it displays
first 10 lines of the file.
Examples:
$head bcalist
$head -4 bcalist
• The head command can be used with multiple
files
Ex: $head -2 bcalist bsclist
tail
• Is used to display the last few lines of a file.
• By default, it displays the last 10 lines of the file.
Examples:
$tail bcalist #displays the last 10 lines
$tail -4 bcalist #displays the last 4 lines
$tail +7 bcalist #displays all the lines starting
from the line number 7 up to end of file
• The tail command cannot take multiple files
Comparing files
• The commands for comparing files can be
used to compare two versions of the same
file.
• Most common commands for comparing two
files are:
cmp
diff
comm
cmp
• Is used to determine whether the two files are
identical in all respects.
• When files are identical, system prompt
appears without any message.
• When there are differences, the location of
the first mismatch is echoed on the screen.
Ex: $cmp bcalist bsclist
diff
• It first compares the two files byte by byte,
and indicates the differences.
• Also tells how the contents of the first file can
be changed to match the text from the second
file and vice versa.
Ex: $diff bcalist bsclist
comm
• Compares two sorted files and shows
lines that are same and those that are
different.
Ex: $comm bcalist bsclist
Disk related commands
The df command - disk free
• Reports the amount of free space available for
each file system separately.
Examples:
$df
$df -h
df options:
• -h : print sizes in human readable format
(e.g., 1K 234M 2G)
• -T : print file system type.
• -a : include dummy file systems
• -i : list inode information instead of block usage.
The du command – disk usage
• It estimates and displays the disk space used
by files.
Ex: $du
du options:
-a : displays the space that each file is taking up
-ch : displays file sizes and the total capacity of
all files combined
-k : reports the file sizes in units of 1024 bytes
The ulimit command – user limit
• This command is used to control occupying huge
amount of space by files created by users.
• When applied at the command prompt ulimit
displays a value which signifies the largest file that
can be created by the user in the file system.
Ex: $ulimit
• The default value of Solaris and Linux for ulimit is
unlimited.
• An ordinary user can decrease the value, but
cannot increase it.
• Once the limit is decreased, it remains effective
till the user logs out.
• A super user can use ulimit to impose restriction
on the maximum file size, that a user is allowed
to create.
• A super user can increase or decrease the value
of ulimit.

More Related Content

Similar to 2. UNIX OS System Architecture easy.pptx

Similar to 2. UNIX OS System Architecture easy.pptx (20)

LINUX_admin_commands.pptx
LINUX_admin_commands.pptxLINUX_admin_commands.pptx
LINUX_admin_commands.pptx
 
Linux
LinuxLinux
Linux
 
Linux: Basics OF Linux
Linux: Basics OF LinuxLinux: Basics OF Linux
Linux: Basics OF Linux
 
Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01
 
Unix cmc
Unix cmcUnix cmc
Unix cmc
 
Linux basics
Linux basicsLinux basics
Linux basics
 
Linux administration training
Linux administration trainingLinux administration training
Linux administration training
 
03 browsing the filesystem
03 browsing the filesystem03 browsing the filesystem
03 browsing the filesystem
 
Linux ppt
Linux pptLinux ppt
Linux ppt
 
Raspberry Pi - Lecture 2 Linux OS
Raspberry Pi - Lecture 2 Linux OSRaspberry Pi - Lecture 2 Linux OS
Raspberry Pi - Lecture 2 Linux OS
 
Unit3 browsing the filesystem
Unit3 browsing the filesystemUnit3 browsing the filesystem
Unit3 browsing the filesystem
 
Linux week 2
Linux week 2Linux week 2
Linux week 2
 
Introduction to linux2
Introduction to linux2Introduction to linux2
Introduction to linux2
 
linux-file-system01.ppt
linux-file-system01.pptlinux-file-system01.ppt
linux-file-system01.ppt
 
Introduction to UNIX
Introduction to UNIXIntroduction to UNIX
Introduction to UNIX
 
QSpiders - Unix Operating Systems and Commands
QSpiders - Unix Operating Systems  and CommandsQSpiders - Unix Operating Systems  and Commands
QSpiders - Unix Operating Systems and Commands
 
Commands and shell programming (3)
Commands and shell programming (3)Commands and shell programming (3)
Commands and shell programming (3)
 
Unix _linux_fundamentals_for_hpc-_b
Unix  _linux_fundamentals_for_hpc-_bUnix  _linux_fundamentals_for_hpc-_b
Unix _linux_fundamentals_for_hpc-_b
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Learning Linux v2.1
Learning Linux v2.1Learning Linux v2.1
Learning Linux v2.1
 

More from Priyadarshini648418

AAI expert system and their usecases.ppt
AAI expert system and their usecases.pptAAI expert system and their usecases.ppt
AAI expert system and their usecases.pptPriyadarshini648418
 
deep learn about blood vessel auto1.pptx
deep learn about blood vessel auto1.pptxdeep learn about blood vessel auto1.pptx
deep learn about blood vessel auto1.pptxPriyadarshini648418
 
Applied Artificial Intelligence presenttt
Applied Artificial Intelligence presentttApplied Artificial Intelligence presenttt
Applied Artificial Intelligence presentttPriyadarshini648418
 
Nest_Dictionaries in python coding1.pptx
Nest_Dictionaries in python coding1.pptxNest_Dictionaries in python coding1.pptx
Nest_Dictionaries in python coding1.pptxPriyadarshini648418
 
Gender Recognition in the voice PPT.pptx
Gender Recognition in the voice PPT.pptxGender Recognition in the voice PPT.pptx
Gender Recognition in the voice PPT.pptxPriyadarshini648418
 
Data Science Machine Lerning Bigdat.pptx
Data Science Machine Lerning Bigdat.pptxData Science Machine Lerning Bigdat.pptx
Data Science Machine Lerning Bigdat.pptxPriyadarshini648418
 
Unix_Introduction_BCA.pptx the very basi
Unix_Introduction_BCA.pptx the very basiUnix_Introduction_BCA.pptx the very basi
Unix_Introduction_BCA.pptx the very basiPriyadarshini648418
 

More from Priyadarshini648418 (7)

AAI expert system and their usecases.ppt
AAI expert system and their usecases.pptAAI expert system and their usecases.ppt
AAI expert system and their usecases.ppt
 
deep learn about blood vessel auto1.pptx
deep learn about blood vessel auto1.pptxdeep learn about blood vessel auto1.pptx
deep learn about blood vessel auto1.pptx
 
Applied Artificial Intelligence presenttt
Applied Artificial Intelligence presentttApplied Artificial Intelligence presenttt
Applied Artificial Intelligence presenttt
 
Nest_Dictionaries in python coding1.pptx
Nest_Dictionaries in python coding1.pptxNest_Dictionaries in python coding1.pptx
Nest_Dictionaries in python coding1.pptx
 
Gender Recognition in the voice PPT.pptx
Gender Recognition in the voice PPT.pptxGender Recognition in the voice PPT.pptx
Gender Recognition in the voice PPT.pptx
 
Data Science Machine Lerning Bigdat.pptx
Data Science Machine Lerning Bigdat.pptxData Science Machine Lerning Bigdat.pptx
Data Science Machine Lerning Bigdat.pptx
 
Unix_Introduction_BCA.pptx the very basi
Unix_Introduction_BCA.pptx the very basiUnix_Introduction_BCA.pptx the very basi
Unix_Introduction_BCA.pptx the very basi
 

Recently uploaded

Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311  Call Girls in Thane , Independent Escort Service ThanePallawi 9167673311  Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service ThanePooja Nehwal
 
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...nagunakhan
 
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...Call Girls in Nagpur High Profile
 
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一定制(UI学位证)爱达荷大学毕业证成绩单原版一比一
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一ss ss
 
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...Pooja Nehwal
 
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一ga6c6bdl
 
Russian Call Girls Kolkata Chhaya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls Kolkata Chhaya 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls Kolkata Chhaya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls Kolkata Chhaya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
《1:1仿制麦克马斯特大学毕业证|订制麦克马斯特大学文凭》
《1:1仿制麦克马斯特大学毕业证|订制麦克马斯特大学文凭》《1:1仿制麦克马斯特大学毕业证|订制麦克马斯特大学文凭》
《1:1仿制麦克马斯特大学毕业证|订制麦克马斯特大学文凭》o8wvnojp
 
Call Girls Delhi {Rohini} 9711199012 high profile service
Call Girls Delhi {Rohini} 9711199012 high profile serviceCall Girls Delhi {Rohini} 9711199012 high profile service
Call Girls Delhi {Rohini} 9711199012 high profile servicerehmti665
 
原版制作美国天普大学毕业证(本硕)tu毕业证明原版一模一样
原版制作美国天普大学毕业证(本硕)tu毕业证明原版一模一样原版制作美国天普大学毕业证(本硕)tu毕业证明原版一模一样
原版制作美国天普大学毕业证(本硕)tu毕业证明原版一模一样qaffana
 
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一ga6c6bdl
 
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...Pooja Nehwal
 
Presentation.pptxjnfoigneoifnvoeifnvklfnvf
Presentation.pptxjnfoigneoifnvoeifnvklfnvfPresentation.pptxjnfoigneoifnvoeifnvklfnvf
Presentation.pptxjnfoigneoifnvoeifnvklfnvfchapmanellie27
 
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service -  Bandra F...WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service -  Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...Pooja Nehwal
 
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一zul5vf0pq
 

Recently uploaded (20)

Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311  Call Girls in Thane , Independent Escort Service ThanePallawi 9167673311  Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
 
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...
 
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
 
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
 
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一定制(UI学位证)爱达荷大学毕业证成绩单原版一比一
定制(UI学位证)爱达荷大学毕业证成绩单原版一比一
 
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
 
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
 
Russian Call Girls Kolkata Chhaya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls Kolkata Chhaya 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls Kolkata Chhaya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls Kolkata Chhaya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
《1:1仿制麦克马斯特大学毕业证|订制麦克马斯特大学文凭》
《1:1仿制麦克马斯特大学毕业证|订制麦克马斯特大学文凭》《1:1仿制麦克马斯特大学毕业证|订制麦克马斯特大学文凭》
《1:1仿制麦克马斯特大学毕业证|订制麦克马斯特大学文凭》
 
Call Girls Delhi {Rohini} 9711199012 high profile service
Call Girls Delhi {Rohini} 9711199012 high profile serviceCall Girls Delhi {Rohini} 9711199012 high profile service
Call Girls Delhi {Rohini} 9711199012 high profile service
 
原版制作美国天普大学毕业证(本硕)tu毕业证明原版一模一样
原版制作美国天普大学毕业证(本硕)tu毕业证明原版一模一样原版制作美国天普大学毕业证(本硕)tu毕业证明原版一模一样
原版制作美国天普大学毕业证(本硕)tu毕业证明原版一模一样
 
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
 
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一
 
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
 
Presentation.pptxjnfoigneoifnvoeifnvklfnvf
Presentation.pptxjnfoigneoifnvoeifnvklfnvfPresentation.pptxjnfoigneoifnvoeifnvklfnvf
Presentation.pptxjnfoigneoifnvoeifnvklfnvf
 
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
 
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service -  Bandra F...WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service -  Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...
 
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
 

2. UNIX OS System Architecture easy.pptx

  • 2.
  • 3. Kernel • Core of the operating system • Collection of programs and sub routines written in C • Is in direct control of the underlying hardware Functions include: 1. File management 2. Process management 3. Memory management 4. Converting data from user level to machine level. 5. CPU scheduling 6. Dealing with interrupts from hardware devices.
  • 4. Shells and GUIs • Shell acts as a command interpreter, which interprets the user commands and transfers them to the kernel for execution • Performs as an interface between the user and the kernel. • Only one kernel and there can be several shells running in the memory, one for every logged – in user. • Shell invokes a command line prompt (for ex: $), where the user can type a UNIX command.
  • 5. Types of shells 1. Bourne shell 2. C shell 3. Korn shell 4. Bourne – again shell Bourne shell • Most common shell distributed with UNIX system. • Is named after its author Stephen Bourne • Most widely used shell • Executable filename is sh
  • 6. C shell • Developed by Bill Joy • Coding is similar to C programming language • Shell scripts of this will not work with Bourne shell • Major advantage over Bourne shell is its ability to execute processes in the background. • Executable file is csh • TC shell(tcsh) is a free version of C shell under Linux
  • 7. Korn shell • Developed by David Korn • Combines the best features of Bourne shell and C shell • One of the widely used shells • Runs Bourne shell scripts without any changes • Executable file is ksh Bourne – Again shell • Developed by Fox and C Ramey • Default shell for most Linux operating systems and its variants • Executable file is sh
  • 8. File system • A major component. • Is organized in an hierarchical manner. • In UNIX, everything including hardware devices is treated as a file. • Resembles a tree structure with its root at the top. • Can be local or distributed.
  • 9. System utilities and application programs • System utilities such as ls, cp, grep, bc etc. perform a single task extremely well. • System utilities provide remote network and administration services • Application programs in Linux include editor, c compiler, drawing package, Soffice (StarOffice) etc.
  • 10. UNIX command format • UNIX commands can be very simple one word commands or they can take a number of additional arguments (parameters) as part of the command. • In general a UNIX command has the following general form... $command option(s) filename(s) • The command is the name of the utility or program that we are going to execute. Ex: $rm –i test1 #the command rm deletes the file test1, -i prompts before deleting file.
  • 11. • The options are passed into the command to modify the way the command works. It is typical for these options to have be a hyphen followed by a single character, such as-l. • The filename is the last argument for a lot of UNIX commands. It is simply the file or files that we want the command to work on. • Take note that not all commands work on files, such as ssh which takes the name of a host as its argument. (The ssh command is used to logging into a remote host and execute commands on the remote machine.)
  • 12. • The clear command, which is used to remove all previous commands and output from the display screen, is one of the rare commands that accepts neither options nor arguments.
  • 13. UNIX internal and external commands • UNIX commands are classified into two types Internal Commands - Ex: cd, echo,fg External Commands - Ex: ls, cat Internal Command: • Internal commands are something which is built into the shell. • For the shell built in commands, the execution speed is really high. It is because no process needs to be generated for executing it. • For example, when using the "cd" command, no process is created. The current directory simply gets changed on executing it. External Command: • External commands are not built into the shell. • These are executables present in a separate file. • When an external command has to be executed, a new process has to be generated and the command gets executed. • For example, when you execute the "cat" command, which usually is at /usr/bin, the executable /usr/bin/cat gets executed.
  • 14. Directory commands • pwd • cd • mkdir • rmdir • mv • tree
  • 15. pwd - print working directory or present working directory) • Prints the absolute pathname of our current working directory • The pwd command can have options, but it doesn’t take any arguments Syntax & Ex: $pwd cd - changing the directory • Is used to move from one directory to another. • Uses a pathname (either relative or absolute) as its argument. Syntax: $cd directoryname Ex: $cd /home/harley/essays • To change to the / (root directory), use: $cd / • To return to home, use: $cd • To change to the parent directory, use: $cd .. Please note: There is a space between the command cd and its argument
  • 16. mkdir – making directory • To make a directory, we use mkdir command. Syntax: $mkdir directoryname Examples: $mkdir extra $mkdir sample1 sample2 rmdir – removing directory • Removes one or more directories or sub – directories • Directories can be removed only when they are empty. Ex: $rmdir sample1
  • 17. • A directory tree can be removed recursively and forcefully using the rm command with the –r and –f options mv – moving or renaming a directory • To move or rename a directory, we use mv command Syntax: $mv directory target where directory is the directory we want to move or rename and target is the target or new name Ex: $mv data extra • We use mv command to “move” a directory from one place to another. • The command mv both moves and renames.
  • 18. tree • Lists the contents of directories in a tree like format. • Options –d (list directories only), -f (prints the full path prefix for each file), -p (list a tree that also shows the file permissions) Ex: $tree -p
  • 19. File related commands • cat • cp • mv • rm • touch • ls • more • head • tail
  • 20. cat • Is used for creating files, displaying contents of the files, concatenating files and for appending files. Creating files: • Can be used to create small files. • Takes input from keyboard and sends the output to the monitor. Ex: $cat > fruits Apple Orange Grapes <ctrl d>
  • 21. Displaying contents of files • cat can be used to display the contents of the one file or more than one files Examples: $cat fruits $cat fruits vegs Concatenation of files • cat command can concatenate the contents of two or more files and store them in another file. Ex: $cat test1 test2 > test3
  • 22. Append files • The cat command can be used to append or add data to the contents of the file using the symbol >> Ex: $cat >> fruits Pineapple Guava <ctrl d> • Can also be used to append the contents of one file to another file Ex: $cat fruits >> item • Options with cat command are –v (displays non – printable ASCII characters also), -n (numbers the lines in the file) etc.
  • 23. cp • Can copy a file or a group of files, across directories. Syntax: $cp <source_file> <new_filename> Ex: $cp test1 test2 #creates an exact copy of test1 with file name as test2 • More than one file can be copied into another directory Ex: $cp test1 test2 testdir
  • 24. cp options • -i : interactive, prompts the confirmation before overwriting the target file. • -r : is recursive copying • -p : copies the file and preserves the attributes such as owner id, group id, permissions and last modification time
  • 25. mv – moving or renaming a file • To move or rename a file, we use mv command Syntax: $mv filename target Where filename indicates the file we want to move or rename and target is the target or new name Ex: $mv veg vegetables • We use mv command to “move” a file from one place to another. • The command mv both moves and renames. • A group of files can also be moved into a directory.
  • 26. mv options: • -f : suppresses all prompting and forces overwriting of target file. • -i : prompts before overwriting of destination file • -p : preserves the attributes such as owner id, group id, permissions and last modification time
  • 27. rm • Is used to delete one or more files • Meta characters(*,? etc.) can be used to delete files with common patterns Syntax: $rm filename Ex: $rm fruits rm options: • -f : suppresses all prompting. • -i : prompts before deleting files • -r : is recursively removes the files. (Ex: $rm –r*)
  • 28. touch • Is used to create empty files Examples: $touch course1 $touch course1 course2 touch options • -a : to change the access time • -m : to change the modification time
  • 29. ls • Is used to display all the files and sub directories in a current directory ls options: • -a : list all files including hidden files. • -x : list the content in a row – wise format. • -r : list the contents, sorted in a reverse alphabetical order. • -i : displays inode numbers of files • -l : display all the files and subdirectories in the long format including permissions, file type, owner id, group id etc. • -u : list the contents based on the access time or usage time.
  • 30. Meta characters can be used with ls command as follows: • $ls *t : list all files ending with the letter t. • $ls p* : list all files starting with the letter p. • $ls ?at : list all three letter file names ending with ‘at’ and starting with any character. • $ls [abc]* : list all files starting with the letters a, b or c. • $ls [!abc]* : list all file names which do not start with the alphabets a, b or c • $ls / : lists the contents of the root directory
  • 31. more • Is used to view the contents of a file page by page. • Takes one or more file names as arguments Ex: $more studdet.txt • The user can quit from more by typing q
  • 32. head • Is used to display the first few lines of one or more files • Without any options, by default, it displays first 10 lines of the file. Examples: $head bcalist $head -4 bcalist • The head command can be used with multiple files Ex: $head -2 bcalist bsclist
  • 33. tail • Is used to display the last few lines of a file. • By default, it displays the last 10 lines of the file. Examples: $tail bcalist #displays the last 10 lines $tail -4 bcalist #displays the last 4 lines $tail +7 bcalist #displays all the lines starting from the line number 7 up to end of file • The tail command cannot take multiple files
  • 34. Comparing files • The commands for comparing files can be used to compare two versions of the same file. • Most common commands for comparing two files are: cmp diff comm
  • 35. cmp • Is used to determine whether the two files are identical in all respects. • When files are identical, system prompt appears without any message. • When there are differences, the location of the first mismatch is echoed on the screen. Ex: $cmp bcalist bsclist
  • 36. diff • It first compares the two files byte by byte, and indicates the differences. • Also tells how the contents of the first file can be changed to match the text from the second file and vice versa. Ex: $diff bcalist bsclist
  • 37. comm • Compares two sorted files and shows lines that are same and those that are different. Ex: $comm bcalist bsclist
  • 38. Disk related commands The df command - disk free • Reports the amount of free space available for each file system separately. Examples: $df $df -h df options: • -h : print sizes in human readable format (e.g., 1K 234M 2G) • -T : print file system type. • -a : include dummy file systems • -i : list inode information instead of block usage.
  • 39. The du command – disk usage • It estimates and displays the disk space used by files. Ex: $du du options: -a : displays the space that each file is taking up -ch : displays file sizes and the total capacity of all files combined -k : reports the file sizes in units of 1024 bytes
  • 40. The ulimit command – user limit • This command is used to control occupying huge amount of space by files created by users. • When applied at the command prompt ulimit displays a value which signifies the largest file that can be created by the user in the file system. Ex: $ulimit • The default value of Solaris and Linux for ulimit is unlimited.
  • 41. • An ordinary user can decrease the value, but cannot increase it. • Once the limit is decreased, it remains effective till the user logs out. • A super user can use ulimit to impose restriction on the maximum file size, that a user is allowed to create. • A super user can increase or decrease the value of ulimit.