Changes

Jump to: navigation, search

Tutorial2: Unix / Linux File Management

245 bytes removed, 20:55, 6 January 2021
Part 1: Creating Directories
# Issue a Linux command to confirm that your current location is in the ''uli101xx'' 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''':<br><span style="color:blue;font-weight:bold;font-family:courier;">mkdir notes tutorials 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>There are better ways to create the same directory structure without using the '''cd''' command.<br><br>Using the '''cd''' command prior to other commands tend to show that you are a novice or "'''newbie'''".<br>You can also '''lose marks''' if you issue multiple Linux commands to performed tasks that can be performed<br>using a single Linux command with '''pathnames'''.<br><br>Although we will teach you how to '''remove''' directories and their contents in a future section, let's change back to your '''home''' directory and issue a command to '''remove the directory structure''' that you just created so you can learn a more efficient method of creating the same directory structure.<br><br># Issue Linux commands to move to your home directory and confirm that your current directory is your home directory<br>(You should know how to do this).<br><br>
# Issue the following Linux command to return to your home directory: <span style="color:blue;font-weight:bold;font-family:courier;">cd</span><br><br>
# Issue a Linux command to confirm that you are now located in your home directory.<br><br>Although we will teach you how to '''remove''' directories and their contents in another section, let's remove the created directory structure''' and recreate the same directory structure using just one command using pathnames.<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 uli101xx acp100xx 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:<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>
13,420
edits

Navigation menu