<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://www.jackxiang.com/post//</link>
<title><![CDATA[加什么参数可以让tar把软链接所指向的真实数据也打到tar包中]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Unix/LinuxC技术]]></category>
<pubDate>Fri, 10 Oct 2014 06:51:00 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	背景：有时打包不想打包软链接，有时想要打上，这就是涉及到Linux下的tar命令了，找了下，有一个这样的参数，可使用。<br/>-h, --dereference&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dump instead the files symlinks point to<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -h, --dereference<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; don&#039;t dump symlinks; dump the files they point to<br/>实践如下：<br/>[root@test tmp]# tar --help&#124;grep dereference&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;-h, --dereference&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dump instead the files symlinks point to.<br/>1）只打软链接进来不打真实文件：<br/> tar -zcvf&nbsp;&nbsp;testtar-h.tar.gz testtar<br/>2）打真实文件进来：<br/>tar -zcvfh&nbsp;&nbsp;testtar-h.tar.gz testtar<br/><br/>小技巧:<br/>其实用scp也就自动把软链接给过滤掉了,根本不留下软链接。<br/><br/>摘自：http://bbs.chinaunix.net/thread-1447388-1-1.html<br/><br/>实践成功如下，注意h位置，否则报错：<br/><textarea name="code" class="php" rows="15" cols="100">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tar -zcvfh 2022.upload2022.bak.0519.tar.gz upload2022&nbsp;&nbsp;#注意顺序
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tar -zcvfh 2022.upload2022.bak.0519.tar.gz upload2022
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tar: 2022.upload2022.bak.0519.tar.gz: Cannot stat: No such file or directory
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tar -zcvhf 2022.upload2022.bak.0519.tar.gz upload2022&nbsp;&nbsp; #h在f前面就行
</textarea><br/>参考自：<a href="http://t.zoukankan.com/TreeDream-p-10277075.html" target="_blank">http://t.zoukankan.com/TreeDream-p-10277075.html</a>
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] 加什么参数可以让tar把软链接所指向的真实数据也打到tar包中]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>