I have multiple folders within a folder. Each of these folders contains only files (no subfolders). None of the files have duplicate file names.

Is it possible to merge all of the folders to concatenate the files together in a single folder? I could only find information about the ditto command, which seems to be for merging only two folders.

1 Answer 1

cd containing_folder
mv */* .

or, if you want to get rid of the empty folders afterwards

cd containing_folder
mkdir ../foo
mv */* ../foo/
rmdir *
mv ../foo/* .
rmdir ../foo

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .