<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Tech-Recipes - Latest Comments in Copy entire contents of a directory and preserve permissions | Solaris | Tech-Recipes</title><link>http://tech-recipes.disqus.com/</link><description>Cookbook of Tech Tutorials</description><language>en</language><lastBuildDate>Mon, 08 Nov 2004 01:54:08 -0000</lastBuildDate><item><title>Re: Copy entire contents of a directory and preserve permissions | Solaris | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/513/copy-entire-contents-of-a-directory-and-preserve-permissions/#comment-2767857</link><description>cp uses a caracter for caracter copy method. copying with tar is faster because is uses greater buffers</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">joppe Koning</dc:creator><pubDate>Mon, 08 Nov 2004 01:54:08 -0000</pubDate></item><item><title>Re: Copy entire contents of a directory and preserve permissions | Solaris | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/513/copy-entire-contents-of-a-directory-and-preserve-permissions/#comment-2767856</link><description>&amp;lt;ul id="quote"&amp;gt;&amp;lt;h6&amp;gt;flarg wrote:&amp;lt;/h6&amp;gt;In addition, I think you meant 'cp -a', which is equivilant to 'cp -dpR'. The -d flag will dereference symbolic links.&lt;br&gt;&lt;br&gt;'cp -Rp dir1 dir2' doesn't preserve symlinks. It will instead copy the contents of the target:&lt;br&gt;&lt;br&gt;&lt;br&gt;If dir1 looks like this:&lt;br&gt;&lt;br&gt;&lt;code&gt;&lt;br&gt;-rw-r--r--   1 flarg    group           0 Aug 17 14&amp;#58;59 file1&lt;br&gt;lrwxrwxrwx   1 flarg group           4 Aug 17 14&amp;#58;59 link1 -&amp;gt; /tmp&lt;br&gt;&lt;/code&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;If you use 'cp -Rp', then 'link1' will become a directory:&lt;br&gt;&lt;br&gt;&lt;code&gt;&lt;br&gt;cp -Rp dir1 dir2&lt;br&gt;-rw-r--r--   1 flarg    group           0 Aug 17 14&amp;#58;59 file1&lt;br&gt;drwxrwxrwx   7 flarg    groupl      1701 Aug 17 14&amp;#58;59 link1&lt;br&gt;&lt;/code&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;You really want the '-d' flag to dereference any symbolic links.&amp;lt;/ul&amp;gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Fri, 01 Oct 2004 04:18:50 -0000</pubDate></item><item><title>Re: Copy entire contents of a directory and preserve permissions | Solaris | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/513/copy-entire-contents-of-a-directory-and-preserve-permissions/#comment-2767855</link><description>In addition, I think you meant 'cp -a', which is equivilant to 'cp -dpR'. The -d flag will dereference symbolic links.&lt;br&gt;&lt;br&gt;'cp -Rp dir1 dir2' doesn't preserve symlinks. It will instead copy the contents of the target:&lt;br&gt;&lt;br&gt;&lt;br&gt;If dir1 looks like this:&lt;br&gt;&lt;br&gt;&lt;code&gt;&lt;br&gt;-rw-r--r--   1 flarg    group           0 Aug 17 14&amp;#58;59 file1&lt;br&gt;lrwxrwxrwx   1 flarg group           4 Aug 17 14&amp;#58;59 link1 -&amp;gt; /tmp&lt;br&gt;&lt;/code&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;If you use 'cp -Rp', then 'link1' will become a directory:&lt;br&gt;&lt;br&gt;&lt;code&gt;&lt;br&gt;cp -Rp dir1 dir2&lt;br&gt;-rw-r--r--   1 flarg    group           0 Aug 17 14&amp;#58;59 file1&lt;br&gt;drwxrwxrwx   7 flarg    groupl      1701 Aug 17 14&amp;#58;59 link1&lt;br&gt;&lt;/code&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;You really want the '-d' flag to dereference any symbolic links.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 17 Aug 2004 11:13:10 -0000</pubDate></item><item><title>Re: Copy entire contents of a directory and preserve permissions | Solaris | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/513/copy-entire-contents-of-a-directory-and-preserve-permissions/#comment-2767854</link><description>'cp -Rp' is not supported on most Unixes. '-Rp' flags are only supported by the version of 'ls' that comes with the &lt;a href="http://www.gnu.org/software/coreutils/" rel="nofollow"&gt;GNU Core-utils&lt;/a&gt;, which is not installed everywhere.&lt;br&gt;&lt;br&gt;The tar command will work on all versions of Unix.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 17 Aug 2004 10:34:09 -0000</pubDate></item><item><title>Re: Copy entire contents of a directory and preserve permissions | Solaris | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/513/copy-entire-contents-of-a-directory-and-preserve-permissions/#comment-2767853</link><description>what's wrong with cp -Rp dir1 dir2 ?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">fall-line</dc:creator><pubDate>Mon, 19 Jul 2004 05:43:39 -0000</pubDate></item></channel></rss>