Suppose I have a directory structure like this:
$ [~/practice] ls a/ b/ c/ d/
Now I want to create a directory
tmp1 in all sub directories of
practice and I do this:
$ [~/practice] mkdir */tmp1 mkdir: cannot create directory `*/tmp1': No such file or directory
Then I try the
-p switch and I endup with a directory named
* with a sub directory
$ [~/practice] mkdir -p */tmp1 $ [~/practice] ls */ a/ b/ c/ d/
I know the use of
-p switch is to create multiple nonexistent directories. I just thought it might help.
How do I create
tmp1 in all subdirectories at once?
If this can be done, how do I extend it to create
\c at once?
Edit: I missed mentioning that the directories don't have to be simple and in order, like
c etc., and the directory to be created is not necessarily like
$ [~/practice] ls dog/ cat/ rat/
In them, I would like to have something like
$ [~/practice] ls * dog: red/ blue/ cat: red/ blue/ rat: red/ blue/