SlideShare a Scribd company logo
UNIX Operating Systems
and
Commands
Introduction
• Operating System:
 It acts as an interface between the user and
system.
 a system that manages the resources of a
computer.
• Resources:
 CPUs, Memory, I/O devices, Network etc..
Unix Architecture
 Hardware
 Kernel
 Shell
hardware
kernel
sh who
date
ed
wc
grep
as
nroff
ld
cpp
Other apps
Kernel
• Three major tasks of kernel:
 Process Management
 Device Management
 File Management
Shell
 The shell acts as an interface between
the user and the kernel
 A shell is an environment in which we
can run our commands, it is also called
as a command-line interpreter
Basic Linux Commands
• File Handling
• Text Processing
• System Administration
• Process Management
• Archival
• Network
• File Systems
• Advanced Commands
Files
 Everything in unix is considered as a file,
including the physical devices like flash
device, network cards etc..
 Logical collection of files is called as file
system or Unix file system(UFS).
 A UFS(unix file system) contains both inode
and contents of the file.
 Every file as a unique number to identify, this
number is called as an inode number.
Files…..
 We can classify files into 3
1. Ordinary Files
• Text File
• Binary File
2. Device Files
3. Directory Files / Special Files
Unix File Attributes
 File Permissions
1. Read: ‘r’ If you have read permission of a file, you
can see the contents of the file.
2. Write: ‘w’ If you have write permission of a file,
you can change the file. This means you can add to
a file, or overwrite a file. You can empty a file.
3. Execute: ‘x’ If the file has execute permission, then
you can ask the operating system to run the file as
if it were a program. If it's a binary file/program,
you can execute it like any other program.
File Attribute…
1. File type/File Permissions
2. Link
3. Owner
4. Group
5. Size
6. Last Modified Time
7. File Name
NOTE: ‘ls –l’ command lists the files in
the directory along with their attributes.
1. File type/ File permissions
 The first field of ls –l command gives the details of file type
and file permission
 This field as 10 characters.
_|_ _ _|_ _ _|_ _ _
FILE TYPE
FILE PERMISSIONS
1. FILE TYPE
the first character of the first field defines the type of the
file.
‘d’ – specifies that the file is a ‘directory file’ or a ‘special file’
‘-’ – spefies that a file is not a directory file.
 File Permissions:
Unix has three categories of file permission.
_ _ _ | _ _ _ | _ _ _
r w x r w x r w x
USER (U)
GROUP (G)
OTHER (O)
U G O
To change file Permission
 ‘chmod’ command is used to change the permissions of
the file.
USAGE: chmod [options] mode[,mode] file1 [file2 ...]
 Unix allows the user to specify modes in two ways.
1. Absolute
2. Relative
1. Absolute:
in this we use a series of 3 octal numbers to specify
the permission of a file.
Ex: chmod 501 demo.txt, chmod 777 demo.txt
 | rwx | 111 | 7 | Read, write and execute |
 | rw- | 110 | 6 | Read, write |
 | r-x | 101 | 5 | Read, and execute |
 | r-- | 100 | 4 | Read, |
 | -wx | 011 | 3 | Write and execute |
 | -w- | 010 | 2 | Write |
 | --x | 001 | 1 | Execute |
 | --- | 000 | 0 | no permissions |
+----------------------------------------------------+
 RELATIVE
In this mode ‘=‘ , ‘+’, ‘-’ operators are used to
assign, give and remove permissions.
On the LHS specify the category u,g,o,a.
On the RHS specify the permission r,w,x.
Ex: chmod u+r demo.txt
chmod u+rw demo.txt
chmod ug+rwx demo.txt
chmod a+rwx demo.txt
chmod u+rw,g+x demo.txt
INODE
 Is a data structure and it contains following details of the
file:
1. Mode/permission (protection)
2. Owner ID
3. Group ID
4. Size of file
5. Number of hard links to the file
6. Time last accessed
7. Time last modified
8. Time inode last modified
 ‘-i’ option along with ls command is used to see the
inode number of a file.
2. Link
 A link in UNIX is a pointer to a file. Like pointers in
any programming languages, links in UNIX are
pointers pointing to a file or a directory . Creating
links is a kind of shortcuts to access a file.
 It is similar to creating multiple names of the file to
access from different directories.
 The two different types of links in UNIX are:
1. Soft Links or Symbolic Links
2. Hard links
ln Command
 This command is used to create link for a file.
USAGE: ln [option] target link_name
ex: ln file1 file2
 ‘-s’ option is used to provide a soft link.
USAGE: ln –s target_file Link_name
ex: ln –s file1 file3
Hard link
 A hard link is an additional name for an existing file
on Unix-like operating systems. Any number of hard
links can be created for a file, and thus any number of
names, can be created for any file
 The inode of the hard linked file remains same as the
original file.
 On deleting the original file, hard linked file can still be
accessed.
 By giving the hard link the link count of the file will
increase.
 Hard links do not need any extra data memory to save
since it uses links
 Can be created only on files, not on directories.
Soft/Symbolic Link
 In computing, a symbolic link (soft link) is the nickname for
any file that contains a reference to another file or directory in
the form of an absolute or relative path and that affects
pathname resolution.
 Soft link can be created for non exiting file.
 oft link has a different inode number than the original file
 On deleting the original file, soft link cannot be accessed.
 Soft link needs extra memory to store the original file name as
its data.
 Access to the file is slower due to the overhead to access file.
3. Owner
 Gives the name of the owner of the file.
 We can change the owner of the file using the
command ‘chown’.
usage: chown owner file
4.Group
 Gives the name of the group a file belong to.
 We can change the group of the file using the
command ‘chgrp’.
Usage: chgrp group file
Sources to learn commands??
(man)
λ
Primary – man(manual) pages.1
2
man <command> ­ shows all information about the
command ex: man ls
<command> ­­­­help ­ shows the available options
for that command ex: ls ­­help
File Handling
commands
•
•
mkdir – is used to create directories
Usage: mkdir [OPTION]
DIRECTORY...
ex: mkdir demo
ls – is used to list all the files and
subdirectories
of the current directory.
Usage: ls [OPTION]... [FILE]...
eg. ls, ls ­l, ls ­l demo
File
Handling(contd...)
• pwd -­ print name of current working directory
Usage: pwd
• cd ­ change directories
Usage: cd [DIRECTORY]
eg. cd demo
Note: the Directory can be a relative or absolute path
of Directory
cp – copy files and directories
Usage: cp [OPTION]... SOURCE DEST
Examples:
1. cp file1 file2
cp a.txt b.txt
2. cp file 1 file2…. filen directory
cp file1 file2 /home/user/demo
mv – this command is used to move a file
from one directory to another
It is also used to rename a file.
Usage: mv [OPTION]... SOURCE DEST
eg. mv source.txt target_dir
mv old.txt new.txt
rm ­ remove files or directories
Usage: rm [OPTION]... FILE... eg. rm file1.txt , rm ­rf
some_dir
• find – search for files in a directory
hierarchy
Usage: find [OPTION] [path]
[action]
eg. 1. find file1.txt,
2. find ­­name file1.txt
• history – prints recently used commands
Usage: history
TO create an USER
 ‘addusr’ command is used to create a user.
 To create a new user the user should be logged
in as a root­user.
usage: addusr user_name
TO switch User
 ‘su’ command is used to switch from one user to another
Usage: su User_name
 It asks for the password to login.
 ‘exit’ command is used to come out of the logged in
user.
How to login as root ?
 ‘sudo su’ command is used to login as a root-user.
usage: sudo su
 It will ask for the password.
 The user should have permission to login as the root-user.
 All the users having root permissions are stored in a file
‘visudo’.
To remove User
 ‘delusr’ command is used to delete a user.
usage: delusr user-name
 You should be log-in as a root-user to delete an
user.
Basic Regular Expression
 The BRE a{1,2} matches a{1,2} literally,
while a{1,2} matches a or aa.
 As {,},+,?,(,),.. Are treated as a normal
symbols and we have to use a ‘’ to give
special meaning to them.
 As ?,+,.. Are not supported by POSIX
(Portable Operating system Interface for Unix)
BRE.
 We use grep command for BRE.
Extended Regular Expression
 The quantifiers ?, +, {n}, {n,m} and {n,} repea
t the preceding token zero or once, once or
more, n times, between n and m times, and n or
more times, respectively.
 These above quantifiers are supported by
POSIX ERE and we use egrep or grep –E
command.
Metacharacters
 ^ (Caret)=match expression at the start of a line, as in
^A.
 $ (Dollar)=match expression at the end of a line, as in
A$.
  (Back Slash)=turn off the special meaning of the next
character, as in ^.
 [ ] (Brackets)=match any one of the enclosed characters,
as in [aeiou]. Use Hyphen "-" for a range, as in [0-9].
 [^ ]=match any one character except those enclosed in
[ ], as in [^0-9].
 . (Period)=match a single character of any
value, except end of line.
 * (Asterisk)=match zero or more of the
preceding character or expression.
 {x,y}=match x to y occurrences of the
