the question about copy
I want to copy one file to different folders at the same time. Can somebody tell me how to deal with it ?For example, copy "hf.txt" to f01, f02, f03,... f99.
Thanks a lot! Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
so you can do like this
find <start_directory>-exec cp {} \;
回复 #2 BOoRFGOnZ 的帖子
Thank you for your help. But I want to copy one source to multiple directories at the same time. Is it possible ?Please try this cmd
find . -name "f" -type d -print -exec cp hf.txt {} \;note:
. :is current directory
-type d :means only find directory
-print : You should use this when use -exec
{} \;:You shouldput these at end of command line when use -exec and there is a blank between } and \.
[ 本帖最后由 secpoint 于 2007-7-6 21:08 编辑 ] CPU will run the command one by one, so you never do 2 or more things at the same time. for dest in `seq -w 99`
do
cp hf.txt f${dest}
done
页:
[1]