Changes

Jump to: navigation, search

Tutorial5: Redirection

1,489 bytes added, 19:27, 24 January 2020
INVESTIGATION 1: BASICS OF REDIRECTION
# Issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">cut -f1-3 uli101/cars > field123.txt</span><br><br>What did this command do?<br><br>
# Issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">cut -f1,5 uli101/cars > field15.txt</span><br><br>What did this command do?<br><br>
# Issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">wc cars > count1.txt</span><br><br>What information does the count1.txt file contain?<br><br>
# Issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">wc cars > count2.txt</span><br><br>What information does the count2.txt file contain?<br><br>
# Issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">ls -l > listing.txt</span><br><br>What information does the count2.txt file contain?<br><br>
# Issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">pwd > listing.txt</span><br><br>What happenned to the original contents of the file called '''listing.txt'''?<br><br>
# Issue the following Linux command (use 2 greater-than signs): <span style="color:blue;font-weight:bold;font-family:courier;">date >> listing.txt</span><br><br>What information does the '''listing.txt''' file contain?<br><br>
# Issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">cat listing.txt cars murray 2> result.txt</span><br><br>What information does the '''result.txt''' file contain?<br><br>
# Issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">cat listing.txt cars murray > myoutput.txt 2> result.txt</span><br><br>What is displayed on the monitor? what do those files contain?<br><br>
# x
13,420
edits

Navigation menu