preceding.
 {x}=match exactly x occurrences of the
preceding.
 {x,}=match x or more occurrences of
the preceding.
Searching for a pattern in UINIX
 Unix has a special family of commands for handling
search requirements.
 The main member of this family is the grep
command.
GREP: (Global Regular Expression Parser)
 It scans its input for a pattern and displays lines
containing the pattern.
Examples
 grep '^From: ' demo.txt
 grep '[a-zA-Z]'{any line with at least one
letter}
 grep '[^a-zA-Z0-9]{anything not a letter or
number}
 grep '[0-9]{3}-[0-9]{4}'{999-9999, like
phone numbers}
 grep '^.$'{lines with exactly one character}
 grep '"smug"'{'smug' within double
quotes}
 grep '"*smug"*'{'smug', with or without
quotes}
 grep '^.'{any line that starts with a
Period "."}
 grep '^.[a-z][a-z]'{line start with "." and
2 letters}
Ad

More Related Content

What's hot (20)

Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013
Wave Digitech
 
Part 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module ProgrammingPart 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module Programming
Tushar B Kute
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
Nikhil Jain
 
Unix
UnixUnix
Unix
Erm78
 
Shell Scripting
Shell ScriptingShell Scripting
Shell Scripting
Gaurav Shinde
 
makefiles tutorial
makefiles tutorialmakefiles tutorial
makefiles tutorial
vsubhashini
 
Basics of shell programming
Basics of shell programmingBasics of shell programming
Basics of shell programming
Chandan Kumar Rana
 
Vi editor
Vi editorVi editor
Vi editor
ParikshitTaksande1
 
Linux - Introductions to Linux Operating System
Linux - Introductions to Linux Operating SystemLinux - Introductions to Linux Operating System
Linux - Introductions to Linux Operating System
Vibrant Technologies & Computers
 
Linux command ppt
Linux command pptLinux command ppt
Linux command ppt
kalyanineve
 
linux file sysytem& input and output
linux file sysytem& input and outputlinux file sysytem& input and output
linux file sysytem& input and output
MythiliA5
 
Pipes and filters
Pipes and filtersPipes and filters
Pipes and filters
bhatvijetha
 
Introduction to linux at Introductory Bioinformatics Workshop
Introduction to linux at Introductory Bioinformatics WorkshopIntroduction to linux at Introductory Bioinformatics Workshop
Introduction to linux at Introductory Bioinformatics Workshop
Setor Amuzu
 
Linux Basic Commands
Linux Basic CommandsLinux Basic Commands
Linux Basic Commands
Hanan Nmr
 
Implementation of FIFO in Linux
Implementation of FIFO in LinuxImplementation of FIFO in Linux
Implementation of FIFO in Linux
Tushar B Kute
 
SHELL PROGRAMMING
SHELL PROGRAMMINGSHELL PROGRAMMING
SHELL PROGRAMMING
jinal thakrar
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
Manav Prasad
 
Shell programming
Shell programmingShell programming
Shell programming
Moayad Moawiah
 
Bash Shell Scripting
Bash Shell ScriptingBash Shell Scripting
Bash Shell Scripting
Raghu nath
 
Linux cheat-sheet
Linux cheat-sheetLinux cheat-sheet
Linux cheat-sheet
Craig Cannon
 
Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013
Wave Digitech
 
Part 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module ProgrammingPart 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module Programming
Tushar B Kute
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
Nikhil Jain
 
Unix
UnixUnix
Unix
Erm78
 
makefiles tutorial
makefiles tutorialmakefiles tutorial
makefiles tutorial
vsubhashini
 
Linux command ppt
Linux command pptLinux command ppt
Linux command ppt
kalyanineve
 
linux file sysytem& input and output
linux file sysytem& input and outputlinux file sysytem& input and output
linux file sysytem& input and output
MythiliA5
 
Pipes and filters
Pipes and filtersPipes and filters
Pipes and filters
bhatvijetha
 
Introduction to linux at Introductory Bioinformatics Workshop
Introduction to linux at Introductory Bioinformatics WorkshopIntroduction to linux at Introductory Bioinformatics Workshop
Introduction to linux at Introductory Bioinformatics Workshop
Setor Amuzu
 
Linux Basic Commands
Linux Basic CommandsLinux Basic Commands
Linux Basic Commands
Hanan Nmr
 
Implementation of FIFO in Linux
Implementation of FIFO in LinuxImplementation of FIFO in Linux
Implementation of FIFO in Linux
Tushar B Kute
 
