SlideShare a Scribd company logo
1 of 1
Download to read offline
How to create your own redirection in Linux/Unix.
Solution
There are two types of redirection possible in UNIX/LINUX, Input and Output:
1.Output: In this , output can be diverted from standard output to some other file, and this is done
by adding the notation > file is appended to any command that normally writes its output to the
terminal output, the output of that command will be written to file instead of your
terminal.example is :
there is nothing displayed on the terminal as the details of all the users is written in users_file.
2.Like the ouput redirection where ouput is diverted to another file, in the same way input can be
accessed from a file it is called input redirection.The less-than character < is used to redirect the
input of a command.Both these can be used with any command for standard input/output
respectively.
Example:
this counts the no of lines in users_file file.

More Related Content

Similar to How to create your own redirection in LinuxUnix.SolutionThere.pdf

Linuxppt
LinuxpptLinuxppt
Linuxppt
Reka
 
II BCA OS pipes and filters.pptx
II BCA OS pipes and filters.pptxII BCA OS pipes and filters.pptx
II BCA OS pipes and filters.pptx
Savitha74
 
Lamp technology
Lamp technologyLamp technology
Lamp technology
2tharan21
 

Similar to How to create your own redirection in LinuxUnix.SolutionThere.pdf (20)

Linux Cheat Sheet.pdf
Linux Cheat Sheet.pdfLinux Cheat Sheet.pdf
Linux Cheat Sheet.pdf
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
 
UNIX.ppt
UNIX.pptUNIX.ppt
UNIX.ppt
 
02 linux desktop usage
02 linux desktop usage02 linux desktop usage
02 linux desktop usage
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
 
Text mining on the command line - Introduction to linux for bioinformatics
Text mining on the command line - Introduction to linux for bioinformaticsText mining on the command line - Introduction to linux for bioinformatics
Text mining on the command line - Introduction to linux for bioinformatics
 
Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...
Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...
Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
II BCA OS pipes and filters.pptx
II BCA OS pipes and filters.pptxII BCA OS pipes and filters.pptx
II BCA OS pipes and filters.pptx
 
Introduction 2 linux
Introduction 2 linuxIntroduction 2 linux
Introduction 2 linux
 
Lamp technology
Lamp technologyLamp technology
Lamp technology
 
Linux
LinuxLinux
Linux
 
Lesson 1 Linux System Fundamentals
Lesson 1 Linux System Fundamentals  Lesson 1 Linux System Fundamentals
Lesson 1 Linux System Fundamentals
 
Shell-Scripting-1.pdf
Shell-Scripting-1.pdfShell-Scripting-1.pdf
Shell-Scripting-1.pdf
 
Linux
LinuxLinux
Linux
 
Linux command for beginners
Linux command for beginnersLinux command for beginners
Linux command for beginners
 
Linux Internals - Part I
Linux Internals - Part ILinux Internals - Part I
Linux Internals - Part I
 
intro unix/linux 06
intro unix/linux 06intro unix/linux 06
intro unix/linux 06
 
Karkha unix shell scritping
Karkha unix shell scritpingKarkha unix shell scritping
Karkha unix shell scritping
 

More from fazalenterprises

Brett Donovan was the manager at Waltons Diner. He planned to promo.pdf
Brett Donovan was the manager at Waltons Diner. He planned to promo.pdfBrett Donovan was the manager at Waltons Diner. He planned to promo.pdf
Brett Donovan was the manager at Waltons Diner. He planned to promo.pdf
fazalenterprises
 
C# using Visual studio - Windows Form. If possible step-by-step inst.pdf
C# using Visual studio - Windows Form. If possible step-by-step inst.pdfC# using Visual studio - Windows Form. If possible step-by-step inst.pdf
C# using Visual studio - Windows Form. If possible step-by-step inst.pdf
fazalenterprises
 
A number of philosophers held various versions of the view that lang.pdf
A number of philosophers held various versions of the view that lang.pdfA number of philosophers held various versions of the view that lang.pdf
A number of philosophers held various versions of the view that lang.pdf
fazalenterprises
 
