Open main menu

CDOT Wiki β

Changes

Tutorial5: Redirection

249 bytes added, 13:29, 25 January 2020
INVESTIGATION 2: REDIRECTION USING PIPES
# Issue the following Linux command to remove the listing file: <span style="color:blue;font-weight:bold;font-family:courier;">rm listing.txt</span><br><br>
# Issue the following Linux pipeline command: <span style="color:blue;font-weight:bold;font-family:courier;">ls /bin/?? | sort -r</span><br><br>You should notice that the output from this pipeline command is the same output from the command you issued in '''step #6'''<br><br>
# Issue the following Linux pipeline command: <span style="color:blue;font-weight:bold;font-family:courier;">ls /bin/?? | sort -r | more</span><br><br>What is different with this pipeline command as opposed to the previous pipeline command?<br><br>
# Issue the '''ls''' command.<br><br>You should notice that no files have been created. Let's get practice issuing more pipeline commands using commands (previously learned or new) to be used as filters.<br><br>
# Issue the following Linux pipeline command: <span style="color:blue;font-weight:bold;font-family:courier;">ls /bin/?? | sort -r | head -5</span><br><br>What did you notice?<br><br>
13,420
edits