<?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>Linux, Programming, Telephony, Asterisk, Apache, Tips &#38; Tricks &#187; swapoff</title>
	<atom:link href="http://shahidz.com/tag/swapoff/feed/" rel="self" type="application/rss+xml" />
	<link>http://shahidz.com</link>
	<description>Passionate About Technology</description>
	<lastBuildDate>Sun, 10 Jan 2010 17:38:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Creating a swap file</title>
		<link>http://shahidz.com/creating-a-swap-file-using-diskdump/</link>
		<comments>http://shahidz.com/creating-a-swap-file-using-diskdump/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 15:42:15 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Commands]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[disk dump]]></category>
		<category><![CDATA[mkswap]]></category>
		<category><![CDATA[swap]]></category>
		<category><![CDATA[swapoff]]></category>

		<guid isPermaLink="false">http://shahidz.com/creating-a-swap-file-using-diskdump/</guid>
		<description><![CDATA[Using the command dd you can create swap file.
dd &#8211; convert and copy a file 
First of all check the current swap size using the command &#8216;free&#8217;
$ free
Output
total       used       free     shared    buffers     [...]]]></description>
			<content:encoded><![CDATA[<p>Using the command <strong>dd </strong>you can create swap file.</p>
<p><strong>dd &#8211; convert and copy a file </strong></p>
<p>First of all check the current swap size using the command &#8216;free&#8217;</p>
<pre>$ free
<u>Output</u>
total       used       free     shared    buffers     cached
Mem:       1025620    1009140      16480          0       2252     465116
-/+ buffers/cache:     541772     483848
Swap:      2096440      18924    2077516</pre>
<p>Create a directory called &#8217;swap&#8217; under slash &#8216;/&#8217;</p>
<pre>$ sudo mkdir /swap</pre>
<p>First creat a file using dd command</p>
<p>Creates a file of size 1GB</p>
<pre>$ sudo dd if=/dev/zero of=/swap/swap.file bs=2048 count=524288</pre>
<p>Format this file ‘/swap/swap.file’ using the command ‘mkswap’</p>
<pre>$ mkswap /swap/swap.file</pre>
<p>Activate the ’swap.file’ to the current swap space using the command ’swapon’</p>
<pre>$ swapon /swap/swap.file</pre>
<p>After the above command 1GB will be added to you are swap area.</p>
<p>You can check by the command &#8216;free&#8217;</p>
<pre>$ free
             total       used       free     shared    buffers     cached
Mem:       1025620    1010660      14960          0       2620     465292
-/+ buffers/cache:     542748     482872
Swap:      3145008      18924    3126084</pre>
<p>You can remove the swap area by using the command &#8217;swapoff&#8217;</p>
<pre>$ swapoff /swap/swap.file</pre>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Fcreating-a-swap-file-using-diskdump%2F&amp;linkname=Creating%20a%20swap%20file"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/creating-a-swap-file-using-diskdump/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
