<div class="gmail_quote">On Sun, Jun 6, 2010 at 11:35 PM,  <span dir="ltr">&lt;<a href="mailto:xgizzmo@slackbuilds.org">xgizzmo@slackbuilds.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div><div></div><div class="h5">cp preserves some file modes this is bad because it depends on the source</div></div>
  file having correct permissions.<br>
<br>
# cp test test3<br>
[root@slacker:/home/gizzmo/test]<br>
# ls -l<br>
total 0<br>
-rwxrwxrwx 1 root root 0 2010-06-06 10:59 test<br>
-rwxr-xr-x 1 root root 0 2010-06-06 11:01 test3<br>
<br></blockquote><div><br></div><div>This is correct according to the doc(minus umask which is usually 022). I admit this is a little bit magic in some condition.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


cp -a preserves ownership and permissions, this is also bad because it<br>
  depends on the source file having the correct ownership and permissions.<br>
# cp -a test test5<br>
[root@slacker:/home/gizzmo/test]<br>
# ls -l<br>
total 0<br>
-rwxrwxrwx 1 nobody root 0 2010-06-06 10:59 test<br>
-rwxrwxrwx 1 nobody root 0 2010-06-06 10:59 test5<br>
<br>
cp can be made to work as we need it to but it takes a long list of flags<br>
  and in the end works no better than the simple cat something &gt; somewhere.</blockquote><div><br></div><div>Thanks for the detailed explanation. Then I know I should have a look at the ap -a in my SlackBuilds(template use it to copy docs) ;-)</div>

</div><br>-- <br>Cheers,<br>Grissiom<br>