In a folder I have many subfolders, and in all of these subfolders I want to create a file called ‘calibration.txt’. Is there a terminal command to easily do that? Would be great to know for Linux, Windows and MacOS.
In a folder I have many subfolders, and in all of these subfolders I want to create a file called ‘calibration.txt’. Is there a terminal command to easily do that? Would be great to know for Linux, Windows and MacOS.
No, there isn’t, you’d have to do it in a loop, for example. BTW: Read the descriptions of the “shell” and “bash” tags. Note that different shells are effectively different programming languages. Mixing two languages in one question here is also bad, because it makes it difficult to determine whether an answer is right, so don’t do that. Solve these tasks separately.
For Linux and Mac, the
find
command would do:find . -maxdepth 1 -mindepth 1 -type d -exec touch '{}'/calibration.txt ';'
— check the man page for the meaning of all those switches.