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
Ad

More Related Content

What's hot (20)

Unix OS & Commands
Unix OS & CommandsUnix OS & Commands
Unix OS & Commands
Mohit Belwal
 
Shell programming
Shell programmingShell programming
Shell programming
Moayad Moawiah
 
Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
Rohit Kumar
 
Linux commands
Linux commandsLinux commands
Linux commands
Mannu Khani
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
Manav Prasad
 
Unix ppt
Unix pptUnix ppt
Unix ppt
Dr Rajiv Srivastava
 
Vi editor in linux
Vi editor in linuxVi editor in linux
Vi editor in linux
Bhumivaghasiya
 
Basic 50 linus command
Basic 50 linus commandBasic 50 linus command
Basic 50 linus command
MAGNA COLLEGE OF ENGINEERING
 
Linux command ppt
Linux command pptLinux command ppt
Linux command ppt
kalyanineve
 
Shell and its types in LINUX
Shell and its types in LINUXShell and its types in LINUX
Shell and its types in LINUX
SHUBHA CHATURVEDI
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
Geeks Anonymes
 
Linux basic commands with examples
Linux basic commands with examplesLinux basic commands with examples
Linux basic commands with examples
abclearnn
 
UNIX Operating System ppt
UNIX Operating System pptUNIX Operating System ppt
UNIX Operating System ppt
OECLIB Odisha Electronics Control Library
 
Bash shell scripting
Bash shell scriptingBash shell scripting
Bash shell scripting
VIKAS TIWARI
 
Linux process management
Linux process managementLinux process management
Linux process management
Raghu nath
 
Introduction to Makefile
Introduction to MakefileIntroduction to Makefile
Introduction to Makefile
Zakaria El ktaoui
 
Linux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell ScriptingLinux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell Scripting
Emertxe Information Technologies Pvt Ltd
 
Basics of shell programming
Basics of shell programmingBasics of shell programming
Basics of shell programming
Chandan Kumar Rana
 
Linux file system
Linux file systemLinux file system
Linux file system
Md. Tanvir Hossain
 
SHELL PROGRAMMING
SHELL PROGRAMMINGSHELL PROGRAMMING
SHELL PROGRAMMING
jinal thakrar
 

Similar to Know the UNIX Commands (20)

Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
Sreenatha Reddy K R
 
linux-lecture4.pptuyhbjhbiibihbiuhbbihbi
linux-lecture4.pptuyhbjhbiibihbiuhbbihbilinux-lecture4.pptuyhbjhbiibihbiuhbbihbi
linux-lecture4.pptuyhbjhbiibihbiuhbbihbi
YajnadattaPattanayak
 
Linux ppt
Linux pptLinux ppt
Linux ppt
Sanmuga Nathan
 
linux-lecture4.ppt
linux-lecture4.pptlinux-lecture4.ppt
linux-lecture4.ppt
LuigysToro
 
Linux file commands and shell scripts
Linux file commands and shell scriptsLinux file commands and shell scripts
Linux file commands and shell scripts
PrashantTechment
 
OS-Module 2 Linux Programming Important topics
OS-Module 2 Linux Programming Important topicsOS-Module 2 Linux Programming Important topics
OS-Module 2 Linux Programming Important topics
JithinS34
 
Basics of UNIX Commands
Basics of UNIX CommandsBasics of UNIX Commands
Basics of UNIX Commands
Subra Das
 
Linux System commands Essentialsand Basics.pptx
Linux System commands Essentialsand Basics.pptxLinux System commands Essentialsand Basics.pptx
Linux System commands Essentialsand Basics.pptx
mba1130feb2024
 
Linux file system nevigation
Linux file system nevigationLinux file system nevigation
Linux file system nevigation
hetaldobariya
 
Module 02 Using Linux Command Shell
Module 02 Using Linux Command ShellModule 02 Using Linux Command Shell
Module 02 Using Linux Command Shell
Tushar B Kute
 
Basic unix commands_1
Basic unix commands_1Basic unix commands_1
Basic unix commands_1
thakor bharati
 
Shell_Scripting.ppt
Shell_Scripting.pptShell_Scripting.ppt
Shell_Scripting.ppt
KiranMantri
 
UNIX.pptx
UNIX.pptxUNIX.pptx
UNIX.pptx
P S Rani
 
BASICS OF LINUX OPERATING SYSTEM.pptx
BASICS OF LINUX OPERATING SYSTEM.pptxBASICS OF LINUX OPERATING SYSTEM.pptx
BASICS OF LINUX OPERATING SYSTEM.pptx
AlkaYadav79
 
bash_1_2021-command line introduction.pdf
bash_1_2021-command line introduction.pdfbash_1_2021-command line introduction.pdf
bash_1_2021-command line introduction.pdf
MuhammadAbdullah311866
 
8.1.intro unix
8.1.intro unix8.1.intro unix
8.1.intro unix
southees
 
Basics of Unix Adminisration
Basics  of Unix AdminisrationBasics  of Unix Adminisration
Basics of Unix Adminisration
Venkateswarlu Malleboina
 
Unix Basics For Testers
Unix Basics For TestersUnix Basics For Testers
Unix Basics For Testers
nitin lakhanpal
 
linux chapter 5.pptx lesson About introduction to linux
linux chapter 5.pptx lesson About introduction to linuxlinux chapter 5.pptx lesson About introduction to linux
linux chapter 5.pptx lesson About introduction to linux
zakiaxmed534
 
Introduction to LINUX
Introduction to LINUXIntroduction to LINUX
Introduction to LINUX
AVI DHALL
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
Sreenatha Reddy K R
 
linux-lecture4.pptuyhbjhbiibihbiuhbbihbi
linux-lecture4.pptuyhbjhbiibihbiuhbbihbilinux-lecture4.pptuyhbjhbiibihbiuhbbihbi
linux-lecture4.pptuyhbjhbiibihbiuhbbihbi
YajnadattaPattanayak
 
linux-lecture4.ppt
linux-lecture4.pptlinux-lecture4.ppt
linux-lecture4.ppt
LuigysToro
 
Linux file commands and shell scripts
Linux file commands and shell scriptsLinux file commands and shell scripts
Linux file commands and shell scripts
PrashantTechment
 
OS-Module 2 Linux Programming Important topics
OS-Module 2 Linux Programming Important topicsOS-Module 2 Linux Programming Important topics
OS-Module 2 Linux Programming Important topics
JithinS34
 
Basics of UNIX Commands
Basics of UNIX CommandsBasics of UNIX Commands
Basics of UNIX Commands
Subra Das
 
Linux System commands Essentialsand Basics.pptx
Linux System commands Essentialsand Basics.pptxLinux System commands Essentialsand Basics.pptx
Linux System commands Essentialsand Basics.pptx
mba1130feb2024
 
Linux file system nevigation
Linux file system nevigationLinux file system nevigation
Linux file system nevigation
hetaldobariya
 
Module 02 Using Linux Command Shell
Module 02 Using Linux Command ShellModule 02 Using Linux Command Shell
Module 02 Using Linux Command Shell
Tushar B Kute
 
Shell_Scripting.ppt
Shell_Scripting.pptShell_Scripting.ppt
Shell_Scripting.ppt
KiranMantri
 
BASICS OF LINUX OPERATING SYSTEM.pptx
BASICS OF LINUX OPERATING SYSTEM.pptxBASICS OF LINUX OPERATING SYSTEM.pptx
BASICS OF LINUX OPERATING SYSTEM.pptx
AlkaYadav79
 
bash_1_2021-command line introduction.pdf
bash_1_2021-command line introduction.pdfbash_1_2021-command line introduction.pdf
bash_1_2021-command line introduction.pdf
MuhammadAbdullah311866
 
8.1.intro unix
8.1.intro unix8.1.intro unix
8.1.intro unix
southees
 
linux chapter 5.pptx lesson About introduction to linux
linux chapter 5.pptx lesson About introduction to linuxlinux chapter 5.pptx lesson About introduction to linux
linux chapter 5.pptx lesson About introduction to linux
zakiaxmed534
 
Introduction to LINUX
Introduction to LINUXIntroduction to LINUX
Introduction to LINUX
AVI DHALL
 
Ad

Recently uploaded (20)

The Butterfly Effect in Design Entrepreneurship.pptx
The Butterfly Effect in Design Entrepreneurship.pptxThe Butterfly Effect in Design Entrepreneurship.pptx
The Butterfly Effect in Design Entrepreneurship.pptx
Prof. Hany El-Said
 
ppt nm epanet org irrigation system (1).pptx
ppt nm epanet org irrigation system (1).pptxppt nm epanet org irrigation system (1).pptx
ppt nm epanet org irrigation system (1).pptx
dondeepakff33
 
Learn the ABC with Bauhaus by Klara Francisco.pdf
Learn the ABC with Bauhaus by Klara Francisco.pdfLearn the ABC with Bauhaus by Klara Francisco.pdf
Learn the ABC with Bauhaus by Klara Francisco.pdf
KlaraJericaFrancisco
 
Using AI to Streamline Personas and Journey Map Creation
Using AI to Streamline Personas and Journey Map CreationUsing AI to Streamline Personas and Journey Map Creation
Using AI to Streamline Personas and Journey Map Creation
Kyle Soucy
 
White Blue Simple Modern Enhancing Sales Strategy Presentation.pptx
White Blue Simple Modern Enhancing Sales Strategy Presentation.pptxWhite Blue Simple Modern Enhancing Sales Strategy Presentation.pptx
White Blue Simple Modern Enhancing Sales Strategy Presentation.pptx
adamolnar2010
 
The Role of Structure and Materials in Design.pptx
The Role of Structure and Materials in Design.pptxThe Role of Structure and Materials in Design.pptx
The Role of Structure and Materials in Design.pptx
Prof. Hany El-Said
 
A Creative Portfolio Presentation by Ayon
A Creative Portfolio Presentation by AyonA Creative Portfolio Presentation by Ayon
A Creative Portfolio Presentation by Ayon
aonbanerjee
 
Furniture design for projects-vol-3-brochure.pdf
Furniture design for projects-vol-3-brochure.pdfFurniture design for projects-vol-3-brochure.pdf
Furniture design for projects-vol-3-brochure.pdf
AjayBhonge1
 
Materials and visual culture for design students.pptx
Materials and visual culture for design students.pptxMaterials and visual culture for design students.pptx
Materials and visual culture for design students.pptx
Prof. Hany El-Said
 
Untitled presentatiobsbsbsbsbsn (1).pptx
Untitled presentatiobsbsbsbsbsn (1).pptxUntitled presentatiobsbsbsbsbsn (1).pptx
Untitled presentatiobsbsbsbsbsn (1).pptx
jleena044
 
Digital Marketing Mock Project - Client Testimonial
Digital Marketing Mock Project - Client TestimonialDigital Marketing Mock Project - Client Testimonial
Digital Marketing Mock Project - Client Testimonial
Adeline Yeo
 
EHR Usability: Current Challenges and Impacts on Physicians and Patients
EHR Usability: Current Challenges and Impacts on Physicians and PatientsEHR Usability: Current Challenges and Impacts on Physicians and Patients
EHR Usability: Current Challenges and Impacts on Physicians and Patients
Dan Berlin
 
SEERAT PPT[1][1].pptx project in sant ba
SEERAT PPT[1][1].pptx project in sant baSEERAT PPT[1][1].pptx project in sant ba
SEERAT PPT[1][1].pptx project in sant ba
RanvirSingh151
 
EY – The Future of Assurance | How Technology is Transforming the Audit
EY – The Future of Assurance | How Technology is Transforming the AuditEY – The Future of Assurance | How Technology is Transforming the Audit
EY – The Future of Assurance | How Technology is Transforming the Audit
INKPPT
 
Unit 5 visual merchandiseing trend analysis. pdf
Unit 5 visual merchandiseing  trend analysis. pdfUnit 5 visual merchandiseing  trend analysis. pdf
Unit 5 visual merchandiseing trend analysis. pdf
NaziaFarheen13
 
McKinsey – Mobility Consumer Pulse 2024 | Global Trends in EVs, Shared Mobili...
McKinsey – Mobility Consumer Pulse 2024 | Global Trends in EVs, Shared Mobili...McKinsey – Mobility Consumer Pulse 2024 | Global Trends in EVs, Shared Mobili...
McKinsey – Mobility Consumer Pulse 2024 | Global Trends in EVs, Shared Mobili...
INKPPT
 
"Dino World: The Ultimate Dinosaur Coloring Book for Kids"
"Dino World: The Ultimate Dinosaur Coloring Book for Kids""Dino World: The Ultimate Dinosaur Coloring Book for Kids"
"Dino World: The Ultimate Dinosaur Coloring Book for Kids"
Ijaz Ahmad
 
BHSIWIKJHDCU.pptx MCXDT789OKNBVCDRT678IOLKNBVCXDRTYUIOKMN
BHSIWIKJHDCU.pptx MCXDT789OKNBVCDRT678IOLKNBVCXDRTYUIOKMNBHSIWIKJHDCU.pptx MCXDT789OKNBVCDRT678IOLKNBVCXDRTYUIOKMN
BHSIWIKJHDCU.pptx MCXDT789OKNBVCDRT678IOLKNBVCXDRTYUIOKMN
05241146
 
BCG’s Evolution of Travel: Rethinking Business Travel in a Post-Pandemic World
BCG’s Evolution of Travel: Rethinking Business Travel in a Post-Pandemic WorldBCG’s Evolution of Travel: Rethinking Business Travel in a Post-Pandemic World
BCG’s Evolution of Travel: Rethinking Business Travel in a Post-Pandemic World
INKPPT
 
Beautiful Motherhood (Kal-el's Shows Slideshow)
Beautiful Motherhood (Kal-el's Shows Slideshow)Beautiful Motherhood (Kal-el's Shows Slideshow)
Beautiful Motherhood (Kal-el's Shows Slideshow)
Kal-el's Shows
 
The Butterfly Effect in Design Entrepreneurship.pptx
The Butterfly Effect in Design Entrepreneurship.pptxThe Butterfly Effect in Design Entrepreneurship.pptx
The Butterfly Effect in Design Entrepreneurship.pptx
Prof. Hany El-Said
 
ppt nm epanet org irrigation system (1).pptx
ppt nm epanet org irrigation system (1).pptxppt nm epanet org irrigation system (1).pptx
ppt nm epanet org irrigation system (1).pptx
dondeepakff33
 
Learn the ABC with Bauhaus by Klara Francisco.pdf
Learn the ABC with Bauhaus by Klara Francisco.pdfLearn the ABC with Bauhaus by Klara Francisco.pdf
Learn the ABC with Bauhaus by Klara Francisco.pdf
KlaraJericaFrancisco
 
Using AI to Streamline Personas and Journey Map Creation
Using AI to Streamline Personas and Journey Map CreationUsing AI to Streamline Personas and Journey Map Creation
Using AI to Streamline Personas and Journey Map Creation
Kyle Soucy
 
White Blue Simple Modern Enhancing Sales Strategy Presentation.pptx
White Blue Simple Modern Enhancing Sales Strategy Presentation.pptxWhite Blue Simple Modern Enhancing Sales Strategy Presentation.pptx
White Blue Simple Modern Enhancing Sales Strategy Presentation.pptx
adamolnar2010
 
The Role of Structure and Materials in Design.pptx
The Role of Structure and Materials in Design.pptxThe Role of Structure and Materials in Design.pptx
The Role of Structure and Materials in Design.pptx
Prof. Hany El-Said
 
A Creative Portfolio Presentation by Ayon
A Creative Portfolio Presentation by AyonA Creative Portfolio Presentation by Ayon
A Creative Portfolio Presentation by Ayon
aonbanerjee
 
Furniture design for projects-vol-3-brochure.pdf
Furniture design for projects-vol-3-brochure.pdfFurniture design for projects-vol-3-brochure.pdf
Furniture design for projects-vol-3-brochure.pdf
AjayBhonge1
 
Materials and visual culture for design students.pptx
Materials and visual culture for design students.pptxMaterials and visual culture for design students.pptx
Materials and visual culture for design students.pptx
Prof. Hany El-Said
 
Untitled presentatiobsbsbsbsbsn (1).pptx
Untitled presentatiobsbsbsbsbsn (1).pptxUntitled presentatiobsbsbsbsbsn (1).pptx
Untitled presentatiobsbsbsbsbsn (1).pptx
jleena044
 
Digital Marketing Mock Project - Client Testimonial
Digital Marketing Mock Project - Client TestimonialDigital Marketing Mock Project - Client Testimonial
Digital Marketing Mock Project - Client Testimonial
Adeline Yeo
 
EHR Usability: Current Challenges and Impacts on Physicians and Patients
EHR Usability: Current Challenges and Impacts on Physicians and PatientsEHR Usability: Current Challenges and Impacts on Physicians and Patients
EHR Usability: Current Challenges and Impacts on Physicians and Patients
Dan Berlin
 
SEERAT PPT[1][1].pptx project in sant ba
SEERAT PPT[1][1].pptx project in sant baSEERAT PPT[1][1].pptx project in sant ba
SEERAT PPT[1][1].pptx project in sant ba
RanvirSingh151
 
EY – The Future of Assurance | How Technology is Transforming the Audit
EY – The Future of Assurance | How Technology is Transforming the AuditEY – The Future of Assurance | How Technology is Transforming the Audit
EY – The Future of Assurance | How Technology is Transforming the Audit
INKPPT
 
Unit 5 visual merchandiseing trend analysis. pdf
Unit 5 visual merchandiseing  trend analysis. pdfUnit 5 visual merchandiseing  trend analysis. pdf
Unit 5 visual merchandiseing trend analysis. pdf
NaziaFarheen13
 
McKinsey – Mobility Consumer Pulse 2024 | Global Trends in EVs, Shared Mobili...
McKinsey – Mobility Consumer Pulse 2024 | Global Trends in EVs, Shared Mobili...McKinsey – Mobility Consumer Pulse 2024 | Global Trends in EVs, Shared Mobili...
McKinsey – Mobility Consumer Pulse 2024 | Global Trends in EVs, Shared Mobili...
INKPPT
 
"Dino World: The Ultimate Dinosaur Coloring Book for Kids"
"Dino World: The Ultimate Dinosaur Coloring Book for Kids""Dino World: The Ultimate Dinosaur Coloring Book for Kids"
"Dino World: The Ultimate Dinosaur Coloring Book for Kids"
Ijaz Ahmad
 
BHSIWIKJHDCU.pptx MCXDT789OKNBVCDRT678IOLKNBVCXDRTYUIOKMN
BHSIWIKJHDCU.pptx MCXDT789OKNBVCDRT678IOLKNBVCXDRTYUIOKMNBHSIWIKJHDCU.pptx MCXDT789OKNBVCDRT678IOLKNBVCXDRTYUIOKMN
BHSIWIKJHDCU.pptx MCXDT789OKNBVCDRT678IOLKNBVCXDRTYUIOKMN
05241146
 
BCG’s Evolution of Travel: Rethinking Business Travel in a Post-Pandemic World
BCG’s Evolution of Travel: Rethinking Business Travel in a Post-Pandemic WorldBCG’s Evolution of Travel: Rethinking Business Travel in a Post-Pandemic World
BCG’s Evolution of Travel: Rethinking Business Travel in a Post-Pandemic World
INKPPT
 
Beautiful Motherhood (Kal-el's Shows Slideshow)
Beautiful Motherhood (Kal-el's Shows Slideshow)Beautiful Motherhood (Kal-el's Shows Slideshow)
Beautiful Motherhood (Kal-el's Shows Slideshow)
Kal-el's Shows
 
Ad

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

  翻译: