<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Tech-Recipes - Latest Comments in Copy entire contents of a directory and preserve permissions</title><link>http://tech-recipes.disqus.com/</link><description>Cookbook of Tech Tutorials</description><atom:link href="https://tech-recipes.disqus.com/copy_entire_contents_of_a_directory_and_preserve_permissions_solaris_tech_recipes/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 23 Dec 2010 04:40:25 -0000</lastBuildDate><item><title>Re: Copy entire contents of a directory and preserve permissions</title><link>http://www.tech-recipes.com/rx/513/copy-entire-contents-of-a-directory-and-preserve-permissions/#comment-117542111</link><description>&lt;p&gt;I have a windows 2008 server machine i accessed my solaris machine using telnet .&lt;br&gt;i would like to copy or transfer some of files from windows server 2008 machine please help me.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Telmerobert</dc:creator><pubDate>Thu, 23 Dec 2010 04:40:25 -0000</pubDate></item><item><title>Re: Copy entire contents of a directory and preserve permissions</title><link>http://www.tech-recipes.com/rx/513/copy-entire-contents-of-a-directory-and-preserve-permissions/#comment-27853281</link><description>&lt;p&gt;nice work dude......i like all solaris recipes.......i appreciate ur work......&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">shreyash</dc:creator><pubDate>Sat, 02 Jan 2010 19:57:46 -0000</pubDate></item><item><title>Re: Copy entire contents of a directory and preserve permissions</title><link>http://www.tech-recipes.com/rx/513/copy-entire-contents-of-a-directory-and-preserve-permissions/#comment-27722414</link><description>&lt;p&gt;&lt;br&gt;Your command copy / pastes from FF 3.5 to MindTerm on windows XP as:&lt;/p&gt;&lt;p&gt;cd dir1 &amp;amp;&amp;amp; tar -cf ? . | (cd dir2 &amp;amp;&amp;amp; tar -xpvf -)&lt;/p&gt;&lt;p&gt;Note the ? instead of the -&lt;/p&gt;&lt;p&gt;I was in my user's home directory at the time so its all gone now! Whee!&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">trwww</dc:creator><pubDate>Fri, 01 Jan 2010 01:20:14 -0000</pubDate></item><item><title>Re: Copy entire contents of a directory and preserve permissions</title><link>http://www.tech-recipes.com/rx/513/copy-entire-contents-of-a-directory-and-preserve-permissions/#comment-2767857</link><description>&lt;p&gt;cp uses a caracter for caracter copy method. copying with tar is faster because is uses greater buffers&lt;/p&gt;</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</title><link>http://www.tech-recipes.com/rx/513/copy-entire-contents-of-a-directory-and-preserve-permissions/#comment-2767856</link><description>&lt;p&gt;&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;/p&gt;&lt;p&gt;'cp -Rp dir1 dir2' doesn't preserve symlinks. It will instead copy the contents of the target:&lt;/p&gt;&lt;p&gt;If dir1 looks like this:&lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;br&gt;-rw-r--r--   1 flarg    group           0 Aug 17 14:59 file1&lt;br&gt;lrwxrwxrwx   1 flarg group           4 Aug 17 14:59 link1 -&amp;gt; /tmp&lt;br&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;If you use 'cp -Rp', then 'link1' will become a directory:&lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;br&gt;cp -Rp dir1 dir2&lt;br&gt;-rw-r--r--   1 flarg    group           0 Aug 17 14:59 file1&lt;br&gt;drwxrwxrwx   7 flarg    groupl      1701 Aug 17 14:59 link1&lt;br&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;You really want the '-d' flag to dereference any symbolic links.&amp;lt;/ul&amp;gt;&lt;/p&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</title><link>http://www.tech-recipes.com/rx/513/copy-entire-contents-of-a-directory-and-preserve-permissions/#comment-2767855</link><description>&lt;p&gt;In addition, I think you meant 'cp -a', which is equivilant to 'cp -dpR'. The -d flag will dereference symbolic links.&lt;/p&gt;&lt;p&gt;'cp -Rp dir1 dir2' doesn't preserve symlinks. It will instead copy the contents of the target:&lt;/p&gt;&lt;p&gt;If dir1 looks like this:&lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;br&gt;-rw-r--r--   1 flarg    group           0 Aug 17 14:59 file1&lt;br&gt;lrwxrwxrwx   1 flarg group           4 Aug 17 14:59 link1 -&amp;gt; /tmp&lt;br&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;If you use 'cp -Rp', then 'link1' will become a directory:&lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;br&gt;cp -Rp dir1 dir2&lt;br&gt;-rw-r--r--   1 flarg    group           0 Aug 17 14:59 file1&lt;br&gt;drwxrwxrwx   7 flarg    groupl      1701 Aug 17 14:59 link1&lt;br&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;You really want the '-d' flag to dereference any symbolic links.&lt;/p&gt;</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</title><link>http://www.tech-recipes.com/rx/513/copy-entire-contents-of-a-directory-and-preserve-permissions/#comment-2767854</link><description>&lt;p&gt;'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 noopener" target="_blank" title="http://www.gnu.org/software/coreutils/"&gt;GNU Core-utils&lt;/a&gt;, which is not installed everywhere.&lt;/p&gt;&lt;p&gt;The tar command will work on all versions of Unix.&lt;/p&gt;</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</title><link>http://www.tech-recipes.com/rx/513/copy-entire-contents-of-a-directory-and-preserve-permissions/#comment-2767853</link><description>&lt;p&gt;what's wrong with cp -Rp dir1 dir2 ?&lt;/p&gt;</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>