I am new in Linux so here is my very basic question. I have a directory with 41 folders. I need to create a loop so that the process goes into each folder, copy all the files and then paste everything in a specific folder.
Any idea how to approach this? It would be a lot of clicking without a code solution
In the image you can see all the folders I need to access and the output folder where I want to paste everything (zPASTE_EVERYTHING_HERE)
My path is: /shared/home/data/output
Would like to paste everything in: /shared/home/data/output/zPASTE_EVERYTHING_HERE
Best Answer
Assuming that:
/home/gcgm/myfolders
/tmp/output-folder
If you need to copy all files to another folder, you can do the following:
The meaning of
*/* in the this command
cp / target` is: