need help....just wanna copy all files with no extensions but with tree-informations to one dir
first I make a new directory with all foldertrees...like
find / -name "*" -type d >a1
sed -e 's/^/new/g' <a1 >b1
mkdir -p `cat a1`
then I wanna copy all specific files with no extensions(!)..like
cd /temp
find / -name "*" -type f >a2
grep -v "\.TMP$" a2 >b2
grep -v "\.Z$" b2 >a2
grep -v "\.gz$" a2 >b2
.....and so on, then...
sed -e 's/^/new/g' <b2 >c2
mv c2 /
cd
for i in `cat b2`
do
cp -pf $i `cat c2`
done
....
this loop isn't working.
[no such directory....but the directory is there!]
also it is possible to make easily....
cp /dasdöadk/fsldfjsdfö/sdfsdf (is a file!) /dasddsss/reww/sdfs (also a file!) ...but the loop can't it .
but cp -pf $i /temp works - but without the subfolders.....
how to solve this ?
--------------------------
to say it more easier....just like copy files by a loop, for example...users/123/abc (is a file) to new/users/123/abc (also file)