SlideShare a Scribd company logo
1 of 7
11-1
Day 3
gdfdgdfdh
fhfjdfhjgfh
gfgjdfhgjd
hffkkfjgkfj
11-2
Links
Linux supports to create two types of Links.
• Hard Links
• Soft Links
Hard Link: it create a link of the source file with the new file by assigning the i-
node number of the source file to new file .
--In case if we remove the source file, we can access the data by using the new
file.
syn: ln <original file> <link file>
Softlink(symbolic link):it creates a link of source file with different i-node
number from the source file.
--In case if we remove the source file, the can not be accessible, further if we
create the name of the source file in the same location the new file will start
working.
syn: ln -s <original file> <link file>
11-3
Finding Things
Finding files, directories and applications:
syn: find <path> -name <file/dir> [options]
ex:-
find /usr -name passwd
find . -name passwd -print
find . -name passwd -type f - Search only for files
find . -name passwd -type d - Search only for directories
find . -mtime -10 ( Modified files since last 10 days)
find . -mtime +10 ( Which are not modified since last 10 days)
find /etc -mtime -10
find . -perm 600 (Searching the files based on permissions)
find . -perm 755
find / -type f -size +100M
11-4
Finding Things
locate: To search a particular file
Eg: locate httpd.conf
locate -c httpd.conf #To get the count of number of matching entry
locate -i new.txt #To ignore case sensitivity
locate -l 5 passwd #To display the lines of the file searched
grep - Used to search the file content based on the given string. Matched string
lines will display on the screen.
syn: grep [options] <string> <filenames>
ex: grep praveen /etc/passwd
options: -i - Ignore the case and search for the string
-v - To display the data which doesn't match the keyword
-c - To count the matching number of lines
-n - Matching lines with the line numbers also in file
11-5
Input/Output Redirection
Pipe (|) : it is nothing but connect the standard output of one command to the
standard input of another command.
how to find total count of files in a directory?
ls –la #displays total files in the directory,
wc # Count of the lines, words and characters of an file
wc file1
To trigger the output in required format
ls -l | wc -l
11-6
Input/Output Redirection
> #redirect standard output to a file
< # redirect standard input to a file
2 > # redirect standard error to a file
2 >&1 # merge standard error with standard output to a file
Ex:
ls > file.txt
ls >> file.txt
sort < file.txt
11-6
Input/Output Redirection
> #redirect standard output to a file
< # redirect standard input to a file
2 > # redirect standard error to a file
2 >&1 # merge standard error with standard output to a file
Ex:
ls > file.txt
ls >> file.txt
sort < file.txt

More Related Content

What's hot

Basic linux commands for bioinformatics
Basic linux commands for bioinformaticsBasic linux commands for bioinformatics
Basic linux commands for bioinformaticsBonnie Ng
 
Linux basic commands with examples
Linux basic commands with examplesLinux basic commands with examples
Linux basic commands with examplesabclearnn
 
Basic command ppt
Basic command pptBasic command ppt
Basic command pptRohit Kumar
 
Linux command for beginners
Linux command for beginnersLinux command for beginners
Linux command for beginnersSuKyeong Jang
 
Linux Basic Commands
Linux Basic CommandsLinux Basic Commands
Linux Basic CommandsHanan Nmr
 
50 most frequently used unix linux commands (with examples)
50 most frequently used unix   linux commands (with examples)50 most frequently used unix   linux commands (with examples)
50 most frequently used unix linux commands (with examples)Rodrigo Maia
 
Unix(introduction)
Unix(introduction)Unix(introduction)
Unix(introduction)meashi
 
Linux Basic commands and VI Editor
Linux Basic commands and VI EditorLinux Basic commands and VI Editor
Linux Basic commands and VI Editorshanmuga rajan
 
Basic commands
Basic commandsBasic commands
Basic commandsambilivava
 
Basic unix commands
Basic unix commandsBasic unix commands
Basic unix commandsswtjerin4u
 
Unix Command Line Productivity Tips
Unix Command Line Productivity TipsUnix Command Line Productivity Tips
Unix Command Line Productivity TipsKeith Bennett
 

What's hot (20)

Linux commands
Linux commandsLinux commands
Linux commands
 
Basic linux commands for bioinformatics
Basic linux commands for bioinformaticsBasic linux commands for bioinformatics
Basic linux commands for bioinformatics
 
Linux basic commands with examples
Linux basic commands with examplesLinux basic commands with examples
Linux basic commands with examples
 
Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
 
Basic 50 linus command
Basic 50 linus commandBasic 50 linus command
Basic 50 linus command
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
 
Linux command for beginners
Linux command for beginnersLinux command for beginners
Linux command for beginners
 
Know the UNIX Commands
Know the UNIX CommandsKnow the UNIX Commands
Know the UNIX Commands
 
Linux Basic Commands
Linux Basic CommandsLinux Basic Commands
Linux Basic Commands
 
Linux commands
Linux commandsLinux commands
Linux commands
 
50 most frequently used unix linux commands (with examples)
50 most frequently used unix   linux commands (with examples)50 most frequently used unix   linux commands (with examples)
50 most frequently used unix linux commands (with examples)
 
Unix(introduction)
Unix(introduction)Unix(introduction)
Unix(introduction)
 
Linux Basic commands and VI Editor
Linux Basic commands and VI EditorLinux Basic commands and VI Editor
Linux Basic commands and VI Editor
 
Basic commands
Basic commandsBasic commands
Basic commands
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
 
