The --reply=yes is not needed if you are using the binary executable "cp"
If your "cp" is an alias, other issues arise... check ~/.bash*, /etc/bash* and /etc/profile
 
These samples work with "cp" and not the bash alias to "cp"...
 
#Copy a bunch of files to current location
cp /foo/* .
 
#Recursively copy files and directories and, to the extent possible, maintain permissions and ownership
cd /foo
cp -Rp * /destinationdirectory
     -or-
cd /foo
find . -depth -print | cpio -pmud /destinationdirectory
 
#Provide a list of files that would be copied via either of the 2 recursive copies shown above
cd /foo
find . -depth -print
 
----- Original Message -----
From: Anil Gupte
Sent: Friday, July 21, 2006 2:33 PM
Subject: cp sucks or do I not know enough?

I have read man cp and cp --help (same thing), but I cannot figure out how to shorten this:
 
cp --reply=yes /foo/* .
 
No -u does not work as expected and nor does -f
 
Also, is there an equivalent of xcopy and I mean all the features.  For example, in Dos/Win I am used to using, say:
 
xcopy /s/e/d/y \foo\*.xyz \boo
 
and sometimes
 
xcopy /s/e/d/y/l  \foo\*.xyz \boo
 
(the /l gives me a list of files that would be copied without actually copying them).  Basically I would like to copy the entire directory structure.
 
Still learning,
Anil Gupte
P.S. Thanx for any advice
 
 

 

Reply via email to