summaryrefslogtreecommitdiff
path: root/nuttx/Documentation/NuttShell.html
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-15 16:36:32 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-15 16:36:32 +0000
commit9334df87efdf6925fc6289cdca69e3e5ec81f118 (patch)
tree5a154cfc0654f7bf377686a56406ef1901e91e2b /nuttx/Documentation/NuttShell.html
parenta53de1f10c52bc787111ef7091f909f9ccdd53ac (diff)
downloadpx4-nuttx-9334df87efdf6925fc6289cdca69e3e5ec81f118.tar.gz
px4-nuttx-9334df87efdf6925fc6289cdca69e3e5ec81f118.tar.bz2
px4-nuttx-9334df87efdf6925fc6289cdca69e3e5ec81f118.zip
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
Diffstat (limited to 'nuttx/Documentation/NuttShell.html')
-rw-r--r--nuttx/Documentation/NuttShell.html40
1 files changed, 38 insertions, 2 deletions
diff --git a/nuttx/Documentation/NuttShell.html b/nuttx/Documentation/NuttShell.html
index a2a4a7c5b..9418056eb 100644
--- a/nuttx/Documentation/NuttShell.html
+++ b/nuttx/Documentation/NuttShell.html
@@ -754,14 +754,50 @@ dd if=&lt;infile&gt; of=&lt;outfile&gt; [bs=&lt;sectsize&gt;] [count=&lt;sectors
</pre></ul>
<p>
<b>Synopsis</b>.
- Copy blocks from &lt;infile&gt; to &lt;outfile&gt;. As an example:
+ Copy blocks from &lt;infile&gt; to &lt;outfile&gt;.
+ &lt;infile&gt; or &lt;outfile&gt; may be the path to a standard file, a character device, or a block device.
+ Examples follow:
+</p>
+<ol>
+ <li>
+ Read from character device, write to regular file.
+ This will create a new file of the specified size filled with zero.
<ul><pre>
+nsh&gt; ls -l /dev
+/dev:
+ crw-rw-rw- 0 zero
nsh&gt; dd if=/dev/zero of=/tmp/zeros bs=64 count=16
nsh&gt; ls -l /tmp
/tmp:
-rw-rw-rw- 1024 ZEROS
</pre></ul>
-</p>
+ </li>
+ <li>
+ Read from character device, write to block device.
+ This will fill the entire block device with zeros.
+ </li>
+<ul><pre>
+nsh&gt; ls -l /dev
+/dev:
+ brw-rw-rw- 0 ram0
+ crw-rw-rw- 0 zero
+nsh&gt; dd if=/dev/zero of=/dev/ram0
+</pre></ul>
+ </li>
+ <li>
+ 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.
+ </li>
+<ul><pre>
+nsh&gt; ls -l /dev
+/dev:
+ crw-rw-rw- 0 null
+ brw-rw-rw- 0 ram0
+nsh&gt; dd if=/dev/ram0 of=/dev/null
+</pre></ul>
+ </li>
+</ol>
<table width ="100%">
<tr bgcolor="#e4e4e4">