How could the content be improved?
During my teaching demo, I found that when we introduce the mkdir -p concept it was confusing (and the instructor also agreed). I also saw there was another issue raised about this section in April.
When we say:
Note that mkdir is not limited to creating single directories one at a time. The -p option allows mkdir to create a directory with nested subdirectories in a single operation:
$ mkdir -p ../project/data ../project/results
It is pretty confusing for the following reasons:
- We are combining two different concepts that may be overlooked. We are using the
-p command (without explaining what it actually stands for) and we are creating two directories at the same time. The main idea about how -p allows you to create directories in a different location might be overlooked.
- We never
cd into the /project directory first to show what the current folders/files are, therefore it is not super straight forward that it actually created them.
- We also never end up using these directories.
A few suggestions could be something like we first cd ../projects and then ls to show the contents. Then we cd ../ and pwd to show that we are in /Users/nelle/Desktop/shell-lesson-data/exercise-data/. Then introduce the path idea (without the ../) so it would be mkdir -p /projects/data. Followed by ls -FR project/.
Then if you wanted to show that you can make multiple directories at the same time (although, I don't think this is super important), then you could run mkdir -p projects/results projects/conclusions.
I personally almost never use the -p command but if we do want to teach it, then I think some reorganizing about this concept would be beneficial to the learners. Thanks!
Which part of the content does your suggestion apply to?
https://github.com/swcarpentry/shell-novice/blob/main/episodes/03-create.md
How could the content be improved?
During my teaching demo, I found that when we introduce the
mkdir -pconcept it was confusing (and the instructor also agreed). I also saw there was another issue raised about this section in April.When we say:
Note that mkdir is not limited to creating single directories one at a time. The -p option allows mkdir to create a directory with nested subdirectories in a single operation:
$ mkdir -p ../project/data ../project/resultsIt is pretty confusing for the following reasons:
-pcommand (without explaining what it actually stands for) and we are creating two directories at the same time. The main idea about how-pallows you to create directories in a different location might be overlooked.cdinto the/projectdirectory first to show what the current folders/files are, therefore it is not super straight forward that it actually created them.A few suggestions could be something like we first
cd ../projectsand thenlsto show the contents. Then wecd ../andpwdto show that we are in/Users/nelle/Desktop/shell-lesson-data/exercise-data/. Then introduce the path idea (without the ../) so it would bemkdir -p /projects/data. Followed byls -FR project/.Then if you wanted to show that you can make multiple directories at the same time (although, I don't think this is super important), then you could run
mkdir -p projects/results projects/conclusions.I personally almost never use the
-pcommand but if we do want to teach it, then I think some reorganizing about this concept would be beneficial to the learners. Thanks!Which part of the content does your suggestion apply to?
https://github.com/swcarpentry/shell-novice/blob/main/episodes/03-create.md