<div class="gmail_quote">On Sun, Jun 6, 2010 at 1:49 PM, JK Wood <span dir="ltr">&lt;<a href="mailto:joshuakwood@gmail.com">joshuakwood@gmail.com</a>&gt;</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&#39;t.<br></div><div><br></div></div></blockquote></div><div><br></div>Hmm, could you give concrete examples? In `info coreutils &#39;cp invocation&#39;`:<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 + &gt; will create a file in &quot;default mode&quot;, 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 + &gt; will create files in &quot;default mode&quot;. Feel free to correct me if I have something wrong.</div><br>-- <br>Cheers,<br>Grissiom<br>


</div>