Bash Shell Scripting
Bash Shell ScriptingBash Shell Scripting
Bash Shell Scripting
Raghu nath
 

Viewers also liked (20)

QSpiders - Automation using Selenium
QSpiders - Automation using SeleniumQSpiders - Automation using Selenium
QSpiders - Automation using Selenium
Qspiders - Software Testing Training Institute
 
QSpiders - Selenium Webdriver
QSpiders - Selenium WebdriverQSpiders - Selenium Webdriver
QSpiders - Selenium Webdriver
Qspiders - Software Testing Training Institute
 
intro unix/linux 02
intro unix/linux 02intro unix/linux 02
intro unix/linux 02
duquoi
 
Unix(introduction)
Unix(introduction)Unix(introduction)
Unix(introduction)
meashi
 
Unix Command Line Productivity Tips
Unix Command Line Productivity TipsUnix Command Line Productivity Tips
Unix Command Line Productivity Tips
Keith Bennett
 
Unix OS & Commands
Unix OS & CommandsUnix OS & Commands
Unix OS & Commands
Mohit Belwal
 
UNIX and Linux - an introduction by Mathias Homann
UNIX and Linux - an introduction by Mathias HomannUNIX and Linux - an introduction by Mathias Homann
UNIX and Linux - an introduction by Mathias Homann
Mathias Homann
 
Linux intro 3 grep + Unix piping
Linux intro 3 grep + Unix pipingLinux intro 3 grep + Unix piping
Linux intro 3 grep + Unix piping
Giovanni Marco Dall'Olio
 
Unix - An Introduction
Unix - An IntroductionUnix - An Introduction
Unix - An Introduction
Deepanshu Gahlaut
 
UNIX Operating System
UNIX Operating SystemUNIX Operating System
UNIX Operating System
Unless Yuriko
 
Unix memory management
Unix memory managementUnix memory management
Unix memory management
Tech_MX
 
Basic Unix
Basic UnixBasic Unix
Basic Unix
Rajesh Kumar
 
Unix command-line tools
Unix command-line toolsUnix command-line tools
Unix command-line tools
Eric Wilson
 
Unix Operating System
Unix Operating SystemUnix Operating System
Unix Operating System
subhsikha
 
UNIX/Linux training
UNIX/Linux trainingUNIX/Linux training
UNIX/Linux training
Michael Olafusi
 
Practical Example of grep command in unix
Practical Example of grep command in unixPractical Example of grep command in unix
Practical Example of grep command in unix
Javin Paul
 
Data base
Data baseData base
Data base
Gc university faisalabad
 
QSpiders - Day1 Network Basics
QSpiders - Day1 Network BasicsQSpiders - Day1 Network Basics
QSpiders - Day1 Network Basics
Qspiders - Software Testing Training Institute
 
Unix Training - 1
Unix Training - 1Unix Training - 1
Unix Training - 1
ankitmehta21
 
Ad

Similar to QSpiders - Unix Operating Systems and Commands (20)

Commands and shell programming (3)
Commands and shell programming (3)Commands and shell programming (3)
Commands and shell programming (3)
christ university
 
os lab commanaaaaaaaaaaaaaaaaaaaaaads.pptx
os lab commanaaaaaaaaaaaaaaaaaaaaaads.pptxos lab commanaaaaaaaaaaaaaaaaaaaaaads.pptx
os lab commanaaaaaaaaaaaaaaaaaaaaaads.pptx
AdityaGupta221734
 
Unix training session 1
Unix training   session 1Unix training   session 1
Unix training session 1
Anil Kumar Kapil,PMP®
 
Unix3
Unix3Unix3
Unix3
Krishna Prasad
 
Unit 7
Unit 7Unit 7
Unit 7
siddr
 
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
 
04-1-Linux.ppt
04-1-Linux.ppt04-1-Linux.ppt
04-1-Linux.ppt
EidTahir
 
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to Linux
Dimas Prasetyo
 
Lession1 Linux Preview
Lession1 Linux PreviewLession1 Linux Preview
Lession1 Linux Preview
leminhvuong
 
Basic Linux
Basic LinuxBasic Linux
Basic Linux
Tan Huynh Cong
 
linux-lecture4.ppt
linux-lecture4.pptlinux-lecture4.ppt
linux-lecture4.ppt
LuigysToro
 
linux-lecture4.pptuyhbjhbiibihbiuhbbihbi
linux-lecture4.pptuyhbjhbiibihbiuhbbihbilinux-lecture4.pptuyhbjhbiibihbiuhbbihbi
linux-lecture4.pptuyhbjhbiibihbiuhbbihbi
YajnadattaPattanayak
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
Sreenatha Reddy K R
 
