Com o GNU find
, que suporta -printf
, e o GNU xargs
, que suporta -r
:
find /source/path -mindepth 1 -maxdepth 1 -type d -printf '/target/path/%ffind /source/path -mindepth 1 -maxdepth 1 -type d -printf '/target/path/%f%pre%' | xargs -r -0 -- mkdir --
' | xargs -r -0 -- mkdir --