Changes

Jump to: navigation, search

Tutorial2: Unix / Linux File Management

124 bytes removed, 20:27, 6 January 2021
Part 1: Creating Directories
# Issue the following Linux command to confirm that those directories have been created:<br><span style="color:blue;font-weight:bold;font-family:courier;">ls -ld /home/your-seneca-id/acp100xx /home/your-seneca-id/xyz100xx</span><br><br>
# We will now create the subdirectories that are contained in the '''uli101xx''' directory.<br>Issue the following Linux command to move to the '''uli101xx''' directory:<br><span style="color:blue;font-weight:bold;font-family:courier;">cd /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><br><br>Using a FULL pathname starting from the root directory (/) requires is a LOT of typing!'''. Since we are already located in our '''home''' directory, we don't have to start from the root directory called a '''relative''' pathname.<br><br>
# Issue the following Linux command to create the directories called '''notes''', '''tutorials''' and '''examples''' (can wrap over one line):<br><span style="color:blue;font-weight:bold;font-family:courier;">mkdir /home/your-seneca-id/uli101xx/notes /home/your-seneca-id/uli101xx/tutorials /home/your-seneca-id/uli101xx/examples</span><br><br>
# Issue a Linux command to confirm that those directories have been created<br>(you should already know how to do this).<br><br>
# Issue the following Linux command to remove all of the directories that you have created:<br><span style="color:blue;font-weight:bold;font-family:courier;">rm -r /home/your-seneca-id/uli101xx/ /home/your-seneca-id/acp100xx /home/your-seneca-id/xyz100xx</span><br><br>'''NOTE:''' You will learn how to '''safely''' remove directories and their contents in another section.<br><br>
# Issue the following single Linux command to create the entire directory structure (can wrap over one line):<br><span style="color:blue;font-weight:bold;font-family:courier;">mkdir -p /home/your-seneca-id/uli101xx/notes /home/your-seneca-id/uli101xx/tutorials /home/your-seneca-id/uli101xx/examples /home/your-seneca-id/acp100xx /home/your-seneca-id/xyz100xx</span><br><br>'''NOTE:''' The '''-p''' option allows "parent" directories to be automatically created first to then create their subdirectories.<br><br>
# Issue the following Linux command to confirm that all of the directories have been created (can wrap over one line):<br><span style="color:blue;font-weight:bold;font-family:courier;">ls -ld /home/your-seneca-id/uli101xx/ /home/your-seneca-id/uli101xx/notes /home/your-seneca-id/uli101xx/tutorials /home/your-seneca-id/uli101xx/examples /home/your-seneca-id/acp100xx /home/your-seneca-id/xyz100xx</span><br><br>'''WOW! That is a LOT of typing!''' Luckily we will show you next week how to reduce typing by using different types of pathnames<br>(like '''relative''' and '''relative-to-home''' pathnames).<br><br>One <u>'''good'''</u> thing from all of this typing is that you will '''understand FULL pathnames''' and the '''proper location of your home directory!'''<br><br>
'''Running a Shell Script to Check your Work'''
13,420
edits

Navigation menu