I need to copy a complete directory structure into a new location. But I want to have all files copied into one directory and leave out the directory structure. So all files must be placed in one directory.
Hi,
What are you do files with same name ?
what are you do hard link and/or soft link ?
Regards.
find /path/to/parent/dir -type f -exec cp {} /path/to/new/dir \;
Thanks, it's working as expected.
find /path/of/source -type f -print0 | xargs -0 -i cp -bp $i {} /path/of/newdir/
ensuring not missing duplicate file names and special character in them