Basic unix commands
Basic unix commandsBasic unix commands
Basic unix commands
 
Basic
BasicBasic
Basic
 
Basic Linux commands
Basic Linux commandsBasic Linux commands
Basic Linux commands
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
 
Unix Command Line Productivity Tips
Unix Command Line Productivity TipsUnix Command Line Productivity Tips
Unix Command Line Productivity Tips
 

Similar to Basic linux day 3

Similar to Basic linux day 3 (20)

SGN Introduction to UNIX Command-line 2015 part 1
SGN Introduction to UNIX Command-line 2015 part 1SGN Introduction to UNIX Command-line 2015 part 1
SGN Introduction to UNIX Command-line 2015 part 1
 
Introduction to UNIX Command-Lines with examples
Introduction to UNIX Command-Lines with examplesIntroduction to UNIX Command-Lines with examples
Introduction to UNIX Command-Lines with examples
 
Linux ppt
Linux pptLinux ppt
Linux ppt
 
Linux file commands and shell scripts
Linux file commands and shell scriptsLinux file commands and shell scripts
Linux file commands and shell scripts
 
Basic unix commands_1
Basic unix commands_1Basic unix commands_1
Basic unix commands_1
 
Unix
UnixUnix
Unix
 
Unix training session 2
Unix training   session 2Unix training   session 2
Unix training session 2
 
40 basic linux command
40 basic linux command40 basic linux command
40 basic linux command
 
40 basic linux command
40 basic linux command40 basic linux command
40 basic linux command
 
The Linux Command Cheat Sheet
The Linux Command Cheat SheetThe Linux Command Cheat Sheet
The Linux Command Cheat Sheet
 
File systems and inodes
File systems and inodesFile systems and inodes
File systems and inodes
 
Unix command line concepts
Unix command line conceptsUnix command line concepts
Unix command line concepts
 
Workshop on command line tools - day 1
Workshop on command line tools - day 1Workshop on command line tools - day 1
Workshop on command line tools - day 1
 
35 ls Command Examples in Linux (The Complete Guide).pdf
35 ls Command Examples in Linux (The Complete Guide).pdf35 ls Command Examples in Linux (The Complete Guide).pdf
35 ls Command Examples in Linux (The Complete Guide).pdf
 
BASICS OF LINUX OPERATING SYSTEM.pptx
BASICS OF LINUX OPERATING SYSTEM.pptxBASICS OF LINUX OPERATING SYSTEM.pptx
BASICS OF LINUX OPERATING SYSTEM.pptx
 
Linux files
Linux filesLinux files
Linux files
 
03 browsing the filesystem
03 browsing the filesystem03 browsing the filesystem
03 browsing the filesystem
 
part2.pdf
part2.pdfpart2.pdf
part2.pdf
 
Linux day 1
Linux day 1Linux day 1
Linux day 1
 
QSpiders - Unix Operating Systems and Commands
QSpiders - Unix Operating Systems  and CommandsQSpiders - Unix Operating Systems  and Commands
QSpiders - Unix Operating Systems and Commands
 

Recently uploaded

Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxLigayaBacuel1
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 

Recently uploaded (20)

Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 

Basic linux day 3

  • 2. 11-2 Links Linux supports to create two types of Links. • Hard Links • Soft Links Hard Link: it create a link of the source file with the new file by assigning the i- node number of the source file to new file . --In case if we remove the source file, we can access the data by using the new file. syn: ln <original file> <link file> Softlink(symbolic link):it creates a link of source file with different i-node number from the source file. --In case if we remove the source file, the can not be accessible, further if we create the name of the source file in the same location the new file will start working. syn: ln -s <original file> <link file>
  • 3. 11-3 Finding Things Finding files, directories and applications: syn: find <path> -name <file/dir> [options] ex:- find /usr -name passwd find . -name passwd -print find . -name passwd -type f - Search only for files find . -name passwd -type d - Search only for directories find . -mtime -10 ( Modified files since last 10 days) find . -mtime +10 ( Which are not modified since last 10 days) find /etc -mtime -10 find . -perm 600 (Searching the files based on permissions) find . -perm 755 find / -type f -size +100M
  • 4. 11-4 Finding Things locate: To search a particular file Eg: locate httpd.conf locate -c httpd.conf #To get the count of number of matching entry locate -i new.txt #To ignore case sensitivity locate -l 5 passwd #To display the lines of the file searched grep - Used to search the file content based on the given string. Matched string lines will display on the screen. syn: grep [options] <string> <filenames> ex: grep praveen /etc/passwd options: -i - Ignore the case and search for the string -v - To display the data which doesn't match the keyword -c - To count the matching number of lines -n - Matching lines with the line numbers also in file
  • 5. 11-5 Input/Output Redirection Pipe (|) : it is nothing but connect the standard output of one command to the standard input of another command. how to find total count of files in a directory? ls –la #displays total files in the directory, wc # Count of the lines, words and characters of an file wc file1 To trigger the output in required format ls -l | wc -l
  • 6. 11-6 Input/Output Redirection > #redirect standard output to a file < # redirect standard input to a file 2 > # redirect standard error to a file 2 >&1 # merge standard error with standard output to a file Ex: ls > file.txt ls >> file.txt sort < file.txt
  • 7. 11-6 Input/Output Redirection > #redirect standard output to a file < # redirect standard input to a file 2 > # redirect standard error to a file 2 >&1 # merge standard error with standard output to a file Ex: ls > file.txt ls >> file.txt sort < file.txt