SlideShare a Scribd company logo
U N I X
made by B Chari K working in semiconductors domain
UNIX OS
 Unix is a multi-user, multi-tasking, multi-
processing, efficient, fast and very powerful
operating system.
 The OS is build on top of the kernel, and
consists of
additional commands,
utilities,
command interpreters or shells,
language compilers and debuggers,
text processors etc.
B Chari K
Kernel
 The kernel is the heart of the any operating
system.
 This is relatively small piece of code that
directly sits on the hardware.
 It is a collection of programs that are mostly
written in C
B Chari K
Kernel Architecture
B Chari K
Kernel Tasks
B Chari K
Shell Prompt
 Shell provides an interface to the user and UNIX
OS.
 A shell is an environment in which we can run our
commands, programs, and shell scripts.
 It gathers input from user and executes programs
based on that input.
B Chari K
Different shells
 Different flavor of
shells, each has own
set of recognized
commands and
functions
 Borne shell(sh)
 Korn shell(sh)
 C shell
 TENEX C
shell(tcsh)
 Shells are usually
installed in /bin/B Chari K
Super User
 Unix is a case-sensitive operating system.
 A special account root that is reserved for the
system administrator or super user.
 It has all system resources, including all files,
directories, and data.
 The super user has full access and control
over every thing and a slight mistake can cause
irreparable damage to the system.
B Chari K
File Organization
B Chari K
File Organization
B Chari K
Absolute path & Relative path
 Absolute path : starts from root(/) and follow the
tree
 Relative path : starts from current directory
B Chari K
UNIX commands
Changing directory
 cd is used to change from
one directory to another
directory
cd ~  to home directory
cd /  to root directory
cd -  to last directory
cd ..  to immediate parent
directory
cd <dir_name> or cd <path>
pwd  know the path for
current directory
B Chari K
Creating and Removing Directories
 mkdir creates a
directory
mkdir <dir_name>
mkdir path>/<dir_name>
 rmdir removes a
directory
rmdir <dir_name>
B Chari K
Listing Files
 ls list the files and
directories in current
directory
 ls –l  long listing the all
details of files
 ls –a  hidden files
 ls –t  sort the files
 Ls -R recursively
displays all files in
subdirectories
B Chari K
Creating Files
touch is used to create
new, empty files
touch <file_name>
The argument to the
command taken as new
file name
Touch
<fie1><file2><file3>
Can create any no.of files
simultaneously
This command can
change timestamps for
existing files
B Chari K
Creating and Editing files
vi editor to create an
ordinary files
vi <file_name>
Press i - come into insert
mode
esc - come to command
mode
:wq to save and come out
of file completely.
vim, gvim, gedit, nedit,
emacs are some of editors
B Chari K
Know the UNIX Commands
Display or concatenate files
cat displays the file
content on terminal.
Or display two files’
contents together
cat file1 file2
Combines and displays
file1 and file2
cat file1 file2 > filex
Moves file1 and file2
to filex
B Chari K
File Permissions
B Chari K
Chmod 755 <file1>
Change permissions
chmod alters the
permissions on files and
directories using either
symbolic or octal numeric
codes.
+ to add a permission
- to add a permission
= to assign a permission
chmod u=rw <file1>
chmod u+x, g+w, o-w
<file1>
B Chari K
Change Permissions
B Chari K
Copying and Moving files
cp used to make
copies of files and
directories
Cp <source_file>
<destination_file>
Cp file1 file2 dir1
Copies file1 and file2
into dir1 directory
Cp –r dir1 dir2
Copies directories
using -r
B Chari K
Moving and Renaming files
mv used to change the
name of the files or move
the files into other
directories
mv file1 file2
Renames the file1 to
file2
mv file1 file2 dir1
Moves file1 and file2
to dir1 directory
B Chari K
Getting help
man used to get the
manuals pages about the
command
man <command>
(or)
<command> --help
Info used to get the
description of all available
commands.
info
Info <command>
B Chari K
Removing files
rm is used to remove
files
rm <file1>
Deletes the existing file
rm -i <file1>
You will be asked that
you wish to be delete or
not
rm -r <directory>
Recursively deletes the
contents of directory,
its subdirectories and
deletes directory itself
B Chari K
Commands on files
Sort this command sort
and combines all the lines in
file
Sort -d <file1>
Sorts based on
dictionary order in which
letters, digits,
whitespaces considered
Sort -r <file1>
Reverse the order of
the combining sequence
diff display difference
between two files
Diff <file1> <file2>
Reports line by line
difference between the text
files
file tests named files to
determine the categories their
contents belongs to.
File <file1>
B Chari K
Display commands
echo prints the given
argument in standard output
device
echo “type a string”
head displays the head
or start of the file
head -number <file1>
Head -10 file1
taildisplays the tail or end of
the file
tail -number <file1>
Tail -20 <file1>
B Chari K
Display commands(more, less)
more display the large
file in one screenful at a time
more <file1>
Allows only forward
control
less similar to more
Less <file1>
Allows forward and
backward movement
more, less can also be
used for pattern searching
 more +/pattern <file1>
Less +/pattern <file1>
B Chari K
System resource commands
date report current
date and time
which reports path for
the specified command
which <command>
du report the disk
usage of specified file or
directory
du <dirname>
B Chari K
System resource commands
uname display or set the
name of the current machine
passwd change or set
the password
who report who is logged
in and what processes are
running
script saves everything that
appears on the screen to a file
until exit is executed.
script <file>
B Chari K
Find files of a specified name or
type
find searches for files in
a named directory and all its
subdirectories.
find . -type f -name “*.txt”
Searches current directory
for the files end with .txt
extension
find < > -type < > -name “pattern”
Path from where
You want to search
d – directory
f – files
l - link
B Chari K
Pattern Matching
grep searches for lines
containing specified pattern
grep <pattern>
<file_name>
grep -i <pattern>
<file_name>
For insensitive
search
grep -wocv <pattern>
<file>
-w Prints line which
have individual word
-o it prints only the
word
-c it gives the count
-v prints lines which
didn't match
B Chari K
Piping
 Connect two commands together so that the
output from one program becomes the input of
the next program.
 ls –l | grep “Aug”
 This would extract all the files created in August
month
B Chari K
T h a n k Y o u
made by B Chari K working in semiconductors domain

More Related Content

PDF
PDF
Unix commands in etl testing
PPTX
Classification Algorithm.
PPTX
Multithreading in java
PPTX
Introduction to RTI DDS
PDF
WT(WEB TECHNOLOGY) previous year question papers
PDF
UNIT-V.pdf daa unit material 5 th unit ppt
PPTX
Neurolinguistics
Unix commands in etl testing
Classification Algorithm.
Multithreading in java
Introduction to RTI DDS
WT(WEB TECHNOLOGY) previous year question papers
UNIT-V.pdf daa unit material 5 th unit ppt
Neurolinguistics

What's hot (20)

PPT
Basic 50 linus command
PPT
Linux command ppt
PPT
Shell and its types in LINUX
PPTX
Unix OS & Commands
PPTX
Operating system components
PDF
Basic linux commands
PPTX
Linux operating system - Overview
PPTX
Linux process management
PPT
Shell programming
PPTX
Linux commands
PDF
Shell scripting
PPT
Basic command ppt
PPT
Memory Management in OS
PPTX
File concept and access method
PPT
Unix File System
PPT
Basic Unix
PDF
An Introduction To Linux
PPTX
Introduction to Unix
PPT
Linux file system
Basic 50 linus command
Linux command ppt
Shell and its types in LINUX
Unix OS & Commands
Operating system components
Basic linux commands
Linux operating system - Overview
Linux process management
Shell programming
Linux commands
Shell scripting
Basic command ppt
Memory Management in OS
File concept and access method
Unix File System
Basic Unix
An Introduction To Linux
Introduction to Unix
Linux file system
Ad

Similar to Know the UNIX Commands (20)

PPT
Linux commands and file structure
PPT
linux-lecture4.pptuyhbjhbiibihbiuhbbihbi
PPT
Linux ppt
PPT
linux-lecture4.ppt
PDF
Linux file commands and shell scripts
PPTX
OS-Module 2 Linux Programming Important topics
PDF
Basics of UNIX Commands
PPTX
Linux System commands Essentialsand Basics.pptx
PPT
Linux file system nevigation
PDF
Module 02 Using Linux Command Shell
PDF
Basic unix commands_1
PPT
Shell_Scripting.ppt
PPTX
UNIX.pptx
PPTX
BASICS OF LINUX OPERATING SYSTEM.pptx
PDF
bash_1_2021-command line introduction.pdf
PPT
8.1.intro unix
PPTX
Basics of Unix Adminisration
DOC
Unix Basics For Testers
PPTX
linux chapter 5.pptx lesson About introduction to linux
ODP
Introduction to LINUX
Linux commands and file structure
linux-lecture4.pptuyhbjhbiibihbiuhbbihbi
Linux ppt
linux-lecture4.ppt
Linux file commands and shell scripts
OS-Module 2 Linux Programming Important topics
Basics of UNIX Commands
Linux System commands Essentialsand Basics.pptx
Linux file system nevigation
Module 02 Using Linux Command Shell
Basic unix commands_1
Shell_Scripting.ppt
UNIX.pptx
BASICS OF LINUX OPERATING SYSTEM.pptx
bash_1_2021-command line introduction.pdf
8.1.intro unix
Basics of Unix Adminisration
Unix Basics For Testers
linux chapter 5.pptx lesson About introduction to linux
Introduction to LINUX
Ad

Recently uploaded (20)

PPTX
Causes of Flooding by Slidesgo sdnl;asnjdl;asj.pptx
PDF
Trusted Executive Protection Services in Ontario — Discreet & Professional.pdf
PPTX
HPE Aruba-master-icon-library_052722.pptx
PPTX
building Planning Overview for step wise design.pptx
PPTX
6- Architecture design complete (1).pptx
PPTX
12. Community Pharmacy and How to organize it
PDF
Emailing DDDX-MBCaEiB.pdf DDD_Europe_2022_Intro_to_Context_Mapping_pdf-165590...
DOCX
The story of the first moon landing.docx
PPT
unit 1 ppt.ppthhhhhhhhhhhhhhhhhhhhhhhhhh
PDF
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
PDF
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
PPT
EGWHermeneuticsffgggggggggggggggggggggggggggggggg.ppt
PPTX
Fundamental Principles of Visual Graphic Design.pptx
PDF
Quality Control Management for RMG, Level- 4, Certificate
PDF
YOW2022-BNE-MinimalViableArchitecture.pdf
PPTX
mahatma gandhi bus terminal in india Case Study.pptx
PDF
Design Thinking - Module 1 - Introduction To Design Thinking - Dr. Rohan Dasg...
PDF
SEVA- Fashion designing-Presentation.pdf
PDF
Facade & Landscape Lighting Techniques and Trends.pptx.pdf
PPT
pump pump is a mechanism that is used to transfer a liquid from one place to ...
Causes of Flooding by Slidesgo sdnl;asnjdl;asj.pptx
Trusted Executive Protection Services in Ontario — Discreet & Professional.pdf
HPE Aruba-master-icon-library_052722.pptx
building Planning Overview for step wise design.pptx
6- Architecture design complete (1).pptx
12. Community Pharmacy and How to organize it
Emailing DDDX-MBCaEiB.pdf DDD_Europe_2022_Intro_to_Context_Mapping_pdf-165590...
The story of the first moon landing.docx
unit 1 ppt.ppthhhhhhhhhhhhhhhhhhhhhhhhhh
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
EGWHermeneuticsffgggggggggggggggggggggggggggggggg.ppt
Fundamental Principles of Visual Graphic Design.pptx
Quality Control Management for RMG, Level- 4, Certificate
YOW2022-BNE-MinimalViableArchitecture.pdf
mahatma gandhi bus terminal in india Case Study.pptx
Design Thinking - Module 1 - Introduction To Design Thinking - Dr. Rohan Dasg...
SEVA- Fashion designing-Presentation.pdf
Facade & Landscape Lighting Techniques and Trends.pptx.pdf
pump pump is a mechanism that is used to transfer a liquid from one place to ...

Know the UNIX Commands

  • 1. U N I X made by B Chari K working in semiconductors domain
  • 2. UNIX OS  Unix is a multi-user, multi-tasking, multi- processing, efficient, fast and very powerful operating system.  The OS is build on top of the kernel, and consists of additional commands, utilities, command interpreters or shells, language compilers and debuggers, text processors etc. B Chari K
  • 3. Kernel  The kernel is the heart of the any operating system.  This is relatively small piece of code that directly sits on the hardware.  It is a collection of programs that are mostly written in C B Chari K
  • 6. Shell Prompt  Shell provides an interface to the user and UNIX OS.  A shell is an environment in which we can run our commands, programs, and shell scripts.  It gathers input from user and executes programs based on that input. B Chari K
  • 7. Different shells  Different flavor of shells, each has own set of recognized commands and functions  Borne shell(sh)  Korn shell(sh)  C shell  TENEX C shell(tcsh)  Shells are usually installed in /bin/B Chari K
  • 8. Super User  Unix is a case-sensitive operating system.  A special account root that is reserved for the system administrator or super user.  It has all system resources, including all files, directories, and data.  The super user has full access and control over every thing and a slight mistake can cause irreparable damage to the system. B Chari K
  • 11. Absolute path & Relative path  Absolute path : starts from root(/) and follow the tree  Relative path : starts from current directory B Chari K
  • 13. Changing directory  cd is used to change from one directory to another directory cd ~  to home directory cd /  to root directory cd -  to last directory cd ..  to immediate parent directory cd <dir_name> or cd <path> pwd  know the path for current directory B Chari K
  • 14. Creating and Removing Directories  mkdir creates a directory mkdir <dir_name> mkdir path>/<dir_name>  rmdir removes a directory rmdir <dir_name> B Chari K
  • 15. Listing Files  ls list the files and directories in current directory  ls –l  long listing the all details of files  ls –a  hidden files  ls –t  sort the files  Ls -R recursively displays all files in subdirectories B Chari K
  • 16. Creating Files touch is used to create new, empty files touch <file_name> The argument to the command taken as new file name Touch <fie1><file2><file3> Can create any no.of files simultaneously This command can change timestamps for existing files B Chari K
  • 17. Creating and Editing files vi editor to create an ordinary files vi <file_name> Press i - come into insert mode esc - come to command mode :wq to save and come out of file completely. vim, gvim, gedit, nedit, emacs are some of editors B Chari K
  • 19. Display or concatenate files cat displays the file content on terminal. Or display two files’ contents together cat file1 file2 Combines and displays file1 and file2 cat file1 file2 > filex Moves file1 and file2 to filex B Chari K
  • 21. Chmod 755 <file1> Change permissions chmod alters the permissions on files and directories using either symbolic or octal numeric codes. + to add a permission - to add a permission = to assign a permission chmod u=rw <file1> chmod u+x, g+w, o-w <file1> B Chari K
  • 23. Copying and Moving files cp used to make copies of files and directories Cp <source_file> <destination_file> Cp file1 file2 dir1 Copies file1 and file2 into dir1 directory Cp –r dir1 dir2 Copies directories using -r B Chari K
  • 24. Moving and Renaming files mv used to change the name of the files or move the files into other directories mv file1 file2 Renames the file1 to file2 mv file1 file2 dir1 Moves file1 and file2 to dir1 directory B Chari K
  • 25. Getting help man used to get the manuals pages about the command man <command> (or) <command> --help Info used to get the description of all available commands. info Info <command> B Chari K
  • 26. Removing files rm is used to remove files rm <file1> Deletes the existing file rm -i <file1> You will be asked that you wish to be delete or not rm -r <directory> Recursively deletes the contents of directory, its subdirectories and deletes directory itself B Chari K
  • 27. Commands on files Sort this command sort and combines all the lines in file Sort -d <file1> Sorts based on dictionary order in which letters, digits, whitespaces considered Sort -r <file1> Reverse the order of the combining sequence diff display difference between two files Diff <file1> <file2> Reports line by line difference between the text files file tests named files to determine the categories their contents belongs to. File <file1> B Chari K
  • 28. Display commands echo prints the given argument in standard output device echo “type a string” head displays the head or start of the file head -number <file1> Head -10 file1 taildisplays the tail or end of the file tail -number <file1> Tail -20 <file1> B Chari K
  • 29. Display commands(more, less) more display the large file in one screenful at a time more <file1> Allows only forward control less similar to more Less <file1> Allows forward and backward movement more, less can also be used for pattern searching  more +/pattern <file1> Less +/pattern <file1> B Chari K
  • 30. System resource commands date report current date and time which reports path for the specified command which <command> du report the disk usage of specified file or directory du <dirname> B Chari K
  • 31. System resource commands uname display or set the name of the current machine passwd change or set the password who report who is logged in and what processes are running script saves everything that appears on the screen to a file until exit is executed. script <file> B Chari K
  • 32. Find files of a specified name or type find searches for files in a named directory and all its subdirectories. find . -type f -name “*.txt” Searches current directory for the files end with .txt extension find < > -type < > -name “pattern” Path from where You want to search d – directory f – files l - link B Chari K
  • 33. Pattern Matching grep searches for lines containing specified pattern grep <pattern> <file_name> grep -i <pattern> <file_name> For insensitive search grep -wocv <pattern> <file> -w Prints line which have individual word -o it prints only the word -c it gives the count -v prints lines which didn't match B Chari K
  • 34. Piping  Connect two commands together so that the output from one program becomes the input of the next program.  ls –l | grep “Aug”  This would extract all the files created in August month B Chari K
  • 35. T h a n k Y o u made by B Chari K working in semiconductors domain

Editor's Notes