<?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>LAMPDocs &#187; glibc error linux</title>
	<atom:link href="http://www.lampdocs.com/tag/glibc-error-linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lampdocs.com</link>
	<description>Documenting the Open Source</description>
	<lastBuildDate>Sat, 03 Dec 2011 15:09:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Using RAR in Linux: Guide and Samples</title>
		<link>http://www.lampdocs.com/security-protection/using-rar-archiver-in-linux/</link>
		<comments>http://www.lampdocs.com/security-protection/using-rar-archiver-in-linux/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 19:18:22 +0000</pubDate>
		<dc:creator>Vadim Cissa</dc:creator>
				<category><![CDATA[Security And Protection]]></category>
		<category><![CDATA[Disk Image formats]]></category>
		<category><![CDATA[glibc error linux]]></category>
		<category><![CDATA[linux rar glibc]]></category>
		<category><![CDATA[linux rar usage]]></category>
		<category><![CDATA[OEBPS Container Format]]></category>
		<category><![CDATA[rar]]></category>
		<category><![CDATA[RAR archiver]]></category>
		<category><![CDATA[rar command]]></category>
		<category><![CDATA[rar sfx linux]]></category>
		<category><![CDATA[unrar]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/?p=1124</guid>
		<description><![CDATA[Everything you need to use console rar in linux. Description of solving glibc error is also included. 


Related posts:<ol><li><a href='http://www.lampdocs.com/uncategorized/searching-files-in-linux/' rel='bookmark' title='Searching files in Linux'>Searching files in Linux</a></li>
<li><a href='http://www.lampdocs.com/home-personal/system-and-file-backup-on-windows-and-linux/' rel='bookmark' title='System and File Backup on Windows and Linux'>System and File Backup on Windows and Linux</a></li>
<li><a href='http://www.lampdocs.com/linux-distros/linux-live/' rel='bookmark' title='Linux Live'>Linux Live</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Nowadays almost everyone who had ever used a computer knows what a file archiver is. It represents a program that combines a number of files together into an archive file for easier storage. Although many users consider that file archivers are used to compress the data in order to reduce the size of the archive, their functions are not limited to that. For instance, the most basic archivers just take files and create an archive without compressing them.</p>
<p>There are multiple compression algorithms available to compress data. You should remember that some kinds of data can be highly compressed and some kinds of data do not benefit from compression. At the moment archive formats are also used to package software files for distribution, installation, and execution.</p>
<p>Let&#8217;s see what the most popular archive formats are and what they are used for. All of them are divided into <em>5 different types</em>:</p>
<p><strong>1. Archiving only </strong><strong>formats</strong> (only combine files):</p>
<p>- <em>ar, cpio, tar</em> and etc.</p>
<p><strong>2.</strong> <strong>Compression only </strong><strong>formats</strong> (only compress files):</p>
<p>- <em>gzip, bzip2, LZMA, compress</em> and etc.</p>
<p><strong>3.</strong> <strong>Multi-function</strong> <strong>formats</strong> can combine, compress, encrypt, create error detection and recovery information, and repackage the archive into self-extracting/self-expanding files:</p>
<p>- <em>7z, ACE, ARC, cpt, dmg, GCA, kgb, LZX, <strong>RAR</strong>, qda, ZIP</em> and etc.</p>
<p><strong>4. Software Packaging</strong><strong> formats</strong> are used to create software packages that may be self-installing files:</p>
<p>- <em>deb, pkg, RPM, MSI, JAR</em> and etc.</p>
<p><strong>5. Disk Image</strong> <strong>formats</strong> are used to create disk images or optical disk images of mass storage volumes:</p>
<p>- <em>OEB Package Format, OEBPS Container Format, Open Packaging Conventions</em> and etc.</p>
<p>If you would like to learn more about archive formats, please visit <a href="http://en.wikipedia.org/wiki/List_of_archive_formats" target="_blank">this page</a>.</p>
<p>Most likely you&#8217;ve already understood that in the given post we are not going to review all the archive formats, but the most popular one – <strong>RAR</strong>.<br />
As it was mentioned before <strong>RAR</strong> is a multi-function archive file format that supports data compression, error recovery, file spanning and etc. Though at the moment it&#8217;s licensed by <em>Win.rar GmbH</em>, it was originally developed by Russian software engineer – Eugene Roshal (RAR comes from <strong>R</strong>oshal <strong>AR</strong>chive).</p>
<p>You should know that RAR files can be created only using <em>commercial software</em> and the one that has permission from the author. In fact the only freeware that can be used to create RAR files is RAR for Pocket PC.</p>
<p><span id="more-1124"></span></p>
<p>The most popular software for creating RAR files is WinRAR, which you probably are familiar with. Of course, it&#8217;s available only for Windows, so we won&#8217;t discuss it in detail. However there is WinRAR&#8217;s command line counterpart – RAR. It&#8217;s also commercial software but is available for WIndows, Linux, Mac OS X, MS-DOS, OS/2 and FreeBSD. In addition to that there is a multi-platform <strong>unrar tool </strong>from the same distributor that is used just to extract RAR files but not to write them.</p>
<p>Let&#8217;s try to figure out the <strong><em>advantages of RAR </em></strong>in comparison to other file archivers. Here are the most important ones:</p>
<blockquote>
<ul>
<li>RAR uses <strong>128-bit AES</strong> (Advanced Encryption Standard) <strong>algorithm</strong> that is significantly better than the cryptographic algorithm used in Zip 2.0. This means that <em>RAR encryption is much safer</em>.</li>
<li>RAR has a <em>better rate of compression</em> than early compression algorithms like ZIP and gzip (still it generally compresses the data a little bit slower)</li>
<li>RAR has a <strong>recovery record function</strong>: archive formats contain redundant data embedded in the files in order to detect data storage or transmission errors, and the software used to read the archive files contain logic to detect and correct errors. Thus it <em>allows you to restore a damaged file</em>.</li>
<li><strong>Multi-volume archive support</strong>: ability to break a RAR-archive into many smaller files</li>
<li>RAR <em>allows you to work with any files as far as their size is concerned</em> (till 8 EB = 8,000,000,000,000,000,000 B = 8 x 10<sup>18</sup> bytes or 8 billion gigabytes), while popular ZIP format is limited to 2 GB.</li>
<li>RAR offers an optional compression algorithm highly optimized for multimedia data.</li>
</ul>
</blockquote>
<p>Now we are going to discuss how you can use RAR in Linux. First of all let&#8217;s see what should you do to <strong>open RAR-archives</strong>.</p>
<p>Due to the fact that there is no RAR support in Linux by default, we will need to <em>install <strong>unrar command</strong></em>:</p>
<p><strong>a) </strong>If you use Debian Linux, you need to type <em>apt-get</em> as follows to install unrar program:</p>
<blockquote><p><code># apt-get install unrar</code></p></blockquote>
<p><strong>b)</strong> In case of Fedora use <em>yum</em> command:</p>
<blockquote><p><code># yum install unrar</code></p></blockquote>
<p><strong>c)</strong> If you none of the above mentioned works for you, please do the following:</p>
<p>- download binary package from official <a href="http://www.rarlab.com/download.htm">rarlab site</a>:</p>
<blockquote><p><code>$ cd /tmp<br />
$ wget <a href="http://www.rarlab.com/rar/rarlinux-3.6.0.tar.gz">http://www.rarlab.com/rar/rarlinux-3.6.0.tar.gz</a></code></p></blockquote>
<p>- untar file:</p>
<blockquote><p><code>$ tar -zxvf rarlinux-3.6.0.tar.gz</code></p></blockquote>
<p>- go to rar directory (both unrar and rar commands are located in rar sub-directory):</p>
<blockquote><p><code>$ cd rar<br />
$ ./unrar</code></p></blockquote>
<p>- copy rar and unrar to /bin directory:</p>
<blockquote><p><code># cp rar unrar /bin</code></p></blockquote>
<p>In case you get <em>glibc error</em>, you need to use <em>rar_static</em> (you can find it in the same installation package) instead of <em>rar </em>and copy it to /bin under <em>rar</em> name.</p>
<p><strong>d)</strong> You can also install it using Synaptic: <em>System – Administration – Synapric Package Manager – find both rar and unrar – install them</em></p>
<p>For now everything should work fine. Here are some of the <strong><em>examples how you can use unrar command</em></strong>:</p>
<p>1) Suppose we want to <em>open music.rar in the current directory</em>:</p>
<blockquote><p><code>$ unrar e music.rar</code></p></blockquote>
<p>2) If you want to <em>extract files with the full path</em>, type the following command:</p>
<blockquote><p><code>$ unrar x music.rar</code></p></blockquote>
<p>3) In case you need to check the integrity of the file, use the command:</p>
<blockquote><p><code>$ unrar t music.rar</code></p></blockquote>
<p>4) To list the file inside RAR archive, use command:</p>
<blockquote><p><code>$ unrar l music.rar</code></p></blockquote>
<p>If you are searching for a GUI utility to extract and handle rar files with, there is <a href="http://peazip.sourceforge.net/" target="_blank">PeaZip</a> for Linux which may be very useful.</p>
<p>Let&#8217;s check how we can <strong>create archives using rar command</strong>. The list of rar options for Linux is pretty impressive, so we will mention just the most important ones:</p>
<p>-  <em>Add files to archive</em> (add all *.mp3 files from the current directory to the archive.rar):</p>
<blockquote><p><code>rar a archive *.mp3</code></p></blockquote>
<p>In this case the .rar extension will automatically append to the archive (the full name will be             <em>archive_file.rar</em>). If archive.rar already exists in the present working directory, then the         file you are trying to add to archive.rar will be simply added to the existing archive.           Just in case archive.rar already contains a file with the same name the old file will be replaced with the new one. Other files stored inside the archive will be unaffected. Please remember that this action is blind, meaning that RAR <em>does not check the time stamps of files.</em></p>
<p>- <em>Add files and check time stamps</em> (denoted by «-u») using the command:</p>
<blockquote><p><code>rar a -u archive *.mp3</code></p></blockquote>
<p>- <em>Archiving all files and directories</em> in current directory:</p>
<blockquote><p><code>rar a archive</code></p></blockquote>
<p>- <em>Archiving the content of a particular directory</em>:</p>
<blockquote><p><code>rar a archive  /music/korn</code></p></blockquote>
<p>- <em>Archiving groups of files</em> (according to the type):</p>
<blockquote><p><code>rar a archive '*.jpg'</code></p></blockquote>
<p>- <em>Deleting files from archive</em> (all .png files in from the current directory):</p>
<blockquote><p><code>rar d archive '*.png'</code></p></blockquote>
<p>- <em>Locking archive</em> so that any command which intends to change the archive will be ignored:</p>
<blockquote><p><code>rar k final.rar</code></p></blockquote>
<p>- <em>Renaming archived files</em>. Here is the command syntax:</p>
<p><em>rar rn &lt;arcname&gt; &lt;srcname1&gt; &lt;destname1&gt; &#8230; &lt;srcnameN&gt; &lt;destnameN&gt;</em></p>
<blockquote><p><code>rar rn data.rar readme.txt readme.bak info.txt info.bak</code></p></blockquote>
<p>Thus it will rename readme.txt to readme.bak and info.txt to info.bak in the archive data.rar<em> </em></p>
<p>-  <em>Creating recovery volumes</em> &#8211; .rev files.</p>
<p>They can be later used to reconstruct missing and damaged files in a volume set. This command makes sense only for multivolume archives and you need to specify the name of the first volume in the set as the archive name. For example:</p>
<blockquote><p><code>rar rv3 data.part01.rar</code></p></blockquote>
<p>This feature may be useful for backups or, for example, when you posted a multivolume archive to a newsgroup and a part of subscribers did not receive some of the files. Reposting recovery volumes instead of usual volumes may reduce the total number of  files to repost.</p>
<p>Each recovery volume is able to reconstruct one missing or damaged RAR volume. For example, if you have 30 volumes and 3 recovery volumes, you are able to reconstruct any 3 missing volumes. If the number of .rev files is less than the number of missing      volumes, reconstructing is impossible. The total number of usual and recovery volumes must not exceed 255.</p>
<p><em>«N» parameter</em> specifies a number of recovery volumes to create and must be less than the total number of RAR volumes in the set.</p>
<p>- <em>Encrypting files with the password</em> (using «-p») while archiving. The password is case-sensitive. If you omit the password on the command line, you will be prompted with message &#8220;Enter password&#8221;.</p>
<blockquote><p><code>rar a -pfcfcfc archive '*.txt'</code></p></blockquote>
<p>This command adds files *.txt and encrypt them with password «fcfcfc»</p>
<p>- <em>Creating SFX &#8211; Self-Extracting archives</em>:</p>
<p>If you use this switch when creating a new archive, a Self-Extracting archive (using a module in filedefault.sfx or specified in the switch) would be created. In the Windows version default.sfx should be placed in the same directory as the rar.exe, in Unix &#8211; in the user&#8217;s home directory, in <em>/usr/lib</em> or<em> /usr/local/lib</em>.</p>
<blockquote><p><code>rar a -sfxwincon.sfx myinst</code></p></blockquote>
<p>Create SelF-eXtracting (SFX) archive using wincon.sfx SFX-module.</p>
<p>Of course all the above mentioned options represent just some of the available ones. If you would like to learn more, please check «rar.txt» file from the installation package (User&#8217;s manual).</p>
<p><strong>Conclusion</strong></p>
<p>As you can see RAR for Linux is an extremely powerful tool that represents very decent replacement for WinRAR. As far as the functionality is concerned you get absolutely the same software. The only thing that may be a little bit difficult in the very beginning is the necessity to use command line. However it&#8217;s not as hard to use, so in some time you will find yourself using it without any problem.</p>


<p>Related posts:<ol><li><a href='http://www.lampdocs.com/uncategorized/searching-files-in-linux/' rel='bookmark' title='Searching files in Linux'>Searching files in Linux</a></li>
<li><a href='http://www.lampdocs.com/home-personal/system-and-file-backup-on-windows-and-linux/' rel='bookmark' title='System and File Backup on Windows and Linux'>System and File Backup on Windows and Linux</a></li>
<li><a href='http://www.lampdocs.com/linux-distros/linux-live/' rel='bookmark' title='Linux Live'>Linux Live</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/security-protection/using-rar-archiver-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

