The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
probs compiling with gcc + lpthread JamesGoh High Level Programming 1 03-03-2008 01:00 AM
hi probs with rm command madhu_aqua14 UNIX for Dummies Questions & Answers 13 03-05-2007 07:58 AM
More SSH probs ... frustrated1 SUN Solaris 2 06-17-2005 09:18 AM
probs compiling lex sinner Shell Programming and Scripting 0 04-14-2004 03:50 AM
oracle probs on HPUX11 Prafulla UNIX for Dummies Questions & Answers 2 09-29-2001 04:39 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 11-16-2004
svennie svennie is offline
Registered User
  
 

Join Date: Sep 2004
Posts: 78
copy probs

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)

Last edited by svennie; 11-16-2004 at 10:45 AM..
 

Bookmarks

Tags
cpio

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:24 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0