gregjohn <pte### [at] yahoo com> wrote:
> Now, I want to merge it all. I am afraid that if I go to the
> /home/greg/files/files/author1/booktwo directory and simply MOVE it with
> Overwrite to the /home/greg/files/ directory, I will delete
> /home/greg/files/author1/bookone.
If everything else fails, you can try a trick like this:
(cd source;tar cf - .)|(cd target; tar xvf -)
Or you could try something like this:
cd /home/greg/files/files/
find -type d | while read name; do mkdir "/home/greg/files/$name"; done
(which will recreate the directory structure)
find -type f | while read name; do echo mv "$name" "/home/greg/files/$name"; done
(which will move the files)
Disclaimer: This is completely untested. Use at your own risk.
--
- Warp
Post a reply to this message
|