I have a file called "foo.txt" in my current directory. This directory also has folders named myfolder1, myfolder2, etc... Each of these folders has a subfolder called "constant".
I want to copy "foo.txt" into myfolder1/constant, myfolder2/constant, etc...
I tried to do this with the command:
cp foo.txt myfolder*/constant
This resulted in the error:
cp: omitting directory `myfolder1/constant' cp: omitting directory `myfolder2/constant' etc...
Is there a way I can copy a file into the sub-folder of multiple directories with the same prefix (in this case, the prefix being 'myfolder')?