From 5c2fbf08a500d5e1aa3e0562eecec35865bba8b5 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Sat, 15 Nov 2008 16:36:32 +0000
Subject: [PATCH] NSH dd command test with block devices
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1242 42af7a65-404d-4744-a932-0658087f49c3
---
Documentation/NuttShell.html | 40 ++++++++++++++++++++++++++++++++++--
1 file changed, 38 insertions(+), 2 deletions(-)
diff --git a/Documentation/NuttShell.html b/Documentation/NuttShell.html
index a2a4a7c5b3f..9418056eb9e 100644
--- a/Documentation/NuttShell.html
+++ b/Documentation/NuttShell.html
@@ -754,14 +754,50 @@ dd if=<infile> of=<outfile> [bs=<sectsize>] [count=<sectors
Synopsis.
- Copy blocks from <infile> to <outfile>. As an example:
+ Copy blocks from <infile> to <outfile>.
+ <infile> or <outfile> may be the path to a standard file, a character device, or a block device.
+ Examples follow:
+
+
+ -
+ Read from character device, write to regular file.
+ This will create a new file of the specified size filled with zero.
+nsh> ls -l /dev
+/dev:
+ crw-rw-rw- 0 zero
nsh> dd if=/dev/zero of=/tmp/zeros bs=64 count=16
nsh> ls -l /tmp
/tmp:
-rw-rw-rw- 1024 ZEROS
-
+
+
+ Read from character device, write to block device.
+ This will fill the entire block device with zeros.
+
+
+nsh> ls -l /dev
+/dev:
+ brw-rw-rw- 0 ram0
+ crw-rw-rw- 0 zero
+nsh> dd if=/dev/zero of=/dev/ram0
+
+
+
+ Read from a block devic, write to a character device. This
+ will read the entire block device and dump the contents in
+ the bit bucket.
+
+
+nsh> ls -l /dev
+/dev:
+ crw-rw-rw- 0 null
+ brw-rw-rw- 0 ram0
+nsh> dd if=/dev/ram0 of=/dev/null
+
+
+