<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Suse &#38; OpenSuse Tips &#187; compression</title>
	<atom:link href="http://www.susetips.com/tag/compression/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.susetips.com</link>
	<description>Tricks, Guides, Tutorials, How Tos and Troubleshooting suse linux</description>
	<lastBuildDate>Sat, 05 Jun 2010 17:55:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Automatically dating your tar backups</title>
		<link>http://www.susetips.com/2009/05/05/automatically-dating-your-tar-backups/</link>
		<comments>http://www.susetips.com/2009/05/05/automatically-dating-your-tar-backups/#comments</comments>
		<pubDate>Wed, 06 May 2009 05:38:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[compression]]></category>

		<guid isPermaLink="false">http://www.susetips.com/2009/05/05/automatically-dating-your-tar-backups/</guid>
		<description><![CDATA[Normally, we use the tar command coupled with some compression program such as gzip to create a backup of our directories. I.e. # tar -cf /var/log/backup/tux.tar /home/tux to backup the home directory of the user tux into the directory&#160; /var/log/backup. However, if we are going to do this on a regular basis, we will be [...]<p>Post from: <a href="http://www.susetips.com">Suse & OpenSuse Tips</a><br />
-----------------------------------------------------------------------<br /></p>
<p><a href="http://www.susetips.com/2009/05/05/automatically-dating-your-tar-backups/">Automatically dating your tar backups</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Normally, we use the <font face="Courier New">tar</font> command coupled with some compression program such as <font face="Courier New">gzip</font> to create a backup of our directories. I.e.</p>
<blockquote><p># tar -cf /var/log/backup/tux.tar /home/tux</p>
</blockquote>
<p>to backup the home directory of the user <font face="Courier New">tux</font> into the directory&#160; <font face="Courier New">/var/log/backup</font>. </p>
<p> <span id="more-159"></span>
<p>However, if we are going to do this on a regular basis, we will be overwriting the file <font face="Courier New">tux.tar</font>.&#160; This would mean that we will only have one snapshot of the user <font face="Courier New">tux</font> home directory.</p>
<p>To keep copies of backups from different times, you will need to use different filenames, preferably with a date indicator.&#160; You can easily do this by,</p>
<blockquote><p><font face="Courier New"># tar –cf /var/log/backup/tux-<strong>`date +%F`</strong>.tar /home/tux</font></p>
</blockquote>
<p>Of course, if you backup a few times within the day, then you may want to use a different option from the <font face="Courier New"><strong>+%F</strong></font> format option.</p>
<p> <script type="text/javascript"><!--
google_ad_client = "pub-4709064562032853";
/* 300x250, created 5/8/09 */
google_ad_slot = "9311445083";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>Post from: <a href="http://www.susetips.com">Suse & OpenSuse Tips</a><br />
-----------------------------------------------------------------------<br /></p>
<p><a href="http://www.susetips.com/2009/05/05/automatically-dating-your-tar-backups/">Automatically dating your tar backups</a></p>
<p>---<br />Related Articles at Suse &amp; OpenSuse Tips:<ul><li><a href="http://www.susetips.com/2009/05/29/differential-backup-script-sample/" rel="bookmark" title="Permanent Link: Differential backup script sample">Differential backup script sample</a></li><li><a href="http://www.susetips.com/2010/01/12/how-to-install-gnomekde-desktop-environment-on-opensuse-11/" rel="bookmark" title="Permanent Link: How to install Gnome/KDE Desktop Environment on OpenSuse 11">How to install Gnome/KDE Desktop Environment on OpenSuse 11</a></li><li><a href="http://www.susetips.com/2009/06/29/how-to-start-services-automatically-at-boot/" rel="bookmark" title="Permanent Link: How to start services automatically at boot?">How to start services automatically at boot?</a></li><li><a href="http://www.susetips.com/2009/04/22/how-to-mount-nfs-filesystems-at-boot-time/" rel="bookmark" title="Permanent Link: How to mount NFS Filesystems at Boot Time">How to mount NFS Filesystems at Boot Time</a></li><li><a href="http://www.susetips.com/2009/04/27/how-to-create-shortcuts-on-gnome-desktop/" rel="bookmark" title="Permanent Link: How to create shortcuts on Gnome desktop">How to create shortcuts on Gnome desktop</a></li></ul></p><br />]]></content:encoded>
			<wfw:commentRss>http://www.susetips.com/2009/05/05/automatically-dating-your-tar-backups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Short and quick tutorial for the command “tar”</title>
		<link>http://www.susetips.com/2009/04/16/short-and-quick-tutorial-for-the-command-tar/</link>
		<comments>http://www.susetips.com/2009/04/16/short-and-quick-tutorial-for-the-command-tar/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 10:00:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[utility]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[compression]]></category>

		<guid isPermaLink="false">http://www.susetips.com/2009/04/16/short-and-quick-tutorial-for-the-command-tar/</guid>
		<description><![CDATA[We have recently posted about tarball and the use of tar coupled with compression programs to create it.&#160; Here, we will go through three (3) short tutorial on using tar. To compress a list of files To compress (the c in the options) a list of files into a specific file (the f in the [...]<p>Post from: <a href="http://www.susetips.com">Suse & OpenSuse Tips</a><br />
-----------------------------------------------------------------------<br /></p>
<p><a href="http://www.susetips.com/2009/04/16/short-and-quick-tutorial-for-the-command-tar/">Short and quick tutorial for the command “tar”</a></p>
]]></description>
			<content:encoded><![CDATA[<p>We have recently posted about tarball and the use of <font face="Courier New">tar</font> coupled with compression programs to create it.&#160; Here, we will go through three (3) short tutorial on using <font face="Courier New">tar</font>.</p>
<h3>To compress a list of files</h3>
<p>To compress (the <strong>c</strong> in the options) a list of files into a specific file (the <strong>f</strong> in the options) whilst having the tar program to provide progress of it (verbose mode, the <strong>v</strong> in the option), we use</p>
<p> <span id="more-131"></span><br />
<blockquote>
<p><font face="Courier New"># tar cvf &lt;tarfile&gt;.tar &lt;list of files&gt;</font></p>
</blockquote>
<p>Leading / will be removed from the archived listing as this will prevent accidental replacement of system files if the file is uncompressed by root.</p>
<h3>To uncompress a file</h3>
<p>Similarly, we use the same command options where we replace the <strong>c</strong> with <strong>x</strong> (for e<strong>X</strong>tract).</p>
<blockquote><p><font face="Courier New"># tar xvf tarfile.tar</font></p>
</blockquote>
<p>This will extract all the files from the archive and recreate the directories and files in the location where the user is in.&#160; Note that, it is good practice to create a new directory, change directory into it before you extract from a tar archive.&#160; This is to prevent overwriting of existing files, unless that is the intention.</p>
<h3>To view content of a file</h3>
<p>Sometimes, we just want to check if we have a specific file in an archive.&#160; For example, if we are accessing a tape drive (at <font face="Courier New">/dev/st0</font>), we can lis<strong>t</strong> (the <strong>t</strong> in the option) the content using</p>
<blockquote><p><font face="Courier New"># tar tvf /dev/st0</font></p>
</blockquote>
<p>More often than not, the listing will be too long for us.&#160; We can pipe the output to grep.</p>
<blockquote><p><font face="Courier New"># tar tvf /dev/st0 | grep &lt;string-to-match&gt;</font></p>
</blockquote>
<p>Hope this is short enough.&#160; Leave a comment if you want to ask questions pertaining to <font face="Courier New">tar</font>.</p>
<p> <script type="text/javascript"><!--
google_ad_client = "pub-4709064562032853";
/* 300x250, created 5/8/09 */
google_ad_slot = "9311445083";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>Post from: <a href="http://www.susetips.com">Suse & OpenSuse Tips</a><br />
-----------------------------------------------------------------------<br /></p>
<p><a href="http://www.susetips.com/2009/04/16/short-and-quick-tutorial-for-the-command-tar/">Short and quick tutorial for the command “tar”</a></p>
<p>---<br />Related Articles at Suse &amp; OpenSuse Tips:<ul><li><a href="http://www.susetips.com/2009/04/05/short-and-quick-tutorial-for-the-command-find/" rel="bookmark" title="Permanent Link: Short and quick tutorial for the command “find”">Short and quick tutorial for the command “find”</a></li><li><a href="http://www.susetips.com/2009/05/05/short-and-quick-tutorial-for-the-command-touch/" rel="bookmark" title="Permanent Link: Short and quick tutorial for the command “touch”">Short and quick tutorial for the command “touch”</a></li><li><a href="http://www.susetips.com/2009/04/17/using-the-date-command-and-its-options/" rel="bookmark" title="Permanent Link: Using the “date” command and it’s % options">Using the “date” command and it’s % options</a></li><li><a href="http://www.susetips.com/2009/05/05/using-command-output-with-backquotes/" rel="bookmark" title="Permanent Link: Using command output with backquotes">Using command output with backquotes</a></li><li><a href="http://www.susetips.com/2009/04/19/using-redirections-21-part-2-of-2/" rel="bookmark" title="Permanent Link: Using redirections: 2>&#038;1 (Part 2 of 2)">Using redirections: 2>&#038;1 (Part 2 of 2)</a></li></ul></p><br />]]></content:encoded>
			<wfw:commentRss>http://www.susetips.com/2009/04/16/short-and-quick-tutorial-for-the-command-tar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What are .Z, .gz and .bz2 files?</title>
		<link>http://www.susetips.com/2009/04/15/what-are-z-gz-and-bz2-files/</link>
		<comments>http://www.susetips.com/2009/04/15/what-are-z-gz-and-bz2-files/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 07:04:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[utility]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[compression]]></category>

		<guid isPermaLink="false">http://www.susetips.com/2009/04/15/what-are-z-gz-and-bz2-files/</guid>
		<description><![CDATA[As part of a tarball distribution and also other compressed files, you will come across files with the .Z, .gz and .bz2 extensions.&#160; These are basically files that have been compressed using different applications, much like the .zip files predominantly found in the Windows environment. compress for .Z files The UNIX command compress is used [...]<p>Post from: <a href="http://www.susetips.com">Suse & OpenSuse Tips</a><br />
-----------------------------------------------------------------------<br /></p>
<p><a href="http://www.susetips.com/2009/04/15/what-are-z-gz-and-bz2-files/">What are .Z, .gz and .bz2 files?</a></p>
]]></description>
			<content:encoded><![CDATA[<p>As part of a tarball distribution and also other compressed files, you will come across files with the <font face="Courier New">.Z</font>, <font face="Courier New">.gz</font> and <font face="Courier New">.bz2</font> extensions.&#160; These are basically files that have been compressed using different applications, much like the .zip files predominantly found in the Windows environment.</p>
<p><img title="file-compression" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="220" alt="file-compression" src="http://www.susetips.com/wp-content/uploads/2009/04/filecompression.jpg" width="220" border="0" /> </p>
<p> <span id="more-130"></span><br />
<h3><font face="Courier New">compress</font> for <font face="Courier New">.Z</font> files</h3>
<p>The UNIX command <font face="Courier New">compress</font> is used to create and extract files with the <font face="Courier New">.Z</font> extension.&#160; Unfortunately, this is not available on SuSE.&#160; If you need to uncompress <font face="Courier New">.Z</font> files that you downloaded, you can use the command <font face="Courier New">zcat</font>.</p>
<h3><font face="Courier New">gzip</font> and <font face="Courier New">gunzip</font> for <font face="Courier New">.gz</font> files</h3>
<p>This is the more common compression program and algorithm that’s used with Linux.</p>
<blockquote><p><font face="Courier New"># gzip &lt;filename&gt;        <br /># gunzip &lt;filename&gt;.gz</font></p>
</blockquote>
<h3><font face="Courier New">bzip2</font> and <font face="Courier New">bunzip2</font> for <font face="Courier New">.bz2</font> files</h3>
<p>Known to have a more superior compression ratio than <font face="Courier New">gzip</font> but less frequently used.</p>
<blockquote><p><font face="Courier New"># bzip2 &lt;filename&gt;        <br /># bunzip2 &lt;filename&gt;.bz2</font></p>
</blockquote>
<h3><font face="Courier New">zip</font> and <font face="Courier New">unzip</font> for <font face="Courier New">.zip</font> files</h3>
<p>Being in a world where Windows seems to be the norm, we can’t avoid receiving file that’s compressed with WinZIP or other tools that create <font face="Courier New">.zip</font> file.&#160; Luckily for us, we have zip and unzip for these files.</p>
<blockquote><p><font face="Courier New"># zip &lt;archive&gt;.ZIP &lt;filenames&gt;        <br /># unzip &lt;archive&gt;.ZIP</font></p>
</blockquote>
<p>Please comment if you have any further questions.</p>
<p> <!--adsense#1--></p>
<p>Post from: <a href="http://www.susetips.com">Suse & OpenSuse Tips</a><br />
-----------------------------------------------------------------------<br /></p>
<p><a href="http://www.susetips.com/2009/04/15/what-are-z-gz-and-bz2-files/">What are .Z, .gz and .bz2 files?</a></p>
<p>---<br />Related Articles at Suse &amp; OpenSuse Tips:<ul><li><a href="http://www.susetips.com/2009/04/16/short-and-quick-tutorial-for-the-command-tar/" rel="bookmark" title="Permanent Link: Short and quick tutorial for the command “tar”">Short and quick tutorial for the command “tar”</a></li><li><a href="http://www.susetips.com/2009/04/05/short-and-quick-tutorial-for-the-command-find/" rel="bookmark" title="Permanent Link: Short and quick tutorial for the command “find”">Short and quick tutorial for the command “find”</a></li><li><a href="http://www.susetips.com/2009/04/04/tripwire-open-source-security-utility/" rel="bookmark" title="Permanent Link: Tripwire : Open Source Security Utility">Tripwire : Open Source Security Utility</a></li><li><a href="http://www.susetips.com/2009/04/19/using-redirections-21-part-2-of-2/" rel="bookmark" title="Permanent Link: Using redirections: 2>&#038;1 (Part 2 of 2)">Using redirections: 2>&#038;1 (Part 2 of 2)</a></li><li><a href="http://www.susetips.com/2009/04/13/what-is-a-tarball/" rel="bookmark" title="Permanent Link: What is a tarball?">What is a tarball?</a></li></ul></p><br />]]></content:encoded>
			<wfw:commentRss>http://www.susetips.com/2009/04/15/what-are-z-gz-and-bz2-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
