Randy McMurchy wrote: > DJ Lucas wrote these words on 08/21/05 20:12 CST: > >>Paul Bowyer wrote: >> >> >>>What happened was this: >>> >>>"cp -v -a j2sdk-image /opt/jdk/jdk-1.5.0" placed the "j2sdk-image" directory >>>in "/opt/jdk/jdk-1.5.0" rather than just its contents as was probably >>>intended. >> >>This means that the /opt/jdk/jdk-1.5.0 directory already exists. The >>behavior is correct as the directory should not be there. >> >>Your error is here: >> >> >>> /usr/lib/pkgusr/install -v -d /opt/jdk/jdk-1.5.0 >> >>Which should be not there at all. > > > No, DJ, what you are saying is not right. The books instructions > do moves of the files and not copies. His script I believe just > needs to be cp -v -a j2sdk-image/*. But why does it have to be > modified anyway? sigh.... > > BTW, DJ, cp -a is the same as cp -dpR which copies recursively. > Because a directory is specified as the source, it will always > get copied, regardless whether or not a target directory exists. >
I think you've interpreted the above message incorrectly. That was the modified script that was displayed. If he did 'cp -a j2sdk-image /opt/jdk/jdk-1.5.0' and /opt/jdk/jdk-1.5.0 was an existing directory then his result is exactly what was expected. His modified script was correct...however it was a problem with his script, not the book's instructions. [EMAIL PROTECTED] ~]# mkdir testcpa1 [EMAIL PROTECTED] ~]# mkdir testcpa2 [EMAIL PROTECTED] ~]# touch testcpa1/testfile [EMAIL PROTECTED] ~]# cp -a testcpa1/ testcpa2/ [EMAIL PROTECTED] ~]# ls -l testcpa2/testcpa1/testfile -rw-r--r-- 1 dj dj 0 Aug 21 20:25 testcpa2/testcpa1/testfile [EMAIL PROTECTED] ~]# rm -rf testcpa2/ [EMAIL PROTECTED] ~]# cp -a testcpa1/ testcpa2 [EMAIL PROTECTED] ~]# ls -l testcpa2/ total 0 -rw-r--r-- 1 dj dj 0 Aug 21 20:25 testfile [EMAIL PROTECTED] ~]# -- DJ Lucas -- http://linuxfromscratch.org/mailman/listinfo/blfs-book FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