Rishav Mishra final presentation on UNIX Final.pptx
Rishav Mishra final presentation on UNIX Final.pptxRishav Mishra final presentation on UNIX Final.pptx
Rishav Mishra final presentation on UNIX Final.pptx
rishavmishra041
 
2. UNIX OS System Architecture easy.pptx
2. UNIX OS System Architecture easy.pptx2. UNIX OS System Architecture easy.pptx
2. UNIX OS System Architecture easy.pptx
Priyadarshini648418
 
2ab. UNIX files.ppt JSS science and technology university
2ab. UNIX files.ppt JSS science and technology university2ab. UNIX files.ppt JSS science and technology university
2ab. UNIX files.ppt JSS science and technology university
tempemailtemp19
 
Karkha unix shell scritping
Karkha unix shell scritpingKarkha unix shell scritping
Karkha unix shell scritping
chockit88
 
various shell commands in unix operating system.pptx
various shell commands in unix operating system.pptxvarious shell commands in unix operating system.pptx
various shell commands in unix operating system.pptx
ssuserc26f8f
 
Linuxnishustud
LinuxnishustudLinuxnishustud
Linuxnishustud
Vicky Singh
 
Basic unix commands_1
Basic unix commands_1Basic unix commands_1
Basic unix commands_1
thakor bharati
 
Commands and shell programming (3)
Commands and shell programming (3)Commands and shell programming (3)
Commands and shell programming (3)
christ university
 
os lab commanaaaaaaaaaaaaaaaaaaaaaads.pptx
os lab commanaaaaaaaaaaaaaaaaaaaaaads.pptxos lab commanaaaaaaaaaaaaaaaaaaaaaads.pptx
os lab commanaaaaaaaaaaaaaaaaaaaaaads.pptx
AdityaGupta221734
 
Unit 7
Unit 7Unit 7
Unit 7
siddr
 
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
 
04-1-Linux.ppt
04-1-Linux.ppt04-1-Linux.ppt
04-1-Linux.ppt
EidTahir
 
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to Linux
Dimas Prasetyo
 
Lession1 Linux Preview
Lession1 Linux PreviewLession1 Linux Preview
Lession1 Linux Preview
leminhvuong
 
linux-lecture4.ppt
linux-lecture4.pptlinux-lecture4.ppt
linux-lecture4.ppt
LuigysToro
 
linux-lecture4.pptuyhbjhbiibihbiuhbbihbi
linux-lecture4.pptuyhbjhbiibihbiuhbbihbilinux-lecture4.pptuyhbjhbiibihbiuhbbihbi
linux-lecture4.pptuyhbjhbiibihbiuhbbihbi
YajnadattaPattanayak
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
Sreenatha Reddy K R
 
Rishav Mishra final presentation on UNIX Final.pptx
Rishav Mishra final presentation on UNIX Final.pptxRishav Mishra final presentation on UNIX Final.pptx
Rishav Mishra final presentation on UNIX Final.pptx
rishavmishra041
 
2. UNIX OS System Architecture easy.pptx
2. UNIX OS System Architecture easy.pptx2. UNIX OS System Architecture easy.pptx
2. UNIX OS System Architecture easy.pptx
Priyadarshini648418
 
2ab. UNIX files.ppt JSS science and technology university
2ab. UNIX files.ppt JSS science and technology university2ab. UNIX files.ppt JSS science and technology university
2ab. UNIX files.ppt JSS science and technology university
tempemailtemp19
 
Karkha unix shell scritping
Karkha unix shell scritpingKarkha unix shell scritping
Karkha unix shell scritping
chockit88
 
various shell commands in unix operating system.pptx
various shell commands in unix operating system.pptxvarious shell commands in unix operating system.pptx
various shell commands in unix operating system.pptx
ssuserc26f8f
 
Ad

More from Qspiders - Software Testing Training Institute (20)

QSpiders - Variable Length-Subnet-Masks
QSpiders - Variable Length-Subnet-MasksQSpiders - Variable Length-Subnet-Masks
QSpiders - Variable Length-Subnet-Masks
Qspiders - Software Testing Training Institute
 
QSpiders - Upper layer-protocols
QSpiders - Upper layer-protocolsQSpiders - Upper layer-protocols
QSpiders - Upper layer-protocols
Qspiders - Software Testing Training Institute
 
QSpiders - Dod Model
QSpiders - Dod ModelQSpiders - Dod Model
QSpiders - Dod Model
Qspiders - Software Testing Training Institute
 
