<div class="gmail_quote">On Sun, Jun 6, 2010 at 1:49 PM, JK Wood <span dir="ltr"><<a href="mailto:joshuakwood@gmail.com">joshuakwood@gmail.com</a>></span> wrote: <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div>Permissions. cp can misbehave where cat won't.<br></div><div><br></div></div></blockquote></div><div><br></div>Hmm, could you give concrete examples? In `info coreutils 'cp invocation'`:<div>
<br></div><div><div> In the absence of this option, each destination file is created</div><div> with the mode bits of the corresponding source file, minus the</div><div> bits set in the umask and minus the set-user-ID and set-group-ID</div>
<div> bits. *Note File permissions::.</div><div><br></div><div>AFAIK, cat + > will create a file in "default mode", which is masked by umask. Originally, umask is set to 022. But who knows what would happen after the system run for years? ;-)</div>
<div><br></div><div>IMHO, cp will preserve file modes in some degree while cp + > will create files in "default mode". Feel free to correct me if I have something wrong.</div><br>-- <br>Cheers,<br>Grissiom<br>
</div>