Changes

Jump to: navigation, search

Tutorial2: Unix / Linux File Management

219 bytes added, 15:56, 6 January 2021
Part 1: Creating Directories
# '''Login''' to your matrix account.<br><br>
# Issue a command to '''confirm''' that you are located in your home directory<br>(You should know how to do this from the previous tutorial).<br><br>
# Issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">mkdir /home/yourSenecaIDyour-seneca-id/uli101uli101xx</span><br><br>'''NOTE:''' You should always confirm that you have created a directory.<br>This can be done by issuing the ls command.<br><br>[[Image:directory-structure-4.png|thumb|right|350px|'''Creating''' and '''Confirming''' the Creation of a Directory.]]# Issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">ls uli101/home/your-seneca-id/uli101xx</span><br><br>There are no contents that are contained in this newly-created directory; therefore, no contents appear. A useful option '''-d''' can be used to confirm that the actual <u>directory</u> has been created as opposed to viewing the contents of the directory.<br><br># Issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">ls -d uli101/home/your-seneca-id/uli101xx</span><br><br>You should now see just the directory listed. You can also combine the '''-d''' and '''-l''' options to provide more detail regarding the newly-created directory.<br><br># Issue the following Linux command:<span style="color:blue;font-weight:bold;font-family:courier;">ls -d -l uli101/home/your-seneca-id/uli101xx</span><br><br>How can you confirm from the output of this command that the file uli101 uli101xx is a directory?<br><br># Issue the following Linux command:<span style="color:blue;font-weight:bold;font-family:courier;">ls -ld uli101/home/your-seneca-id/uli101xx</span><br><br>Is the output from this command the same was the output from the previous command?<br>If so, what does this say about how to use multiple options for Linux commands?<br><br># Issue the following Linux command to create the '''acp100acp100xx''' and '''xyz100xyz100xx''' directories: <span style="color:blue;font-weight:bold;font-family:courier;">mkdir acp100 xyz100/home/your-seneca-id/acp100xx /home/your-seneca-id/xyz100xx</span><br><br>'''NOTE:''' You can create multiple directories by issuing the '''mkdir''' command with <u>multiple arguments</u>.<br><br># Issue the following Linux command to confirm that those directories have been created: <span style="color:blue;font-weight:bold;font-family:courier;">ls -ld acp100 xyz100/home/your-seneca-id/acp100xx /home/your-seneca-id/xyz100xx</span><br><br># We will now create the subdirectories that are contained in the '''uli101uli101xx''' directory.<br>Issue the following Linux command to move to the '''uli101''' directory: <span style="color:blue;font-weight:bold;font-family:courier;">cd uli101/home/your-seneca-id/uli101xx</span><br><br>
# Issue a Linux command to confirm that your current location is in the uli101 directory.<br>You should know how to issue this command from a previous tutorial.<br><br>
# Issue the following Linux command to create the directories called '''notes''', '''tutorials''' and '''examples''': <span style="color:blue;font-weight:bold;font-family:courier;">mkdir notes tutorials examples</span><br><br>
13,420
edits

Navigation menu