QSpiders - Aptitude Assignments
QSpiders - Aptitude AssignmentsQSpiders - Aptitude Assignments
QSpiders - Aptitude Assignments
Qspiders - Software Testing Training Institute
 
QSpiders - SQL (Data Base)
QSpiders - SQL (Data Base)QSpiders - SQL (Data Base)
QSpiders - SQL (Data Base)
Qspiders - Software Testing Training Institute
 
QSpiders - Chapter 7 Debugging
QSpiders - Chapter 7 DebuggingQSpiders - Chapter 7 Debugging
QSpiders - Chapter 7 Debugging
Qspiders - Software Testing Training Institute
 
QSpiders - Chapter 4 Checkpoints
QSpiders - Chapter 4 CheckpointsQSpiders - Chapter 4 Checkpoints
QSpiders - Chapter 4 Checkpoints
Qspiders - Software Testing Training Institute
 
QSpiders - Simple Recording and Configuration of recording options for HP Loa...
QSpiders - Simple Recording and Configuration of recording options for HP Loa...QSpiders - Simple Recording and Configuration of recording options for HP Loa...
QSpiders - Simple Recording and Configuration of recording options for HP Loa...
Qspiders - Software Testing Training Institute
 
QSpiders - Wonderlic Sample Question
QSpiders - Wonderlic Sample QuestionQSpiders - Wonderlic Sample Question
QSpiders - Wonderlic Sample Question
Qspiders - Software Testing Training Institute
 
QSpiders - Chapter- 3 Synchronization point
QSpiders - Chapter- 3 Synchronization pointQSpiders - Chapter- 3 Synchronization point
QSpiders - Chapter- 3 Synchronization point
Qspiders - Software Testing Training Institute
 
QSpiders - Presentation JMeter
QSpiders - Presentation JMeterQSpiders - Presentation JMeter
QSpiders - Presentation JMeter
Qspiders - Software Testing Training Institute
 
QSpiders - Memory (JVM architecture)
QSpiders - Memory (JVM architecture)QSpiders - Memory (JVM architecture)
QSpiders - Memory (JVM architecture)
Qspiders - Software Testing Training Institute
 
QSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and JitQSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and Jit
Qspiders - Software Testing Training Institute
 
QSpiders - Simple replay and run time settings Loadrunner
QSpiders - Simple replay and run time settings LoadrunnerQSpiders - Simple replay and run time settings Loadrunner
QSpiders - Simple replay and run time settings Loadrunner
Qspiders - Software Testing Training Institute
 
QSpiders - Major difference
QSpiders - Major differenceQSpiders - Major difference
QSpiders - Major difference
Qspiders - Software Testing Training Institute
 
QSpiders - Introduction to HP Load Runner
QSpiders - Introduction to HP Load RunnerQSpiders - Introduction to HP Load Runner
QSpiders - Introduction to HP Load Runner
Qspiders - Software Testing Training Institute
 
QSpiders - Interacting with My SQL Database
QSpiders - Interacting with My SQL DatabaseQSpiders - Interacting with My SQL Database
QSpiders - Interacting with My SQL Database
Qspiders - Software Testing Training Institute
 
QSpiders - Server Architecture
QSpiders - Server ArchitectureQSpiders - Server Architecture
QSpiders - Server Architecture
Qspiders - Software Testing Training Institute
 
QSpiders - Installation and Brief Dose of Load Runner
QSpiders - Installation and Brief Dose of Load RunnerQSpiders - Installation and Brief Dose of Load Runner
QSpiders - Installation and Brief Dose of Load Runner
Qspiders - Software Testing Training Institute
 
QSpiders - Good to Know Network Concepts
QSpiders - Good to Know Network ConceptsQSpiders - Good to Know Network Concepts
QSpiders - Good to Know Network Concepts
Qspiders - Software Testing Training Institute
 

Recently uploaded (20)

Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Political History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptxPolitical History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 

QSpiders - Unix Operating Systems and Commands

  • 2. Introduction • Operating System:  It acts as an interface between the user and system.  a system that manages the resources of a computer. • Resources:  CPUs, Memory, I/O devices, Network etc..
  • 3. Unix Architecture  Hardware  Kernel  Shell hardware kernel sh who date ed wc grep as nroff ld cpp Other apps
  • 4. Kernel • Three major tasks of kernel:  Process Management  Device Management  File Management
  • 5. Shell  The shell acts as an interface between the user and the kernel  A shell is an environment in which we can run our commands, it is also called as a command-line interpreter
  • 6. Basic Linux Commands • File Handling • Text Processing • System Administration • Process Management • Archival • Network • File Systems • Advanced Commands
  • 7. Files  Everything in unix is considered as a file, including the physical devices like flash device, network cards etc..  Logical collection of files is called as file system or Unix file system(UFS).  A UFS(unix file system) contains both inode and contents of the file.  Every file as a unique number to identify, this number is called as an inode number.
  • 8. Files…..  We can classify files into 3 1. Ordinary Files • Text File • Binary File 2. Device Files 3. Directory Files / Special Files
  • 9. Unix File Attributes  File Permissions 1. Read: ‘r’ If you have read permission of a file, you can see the contents of the file. 2. Write: ‘w’ If you have write permission of a file, you can change the file. This means you can add to a file, or overwrite a file. You can empty a file. 3. Execute: ‘x’ If the file has execute permission, then you can ask the operating system to run the file as if it were a program. If it's a binary file/program, you can execute it like any other program.
  • 10. File Attribute… 1. File type/File Permissions 2. Link 3. Owner 4. Group 5. Size 6. Last Modified Time 7. File Name NOTE: ‘ls –l’ command lists the files in the directory along with their attributes.
  • 11. 1. File type/ File permissions  The first field of ls –l command gives the details of file type and file permission  This field as 10 characters. _|_ _ _|_ _ _|_ _ _ FILE TYPE FILE PERMISSIONS 1. FILE TYPE the first character of the first field defines the type of the file. ‘d’ – specifies that the file is a ‘directory file’ or a ‘special file’ ‘-’ – spefies that a file is not a directory file.
  • 12.  File Permissions: Unix has three categories of file permission. _ _ _ | _ _ _ | _ _ _ r w x r w x r w x USER (U) GROUP (G) OTHER (O) U G O
  • 13. To change file Permission  ‘chmod’ command is used to change the permissions of the file. USAGE: chmod [options] mode[,mode] file1 [file2 ...]  Unix allows the user to specify modes in two ways. 1. Absolute 2. Relative 1. Absolute: in this we use a series of 3 octal numbers to specify the permission of a file. Ex: chmod 501 demo.txt, chmod 777 demo.txt
  • 14.  | rwx | 111 | 7 | Read, write and execute |  | rw- | 110 | 6 | Read, write |  | r-x | 101 | 5 | Read, and execute |  | r-- | 100 | 4 | Read, |  | -wx | 011 | 3 | Write and execute |  | -w- | 010 | 2 | Write |  | --x | 001 | 1 | Execute |  | --- | 000 | 0 | no permissions | +----------------------------------------------------+
  • 15.  RELATIVE In this mode ‘=‘ , ‘+’, ‘-’ operators are used to assign, give and remove permissions. On the LHS specify the category u,g,o,a. On the RHS specify the permission r,w,x. Ex: chmod u+r demo.txt chmod u+rw demo.txt chmod ug+rwx demo.txt chmod a+rwx demo.txt chmod u+rw,g+x demo.txt
  • 16. INODE  Is a data structure and it contains following details of the file: 1. Mode/permission (protection) 2. Owner ID 3. Group ID 4. Size of file 5. Number of hard links to the file 6. Time last accessed 7. Time last modified 8. Time inode last modified  ‘-i’ option along with ls command is used to see the inode number of a file.
  • 17. 2. Link  A link in UNIX is a pointer to a file. Like pointers in any programming languages, links in UNIX are pointers pointing to a file or a directory . Creating links is a kind of shortcuts to access a file.  It is similar to creating multiple names of the file to access from different directories.  The two different types of links in UNIX are: 1. Soft Links or Symbolic Links 2. Hard links
  • 18. ln Command  This command is used to create link for a file. USAGE: ln [option] target link_name ex: ln file1 file2  ‘-s’ option is used to provide a soft link. USAGE: ln –s target_file Link_name ex: ln –s file1 file3
  • 19. Hard link  A hard link is an additional name for an existing file on Unix-like operating systems. Any number of hard links can be created for a file, and thus any number of names, can be created for any file  The inode of the hard linked file remains same as the original file.  On deleting the original file, hard linked file can still be accessed.  By giving the hard link the link count of the file will increase.  Hard links do not need any extra data memory to save since it uses links  Can be created only on files, not on directories.
  • 20. Soft/Symbolic Link  In computing, a symbolic link (soft link) is the nickname for any file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution.  Soft link can be created for non exiting file.  oft link has a different inode number than the original file  On deleting the original file, soft link cannot be accessed.  Soft link needs extra memory to store the original file name as its data.  Access to the file is slower due to the overhead to access file.
  • 21. 3. Owner  Gives the name of the owner of the file.  We can change the owner of the file using the command ‘chown’. usage: chown owner file
  • 22. 4.Group  Gives the name of the group a file belong to.  We can change the group of the file using the command ‘chgrp’. Usage: chgrp group file
  • 23. Sources to learn commands?? (man) λ Primary – man(manual) pages.1 2 man <command> ­ shows all information about the command ex: man ls <command> ­­­­help ­ shows the available options for that command ex: ls ­­help
  • 24. File Handling commands • • mkdir – is used to create directories Usage: mkdir [OPTION] DIRECTORY... ex: mkdir demo ls – is used to list all the files and subdirectories of the current directory. Usage: ls [OPTION]... [FILE]... eg. ls, ls ­l, ls ­l demo
  • 25. File Handling(contd...) • pwd -­ print name of current working directory Usage: pwd • cd ­ change directories Usage: cd [DIRECTORY] eg. cd demo Note: the Directory can be a relative or absolute path of Directory
  • 26. cp – copy files and directories Usage: cp [OPTION]... SOURCE DEST Examples: 1. cp file1 file2 cp a.txt b.txt 2. cp file 1 file2…. filen directory cp file1 file2 /home/user/demo
  • 27. mv – this command is used to move a file from one directory to another It is also used to rename a file. Usage: mv [OPTION]... SOURCE DEST eg. mv source.txt target_dir mv old.txt new.txt rm ­ remove files or directories Usage: rm [OPTION]... FILE... eg. rm file1.txt , rm ­rf some_dir
  • 28. • find – search for files in a directory hierarchy Usage: find [OPTION] [path] [action] eg. 1. find file1.txt, 2. find ­­name file1.txt • history – prints recently used commands Usage: history
  • 29. TO create an USER  ‘addusr’ command is used to create a user.  To create a new user the user should be logged in as a root­user. usage: addusr user_name
  • 30. TO switch User  ‘su’ command is used to switch from one user to another Usage: su User_name  It asks for the password to login.  ‘exit’ command is used to come out of the logged in user.
  • 31. How to login as root ?  ‘sudo su’ command is used to login as a root-user. usage: sudo su  It will ask for the password.  The user should have permission to login as the root-user.  All the users having root permissions are stored in a file ‘visudo’.
  • 32. To remove User  ‘delusr’ command is used to delete a user. usage: delusr user-name  You should be log-in as a root-user to delete an user.
  • 33. Basic Regular Expression  The BRE a{1,2} matches a{1,2} literally, while a{1,2} matches a or aa.  As {,},+,?,(,),.. Are treated as a normal symbols and we have to use a ‘’ to give special meaning to them.  As ?,+,.. Are not supported by POSIX (Portable Operating system Interface for Unix) BRE.  We use grep command for BRE.
  • 34. Extended Regular Expression  The quantifiers ?, +, {n}, {n,m} and {n,} repea t the preceding token zero or once, once or more, n times, between n and m times, and n or more times, respectively.  These above quantifiers are supported by POSIX ERE and we use egrep or grep –E command.
  • 35. Metacharacters  ^ (Caret)=match expression at the start of a line, as in ^A.  $ (Dollar)=match expression at the end of a line, as in A$.  (Back Slash)=turn off the special meaning of the next character, as in ^.  [ ] (Brackets)=match any one of the enclosed characters, as in [aeiou]. Use Hyphen "-" for a range, as in [0-9].  [^ ]=match any one character except those enclosed in [ ], as in [^0-9].
  • 36.  . (Period)=match a single character of any value, except end of line.  * (Asterisk)=match zero or more of the preceding character or expression.  {x,y}=match x to y occurrences of the preceding.  {x}=match exactly x occurrences of the preceding.  {x,}=match x or more occurrences of the preceding.
  • 37. Searching for a pattern in UINIX  Unix has a special family of commands for handling search requirements.  The main member of this family is the grep command. GREP: (Global Regular Expression Parser)  It scans its input for a pattern and displays lines containing the pattern.
  • 38. Examples  grep '^From: ' demo.txt  grep '[a-zA-Z]'{any line with at least one letter}  grep '[^a-zA-Z0-9]{anything not a letter or number}  grep '[0-9]{3}-[0-9]{4}'{999-9999, like phone numbers}  grep '^.$'{lines with exactly one character}
  • 39.  grep '"smug"'{'smug' within double quotes}  grep '"*smug"*'{'smug', with or without quotes}  grep '^.'{any line that starts with a Period "."}  grep '^.[a-z][a-z]'{line start with "." and 2 letters}