Following these two posts:
I would like to do the same but with copying instead of moving. So simply, I have a directory containing subdirectories and subsubdirectories, where there are some files inside. I want to copy all the files to a another destination folder, but since some files have exact names, so I want to attach the name of the parent directories as a prefix to the filenames.
I am running on ubuntu 16.04