01-21-06 07:49 AM
i found some answers finally with google
cp -Riv --reply=no test1/* test0/
i can then clean up the source folder with a dup file finder
the rest of the possible answers are below:
===========================
find dir1 -type f | PERL -lne 'm#([^/]*)/(.*)$#;print "mv -i $1/$2
dir2/$2";'|sh
#!/bin/ksh
for i in `find dir1 -type f`
do
new_folder=` echo $i | sed -e 's/dir1/dir2/' `
echo mv $i $new_folder | sh
done
cd dir1; tar cf - * | (cd ../dir2; tar xvf -)
cp -Rf dir1/* dir2/
rm -f dir1/*
[ Post a follow-up to this message ]
|