You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
but:
we haven't actually used the word "nested" up to this point
as a student, it wouldn't occur to me that just mkdir ../project/data wouldn't work
from the example, it's hard to tell:
that we're creating nested structures (the ../ makes it less obvious)
that -p isn't necessary just to create two directories with one command
It might be clearer if we did something like:
mkdir project1 project2 # shows creating two directories
mkdir project1/data/final # doesn't work
mkdir -p project1/data/final # shows how -p works
mkdir -p project3/data/final # shows that -p creates multiple levels
Which part of the content does your suggestion apply to?
Thanks for the suggestion. Third line seems like it should be changed:
mkdir project1 project2 # shows creating two directories
mkdir project1/data/final # doesn't work
mkdir -p project1/data # shows how -p works
mkdir -p project3/data/final # shows that -p creates multiple levels
This would lengthen the lesson though. There are some exercises at the end, in particular in https://swcarpentry.github.io/shell-novice/instructor/03-create.html#operations-with-multiple-files-and-directories there is a section Reproduce a folder structure maybe it would be better to modify this exercise to clarify the operations? The exercise could be moved so it is next to the section. That way if more discussion is needed, there is space for it, but if time is very short, it can be skipped.
How could the content be improved?
We say
but:
mkdir ../project/data
wouldn't work../
makes it less obvious)-p
isn't necessary just to create two directories with one commandIt might be clearer if we did something like:
Which part of the content does your suggestion apply to?
https://swcarpentry.github.io/shell-novice/instructor/03-create.html#creating-directories
The text was updated successfully, but these errors were encountered: