<?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>dd command &#8211; lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</title>
	<atom:link href="https://lifelinux.com/tag/dd-command/feed/" rel="self" type="application/rss+xml" />
	<link>https://lifelinux.com</link>
	<description>All About Linux !</description>
	<lastBuildDate>Tue, 11 Aug 2015 06:56:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.3</generator>
	<item>
		<title>How To Test Disk I/O Performance With dd Command</title>
		<link>https://lifelinux.com/how-to-test-disk-io-performance-with-dd-command/</link>
					<comments>https://lifelinux.com/how-to-test-disk-io-performance-with-dd-command/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 11 Aug 2015 06:56:12 +0000</pubDate>
				<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[dd command]]></category>
		<category><![CDATA[io speed test]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1963</guid>

					<description><![CDATA[<p>How do I check the performance of a hard drive including the read and write speed on a Linux operating systems? dd command dd is a command-line utility for Unix and Unix-like operating systems whose primary purpose is to convert and copy files. In this tutorial I will show you how to use the dd [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-test-disk-io-performance-with-dd-command/">How To Test Disk I/O Performance With dd Command</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>How do I check the performance of a hard drive including the read and write speed on a Linux operating systems?<span id="more-1963"></span></p>
<h2>dd command</h2>
<p>dd is a command-line utility for Unix and Unix-like operating systems whose primary purpose is to convert and copy files.</p>
<p>In this tutorial I will show you how to use the dd command to test disk I/O performance.</p>
<p>Open a shell prompt or login to a remote server via ssh and type the following command</p>
<pre># dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
</pre>
<p>Sample outputs</p>
<pre>16384+0 records in
16384+0 records out
1073741824 bytes (1.1 GB) copied, 5.00633 s, 214 MB/s
</pre>
<p>Test on device</p>
<pre>ATA device, with non-removable media
	Model Number:       SAMSUNG MZ7WD120HCFV-00003              
	Serial Number:      S1FZNYAG402762      
	Firmware Revision:  DXM9203Q
	Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
</pre>
<h2>Understanding dd command options</h2>
<p><strong>if=/dev/zero:</strong> The name of the input file you want dd the read from.<br />
<strong>of=test:</strong> The name of the output file you want dd write the input file to.<br />
<strong>bs=64k</strong> (block-size) : Set the size of the block you want dd to use.<br />
<strong>count=16k</strong> (number of blocks): The number of blocks you want dd to read.<br />
<strong>conv=fdatasync</strong>: The flag conv=fdatasync tells dd to sync the write to disk before it exits. Without this flag, dd will perform the write but some of it will remain in memory, not giving you an accurate picture of the true write performance of the disk.</p>
<g:plusone href="https://lifelinux.com/how-to-test-disk-io-performance-with-dd-command/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-test-disk-io-performance-with-dd-command/">How To Test Disk I/O Performance With dd Command</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-test-disk-io-performance-with-dd-command/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Backup &#038; Restore Master Boot Record (MBR) In Linux</title>
		<link>https://lifelinux.com/how-to-backup-restore-master-boot-record-mbr-in-linux/</link>
					<comments>https://lifelinux.com/how-to-backup-restore-master-boot-record-mbr-in-linux/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Mon, 22 Aug 2011 15:09:43 +0000</pubDate>
				<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[boot sector]]></category>
		<category><![CDATA[byte]]></category>
		<category><![CDATA[data storage]]></category>
		<category><![CDATA[dd command]]></category>
		<category><![CDATA[hard disk]]></category>
		<category><![CDATA[master boot record]]></category>
		<category><![CDATA[mbr]]></category>
		<category><![CDATA[partition table]]></category>
		<category><![CDATA[primary and extended partition]]></category>
		<category><![CDATA[raid 1]]></category>
		<category><![CDATA[sfdisk]]></category>
		<category><![CDATA[sfdisk command]]></category>
		<category><![CDATA[signature]]></category>
		<category><![CDATA[storage device]]></category>
		<category><![CDATA[UNIX]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=957</guid>

					<description><![CDATA[<p>A master boot record (MBR) is a type of boot sector popularized by the IBM Personal Computer. It consists of a sequence of 512 bytes located at the first sector of a data storage device such as a hard disk. MBRs are usually placed on storage devices intended for use with IBM PC-compatible systems. MBR [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-backup-restore-master-boot-record-mbr-in-linux/">How To Backup &#038; Restore Master Boot Record (MBR) In Linux</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>A master boot record (MBR) is a type of boot sector popularized by the IBM Personal Computer. It consists of a sequence of 512 bytes located at the first sector of a data storage device such as a hard disk. MBRs are usually placed on storage devices intended for use with IBM PC-compatible systems.<br />
<span id="more-957"></span></p>
<h2>MBR Total Size</h2>
<p>446 + 64 + 2 = 512</p>
<p><strong>Where,</strong><br />
446 bytes &#8211; Bootstrap.<br />
64 bytes &#8211; Partition table.<br />
2 bytes &#8211; Signature.</p>
<h2>Backup MBR</h2>
<p>Linux or Unix provides &#8220;dd&#8221; tool to backup any file. Usually, you must be &#8220;root&#8221; so that you can use it.</p>
<pre>
# dd if=/dev/sda of=/backup/mbr_sda.bak bs=512 count=1
</pre>
<p>Above command will copy 512 bytes (MBR) from sda to mbr_sda.bak</p>
<h2>Restore MBR</h2>
<p>To restore the MBR and partition table, type the following command</p>
<pre>
# dd if=/backup/mbr_sda.bak of=/dev/hda bs=512 count=1
</pre>
<p>To restore the MBR, type the following command</p>
<pre>
# dd if=/backup/mbr_sda.bak of=/dev/hda bs=446 count=1
</pre>
<g:plusone href="https://lifelinux.com/how-to-backup-restore-master-boot-record-mbr-in-linux/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-backup-restore-master-boot-record-mbr-in-linux/">How To Backup &#038; Restore Master Boot Record (MBR) In Linux</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-backup-restore-master-boot-record-mbr-in-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Add/Create Swap File</title>
		<link>https://lifelinux.com/how-to-add-create-swap-file/</link>
					<comments>https://lifelinux.com/how-to-add-create-swap-file/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Sat, 14 May 2011 10:56:19 +0000</pubDate>
				<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[create linux swap file]]></category>
		<category><![CDATA[dd command]]></category>
		<category><![CDATA[free command]]></category>
		<category><![CDATA[linux swap command]]></category>
		<category><![CDATA[linux swap commands]]></category>
		<category><![CDATA[linux swap file]]></category>
		<category><![CDATA[linux swap file partition]]></category>
		<category><![CDATA[linux swap file size]]></category>
		<category><![CDATA[linux swap file system]]></category>
		<category><![CDATA[linux swap filesystem]]></category>
		<category><![CDATA[linux swap partitions]]></category>
		<category><![CDATA[linux swap space]]></category>
		<category><![CDATA[linux swapfile]]></category>
		<category><![CDATA[mkswap command]]></category>
		<category><![CDATA[redhat swap file]]></category>
		<category><![CDATA[swapfile in linux]]></category>
		<category><![CDATA[swapon command]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=498</guid>

					<description><![CDATA[<p>If you need additional swap space to improve your system performance. You have two different ways: add/upgrade a swap partition or create a swap file. But changing the size or create a new swap partition is not easy, the best solution is to create a new swap file. This articles help you add/create swap file [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-add-create-swap-file/">How To Add/Create Swap File</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>If you need additional swap space to improve your system performance. You have two different ways: add/upgrade a swap partition or create a swap file. But changing the size or create a new swap partition is not easy, the best solution is to create a new swap file. This articles help you add/create swap file very quickly.<span id="more-498"></span></p>
<h3>Creating swap file on Linux</h3>
<p>Login as root and type the following command to create 512MB swap file</p>
<pre>
[root@lifelinux ~]# dd if=/dev/zero of=/swapfile bs=1024 count=524288
</pre>
<p>Where,<br />
<strong>if=/dev/zero</strong>: read from /dev/zero instead of stdin<br />
<strong>of=/swapfile</strong>: write to /swapfile instead of stdout<br />
<strong>bs=1024</strong>: blocksize = 1024 bytes<br />
<strong>count=524288</strong>: number of blocks are 524288</p>
<p>Setup the swap file with the command: mkswap. Type following command to setup your swap file:</p>
<pre>
[root@lifelinux ~]# mkswap /swapfile
</pre>
<p>To enable the swap file immediately but not automatically at boot time</p>
<pre>
[root@lifelinux ~]# swapon /swapfile
</pre>
<p>To activate the new swap file automatically at the boot, you need to edit the file /etc/fstab, enter</p>
<pre>
[root@lifelinux ~]# vi /etc/fstab
</pre>
<p>Add the following line at end of the file</p>
<pre>
/swapfile         swap             swap        defaults         0   0
</pre>
<p>To verify the swap file is working fine with these commands: </p>
<pre>
[root@lifelinux ~]# free -m
</pre>
<p>Or </p>
<pre>
[root@lifelinux ~]# cat /proc/swaps
</pre>
<h3>Recommended size of linux swap</h3>
<p>1 GB RAM &#8212;> 2 GB of Swap file<br />
2 GB RAM &#8212;> 4 GB of Swap file<br />
4 GB RAM &#8212;> 8 GB of Swap file<br />
8 GB RAM &#8212;> 12 GB of Swap file<br />
16 GB RAM &#8212;> 24 GB of Swap file<br />
32 GB RAM &#8212;> 32 GB of Swap file</p>
<g:plusone href="https://lifelinux.com/how-to-add-create-swap-file/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-add-create-swap-file/">How To Add/Create Swap File</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-add-create-swap-file/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Linux Hard Disk Speed Tests</title>
		<link>https://lifelinux.com/linux-hard-disk-speed-tests/</link>
					<comments>https://lifelinux.com/linux-hard-disk-speed-tests/#comments</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Sun, 08 May 2011 10:35:52 +0000</pubDate>
				<category><![CDATA[File System]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[check hard disk speed]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[dd command]]></category>
		<category><![CDATA[dd command test hdd]]></category>
		<category><![CDATA[hard disk speed]]></category>
		<category><![CDATA[HDD benchmark on linux]]></category>
		<category><![CDATA[hdparm]]></category>
		<category><![CDATA[hdparm command]]></category>
		<category><![CDATA[List Hard Drives]]></category>
		<category><![CDATA[test speed hdd]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=332</guid>

					<description><![CDATA[<p>While having a large hard drive is good for storing lots of data, it is also important for your computer to have a fast hard drive. Faster hard drives help your computer run more smoothly. You can use the hdparm tool or dd command to determine your disk speeds from the Linux command line. List [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/linux-hard-disk-speed-tests/">Linux Hard Disk Speed Tests</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>While having a large hard drive is good for storing lots of data, it is also important for your computer to have a fast hard drive. Faster hard drives help your computer run more smoothly. You can use the hdparm tool or dd command to determine your disk speeds from the Linux command line.<br />
<span id="more-332"></span></p>
<h3>List Hard Drives</h3>
<p>Open a terminal or go to a command line on your Linux system. As root, run the command:</p>
<pre>
[root@server2 ~]# fdisk -l
</pre>
<p>Sample outputs:</p>
<pre>
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14         274     2096482+  83  Linux
/dev/sda3             275         535     2096482+  82  Linux swap / Solaris
/dev/sda4             536       30400   239890612+   5  Extended
/dev/sda5             536       30400   239890581   83  Linux

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          13      104391   83  Linux
/dev/sdb2              14         274     2096482+  83  Linux
/dev/sdb3             275         535     2096482+  82  Linux swap / Solaris
/dev/sdb4             536       30400   239890612+   5  Extended
/dev/sdb5             536       30400   239890581   83  Linux
</pre>
<h3>hdparm command</h3>
<p>You can use the <strong>hdparm command</strong> to check hard disk speed. It provides a command line interface to various hard disk ioctls supported by the stock Linux ATA/IDE/SATA device driver subsystem. Login as the root and enter the following command:</p>
<pre>
[root@server2 ~]# hdparm -tT /dev/sda
</pre>
<p>Sample outputs:</p>
<pre>
/dev/sda:
 Timing cached reads:   29084 MB in  2.00 seconds = 14574.71 MB/sec
 Timing buffered disk reads:  308 MB in  3.01 seconds = 102.36 MB/sec
</pre>
<p><strong>Note:</strong><br />
-t :perform device read timings<br />
-T :perform cache read timings<br />
/dev/sda : Hard disk device file</p>
<h3>dd Command</h3>
<p>You can use the <strong>dd command</strong> as follows to get speed info too:</p>
<pre>
[root@server2 ~]# dd if=/dev/zero of=/tmp/test.img bs=8k count=256k
[root@server2 ~]# rm /tmp/test.img
</pre>
<p>Sample outputs:</p>
<pre>
dd: writing `/tmp/test.img': No space left on device
210779+0 records in
210778+0 records out
1726697472 bytes (1.7 GB) copied, 22.3398 seconds, 77.3 MB/s
</pre>
<g:plusone href="https://lifelinux.com/linux-hard-disk-speed-tests/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/linux-hard-disk-speed-tests/">Linux Hard Disk Speed Tests</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/linux-hard-disk-speed-tests/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How To Destroy All Hard Drive Data In Debian</title>
		<link>https://lifelinux.com/how-to-destroy-all-hard-drive-data-in-debian/</link>
					<comments>https://lifelinux.com/how-to-destroy-all-hard-drive-data-in-debian/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 23 Nov 2010 08:24:31 +0000</pubDate>
				<category><![CDATA[File System]]></category>
		<category><![CDATA[dd command]]></category>
		<category><![CDATA[delete hdd]]></category>
		<category><![CDATA[destroy all data in hdd]]></category>
		<category><![CDATA[destroy all hard drive]]></category>
		<category><![CDATA[destroy all hdd]]></category>
		<category><![CDATA[killall command]]></category>
		<category><![CDATA[sudo command]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=36</guid>

					<description><![CDATA[<p>If you want to delete all data contained in your hard drive so that you render it empty in case you want to sell it or for any other reasons, you need to follow these steps: 1. Turn on your computer and boot from Debian Live CD or any of its variants (Debian, Ubuntu, Xubuntu, [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-destroy-all-hard-drive-data-in-debian/">How To Destroy All Hard Drive Data In Debian</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>If you want to delete all data contained in your hard drive so that you  render it empty in case you want to sell it or for any other reasons,  you need to follow these steps:</p>
<p>1. Turn on your computer and boot from <strong>Debian Live CD</strong> or any of its variants (Debian, Ubuntu, Xubuntu, Edubuntu, Ubuntulite, Fluxbuntu, etc.).<span id="more-36"></span><br />
2. In the terminal, run the command given below to disable the swap partition:</p>
<pre>sudo swapoff</pre>
<p><strong>Note:</strong> If you don&#8217;t execute this command, some data might remain on your hard drive.</p>
<p>3. Now you have to run the command listed below to zero out your hard drive:</p>
<pre>sudo dd if=/dev/zero of=/dev/sda</pre>
<p>The formatting process might take a long time to finish, this depends on  the size of your hard disk. To view remaining time, you have to run  this command:</p>
<pre>sudo killall -USR1 dd</pre>
<p>Upon running the command listed above, you will be shown the disk space &#8220;cleaned&#8221; in GB.</p>
<g:plusone href="https://lifelinux.com/how-to-destroy-all-hard-drive-data-in-debian/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-destroy-all-hard-drive-data-in-debian/">How To Destroy All Hard Drive Data In Debian</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-destroy-all-hard-drive-data-in-debian/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
