Open main menu

CDOT Wiki β

Changes

Tutorial2: Unix / Linux File Management

96 bytes added, 15:03, 6 January 2021
Part 1: Creating Directories
# Issue the following Linux command to create the '''acp100xx''' and '''xyz100xx''' directories:<br><span style="color:blue;font-weight:bold;font-family:courier;">mkdir /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:<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>
# 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 /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>
#This technique is considered to be '''inefficient'''. There are options and ways to create the same directory structure without using the cd command and only issue a single Linux command.<br><br>Using this inefficient method tends to show that you are a novice or "'''newbie'''", and you may '''lose marks''' if you issue multiple Linux commands to performed tasks that can be performed using only a single Linux command.<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>
13,420
edits