I am trying to collect all the files under the current directory and all the subdirectories to one directory. I am trying something like the following
find -type f -exec mv {} collection/{} \;
the above command won't work because the second {}
gives the full path, how can I collect all the files?
Best Answer
Remove the
{}
frommv
,mv
will take it as target directory ignoring any parent directories: