We have almost 300 subdirectories in main directory. Now we want to copy all files from subdirectories in a single command to Destination directory. Is it possible?
Main Directory
SubDirectory
SubsubDirectory1
xx.jpg
xx,jpg
SubsubDirectory2
xx.jpg
xx,jpg
SubDirectory
SubsubDirectory1
xx.jpg
xx,jpg
SubsubDirectory2
xx.jpg
xx,jpg
SubDirectory
SubsubDirectory1
xx.jpg
xx,jpg
SubsubDirectory2
xx.jpg
xx,jpg
I found below command can do work. But it is hard to mention each and every subdirectory name in the command.
cp "Main Directory"/*/Subsubdirectory1/* destdir