Why phelogyny has to be this way not other way aroundExaplain bas.pdf
Why phelogyny has to be this way not other way aroundExaplain bas.pdfWhy phelogyny has to be this way not other way aroundExaplain bas.pdf
Why phelogyny has to be this way not other way aroundExaplain bas.pdf
fazalenterprises
 
What is John Tukeys relationship to the S language and to the R la.pdf
What is John Tukeys relationship to the S language and to the R la.pdfWhat is John Tukeys relationship to the S language and to the R la.pdf
What is John Tukeys relationship to the S language and to the R la.pdf
fazalenterprises
 
What do health care professionals need to remember when caring for p.pdf
What do health care professionals need to remember when caring for p.pdfWhat do health care professionals need to remember when caring for p.pdf
What do health care professionals need to remember when caring for p.pdf
fazalenterprises
 
The problem is that I have to jump to the administrative function u.pdf
The problem is that I have to jump to the administrative function u.pdfThe problem is that I have to jump to the administrative function u.pdf
The problem is that I have to jump to the administrative function u.pdf
fazalenterprises
 
The FASB has developed specific guidelines for what to include in in.pdf
The FASB has developed specific guidelines for what to include in in.pdfThe FASB has developed specific guidelines for what to include in in.pdf
The FASB has developed specific guidelines for what to include in in.pdf
fazalenterprises
 
Read and reflect on the case study involving the CEO of Xerox on pag.pdf
Read and reflect on the case study involving the CEO of Xerox on pag.pdfRead and reflect on the case study involving the CEO of Xerox on pag.pdf
Read and reflect on the case study involving the CEO of Xerox on pag.pdf
fazalenterprises
 

More from fazalenterprises (20)

Brett Donovan was the manager at Waltons Diner. He planned to promo.pdf
Brett Donovan was the manager at Waltons Diner. He planned to promo.pdfBrett Donovan was the manager at Waltons Diner. He planned to promo.pdf
Brett Donovan was the manager at Waltons Diner. He planned to promo.pdf
 
Being larger than the right ventricle, the left ventricle pumps more .pdf
Being larger than the right ventricle, the left ventricle pumps more .pdfBeing larger than the right ventricle, the left ventricle pumps more .pdf
Being larger than the right ventricle, the left ventricle pumps more .pdf
 
C# using Visual studio - Windows Form. If possible step-by-step inst.pdf
C# using Visual studio - Windows Form. If possible step-by-step inst.pdfC# using Visual studio - Windows Form. If possible step-by-step inst.pdf
C# using Visual studio - Windows Form. If possible step-by-step inst.pdf
 
A number of philosophers held various versions of the view that lang.pdf
A number of philosophers held various versions of the view that lang.pdfA number of philosophers held various versions of the view that lang.pdf
A number of philosophers held various versions of the view that lang.pdf
 
Why phelogyny has to be this way not other way aroundExaplain bas.pdf
Why phelogyny has to be this way not other way aroundExaplain bas.pdfWhy phelogyny has to be this way not other way aroundExaplain bas.pdf
Why phelogyny has to be this way not other way aroundExaplain bas.pdf
 
Which of the following are tertiary activities A. Lead mining.pdf
Which of the following are tertiary activities A. Lead mining.pdfWhich of the following are tertiary activities A. Lead mining.pdf
Which of the following are tertiary activities A. Lead mining.pdf
 
What is John Tukeys relationship to the S language and to the R la.pdf
What is John Tukeys relationship to the S language and to the R la.pdfWhat is John Tukeys relationship to the S language and to the R la.pdf
What is John Tukeys relationship to the S language and to the R la.pdf
 
What do health care professionals need to remember when caring for p.pdf
What do health care professionals need to remember when caring for p.pdfWhat do health care professionals need to remember when caring for p.pdf
What do health care professionals need to remember when caring for p.pdf
 
What is the difference between a neurogenic and myogenic heart Plea.pdf
What is the difference between a neurogenic and myogenic heart Plea.pdfWhat is the difference between a neurogenic and myogenic heart Plea.pdf
What is the difference between a neurogenic and myogenic heart Plea.pdf
 
This is sociology. Content Assessments Communications Resources He.pdf
This is sociology. Content Assessments Communications Resources He.pdfThis is sociology. Content Assessments Communications Resources He.pdf
This is sociology. Content Assessments Communications Resources He.pdf
 
There is an area that has been classified, according to the IEC requ.pdf
There is an area that has been classified, according to the IEC requ.pdfThere is an area that has been classified, according to the IEC requ.pdf
There is an area that has been classified, according to the IEC requ.pdf
 
The problem is that I have to jump to the administrative function u.pdf
The problem is that I have to jump to the administrative function u.pdfThe problem is that I have to jump to the administrative function u.pdf
The problem is that I have to jump to the administrative function u.pdf
 
The IRS has the right to revoke an installment agreement for any of .pdf
The IRS has the right to revoke an installment agreement for any of .pdfThe IRS has the right to revoke an installment agreement for any of .pdf
The IRS has the right to revoke an installment agreement for any of .pdf
 
The FASB has developed specific guidelines for what to include in in.pdf
The FASB has developed specific guidelines for what to include in in.pdfThe FASB has developed specific guidelines for what to include in in.pdf
The FASB has developed specific guidelines for what to include in in.pdf
 
A difference between bacterial and eukaryotic transcriptionMultipl.pdf
A difference between bacterial and eukaryotic transcriptionMultipl.pdfA difference between bacterial and eukaryotic transcriptionMultipl.pdf
A difference between bacterial and eukaryotic transcriptionMultipl.pdf
 
Ten independent observations were made of the time to load a pallet..pdf
Ten independent observations were made of the time to load a pallet..pdfTen independent observations were made of the time to load a pallet..pdf
Ten independent observations were made of the time to load a pallet..pdf
 
Read and reflect on the case study involving the CEO of Xerox on pag.pdf
Read and reflect on the case study involving the CEO of Xerox on pag.pdfRead and reflect on the case study involving the CEO of Xerox on pag.pdf
Read and reflect on the case study involving the CEO of Xerox on pag.pdf
 
QUESTION 2 The current account is the record of O a. foreign investme.pdf
QUESTION 2 The current account is the record of O a. foreign investme.pdfQUESTION 2 The current account is the record of O a. foreign investme.pdf
QUESTION 2 The current account is the record of O a. foreign investme.pdf
 
MULTIPLE CHOICESSolution5. Correct Answer B) Self Servicing.pdf
MULTIPLE CHOICESSolution5. Correct Answer B) Self Servicing.pdfMULTIPLE CHOICESSolution5. Correct Answer B) Self Servicing.pdf
MULTIPLE CHOICESSolution5. Correct Answer B) Self Servicing.pdf
 
Mendel’s law of dominance supports thatOne person dominates over .pdf
Mendel’s law of dominance supports thatOne person dominates over .pdfMendel’s law of dominance supports thatOne person dominates over .pdf
Mendel’s law of dominance supports thatOne person dominates over .pdf
 

Recently uploaded

會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
中 央社
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
中 央社
 

Recently uploaded (20)

Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 

How to create your own redirection in LinuxUnix.SolutionThere.pdf

  • 1. How to create your own redirection in Linux/Unix. Solution There are two types of redirection possible in UNIX/LINUX, Input and Output: 1.Output: In this , output can be diverted from standard output to some other file, and this is done by adding the notation > file is appended to any command that normally writes its output to the terminal output, the output of that command will be written to file instead of your terminal.example is : there is nothing displayed on the terminal as the details of all the users is written in users_file. 2.Like the ouput redirection where ouput is diverted to another file, in the same way input can be accessed from a file it is called input redirection.The less-than character < is used to redirect the input of a command.Both these can be used with any command for standard input/output respectively. Example: this counts the no of lines in users_file file.