13,420
edits
Changes
→INVESTIGATION 1: ABSOLUTE / RELATIVE / RELATIVE-TO-HOME PATHNAMES
# '''Login''' your matrix account.<br><br>
# Issue a command to '''confirm''' you are located in your home directory.<br><br>Let's create the following directory structure under your home directory by issuing the mkdir command using only absolute pathnames.<br><br>'''NOTE:''' The command you issue below will be VERY LONG... just keep typing and let the text continue of separate lines. When using these absolute pathnames, start each one from the root directory (/) and replace the text "youruserid" with your actual login id.<br><br>
# Issue the following Linux command to create the directory structure displayed to the right using all '''absolute pathnames''':<br><br><span style="color:blue;font-weight:bold;font-family:courier;">mkdir -p /home/youruserid/tutorial3/practice/commands /home/youruserid/tutorial3/practice/examples /home/youruserid/tutorial3/notes/lesson1 /home/youruserid/tutorial3/notes/lesson2</span><br><br>Let's remove this directory structure, and issue the same command using a relative-to-home pathname.<br><br>
# Issue the following Linux command (enter "y" at each prompt to remove ALL contents):<br><span style="color:blue;font-weight:bold;font-family:courier;">rm -ri /home/youruserid/tutorial3</span><br><br>
# Issue a command to confirm that the tutorial3 directory (and its contents) no longer exist. You should know how to do this.<br><br>Let's recreate the same directory structure, but use a relative-to-home pathname. You usually generate the ~ character by Holding down '''SHIFT''' and press the button to the left of the number '''1''' above the text on your keyboard.<br><br>
# Issue the following Linux command to create the same directory structure using a relative-to-home pathnamepathnames:<br><br><span style="color:blue;font-weight:bold;font-family:courier;">mkdir -p ~/tutorial3/practice/commands ~/tutorial3/practice/examples ~/tutorial3/notes/lesson1 ~/tutorial3/notes/lesson2<br><br>Let's remove the tutorial3 directory and its contents and issue the mkdir command with relative pathnames to create the same directory structure.<br><br># Issue the same command as you did in step 4 to remove tutorial3 and its contents safely.<br><br># Issue a Linux command to confirm you removed the tutorial3 directory and its contents.<br><br># Issue the following Linux command to create the same directory structure using relative pathnames:<br><br><span style="color:blue;font-weight:bold;font-family:courier;">mkdir -p tutorial3/practice/commands tutorial3/practice/examples tutorial3/notes/lesson1 tutorial3/notes/lesson2<br><br>QUESTION: Which command (pathname type) that you performed in steps required the LEAST number of keystrokes (i.e. characters)?<br><br>
=INVESTIGATION 2: FILENAME EXPANSION=