Changes

Jump to: navigation, search

Tutorial2: Unix / Linux File Management

105 bytes added, 16:50, 6 January 2021
Part 3: Manage / Manipulate Text File Content
# issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">sort /home/your-seneca-id/a.txt</span><br><br>Why does the output not look what you expected? Why?<br><br>
# Issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">sort -n /home/your-seneca-id/a.txt</span><br><br>Try the same command using both the '''-n''' and '''-r''' options to see what happens.<br><br>
# issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">head /home/your-seneca-id/a.txt</span><br><br>What is the output from this command display?<br><br>
# issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">head -7 /home/your-seneca-id/a.txt</span><br><br>What is the output from this command display?<br><br>
# issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">tail /home/your-seneca-id/a.txt</span><br><br>What is the output from this command display?<br>How would you issue this command to display only the last line contained in that file?<br><br>
# Issue one of the commands you learned to display the contents of the file called '''/home/your-seneca-id/b.txt''' without editing.<br><br>What happened to this file?<br><br>
# Issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">mv /home/your-seneca-id/a.txt /home/your-seneca-id/aa.txt</span><br><br>
# Issue a Linux command to view the directory contents.<br><br>What happened to the file called '''/home/your-seneca-id/a.txt'''? Why?<br><br># Issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">file /home/your-seneca-id/b.txt</span><br><br>What sort of information did it provide?<br><br>
# Issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">diff /home/your-seneca-id/aa.txt /home/your-seneca-id/b.txt</span><br><br>What was the output? Why do you think caused the result of this output?<br><br>
# Issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">diff /home/your-seneca-id/aa.txt /home/your-seneca-id/c.txt</span><br><br> What reason would this type of output occur?<br><br>
# Issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">find -P /home/your-seneca-id/ </span><br><br>What is the output of this command?<br><br>
# Issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">rm /home/your-seneca-id/aa.txt /home/your-seneca-id/b.txt /home/your-seneca-id/a.txt.bk c.txt</span><br><br>
13,420
edits

Navigation menu