summaryrefslogtreecommitdiff
path: root/nuttx/Documentation/NuttShell.html
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-15 15:36:16 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-15 15:36:16 +0000
commita53de1f10c52bc787111ef7091f909f9ccdd53ac (patch)
tree1a7f22450f48ca990bd4b1bc0109c563bcfa21e5 /nuttx/Documentation/NuttShell.html
parenteee89cef747135ccc8267d6a92f623ee85b6c843 (diff)
downloadpx4-nuttx-a53de1f10c52bc787111ef7091f909f9ccdd53ac.tar.gz
px4-nuttx-a53de1f10c52bc787111ef7091f909f9ccdd53ac.tar.bz2
px4-nuttx-a53de1f10c52bc787111ef7091f909f9ccdd53ac.zip
Add dd command to NSH
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1241 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/Documentation/NuttShell.html')
-rw-r--r--nuttx/Documentation/NuttShell.html149
1 files changed, 92 insertions, 57 deletions
diff --git a/nuttx/Documentation/NuttShell.html b/nuttx/Documentation/NuttShell.html
index a46f8feda..a2a4a7c5b 100644
--- a/nuttx/Documentation/NuttShell.html
+++ b/nuttx/Documentation/NuttShell.html
@@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4">
<td>
<h1><big><font color="#3c34ec"><i>NuttShell (NSH)</i></font></big></h1>
- <p>Last Updated: October 15, 2008</p>
+ <p>Last Updated: November 15, 2008</p>
</td>
</tr>
</table>
@@ -107,163 +107,169 @@
<tr>
<td><br></td>
<td>
- <a href="#cmdecho">2.5 Echo Strings and Variables (echo)</a>
+ <a href="#cmddd">2.5 Copy and Convert Files (dd)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdexec">2.6 Execute User Code (exec)</a>
+ <a href="#cmdecho">2.6 Echo Strings and Variables (echo)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdget">2.7 Get File Via TFTP (get)</a>
+ <a href="#cmdexec">2.7 Execute User Code (exec)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdexit">2.8 Exit NSH (exit)</a>
+ <a href="#cmdget">2.8 Get File Via TFTP (get)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdhelp">2.9 Show Usage Command Usage (help)</a>
+ <a href="#cmdexit">2.9 Exit NSH (exit)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdifconfig">2.10 Show Network Configuration (ifconfig)</a>
+ <a href="#cmdhelp">2.10 Show Usage Command Usage (help)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdls">2.11 List Directory Contents (ls)</a>
+ <a href="#cmdifconfig">2.11 Show Network Configuration (ifconfig)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdmbhw">2.12 Access Memory (mb, mh, and mw)</a>
+ <a href="#cmdls">2.12 List Directory Contents (ls)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdmem">2.13 Show Memory Manager Status (mem)</a>
+ <a href="#cmdmbhw">2.13 Access Memory (mb, mh, and mw)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdps">2.14 Show Current Tasks and Threads (ps)</a>
+ <a href="#cmdmem">2.14 Show Memory Manager Status (mem)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdmkdir">2.15 Create a Directory (mkdir)</a>
+ <a href="#cmdps">2.15 Show Current Tasks and Threads (ps)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdmkfatfs">2.16 Create a FAT Filesystem (mkfatfs)</a>
+ <a href="#cmdmkdir">2.16 Create a Directory (mkdir)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdmkfifo">2.17 Create a FIFO (mkfifo)</a>
+ <a href="#cmdmkfatfs">2.17 Create a FAT Filesystem (mkfatfs)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdmkrd">2.18 Create a RAMDISK (mkrd)</a>
+ <a href="#cmdmkfifo">2.18 Create a FIFO (mkfifo)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdmount">2.19 Mount a File System (mount)</a>
+ <a href="#cmdmkrd">2.19 Create a RAMDISK (mkrd)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdping">2.20 Check Network Peer (ping)</a>
+ <a href="#cmdmount">2.20 Mount a File System (mount)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdput">2.21 Send File Via TFTP (put)</a>
+ <a href="#cmdping">2.21 Check Network Peer (ping)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdpwd">2.22 Show Current Working Directory (pwd)</a>
+ <a href="#cmdput">2.22 Send File Via TFTP (put)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdrm">2.23 Remove a File (rm)</a>
+ <a href="#cmdpwd">2.23 Show Current Working Directory (pwd)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdrmdir">2.24 Remove a Directory (rmdir)</a>
+ <a href="#cmdrm">2.24 Remove a File (rm)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdset">2.25 Set an Environment Variable (set)</a>
+ <a href="#cmdrmdir">2.25 Remove a Directory (rmdir)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdsh">2.26 Execute an NSH Script (sh)</a>
+ <a href="#cmdset">2.26 Set an Environment Variable (set)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdsleep">2.27 Wait for Seconds (sleep)</a>
+ <a href="#cmdsh">2.27 Execute an NSH Script (sh)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdunmount">2.28 Unmount a File System (umount)</a>
+ <a href="#cmdsleep">2.28 Wait for Seconds (sleep)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdunset">2.29 Unset an Environment Variable (unset)</a>
+ <a href="#cmdunmount">2.29 Unmount a File System (umount)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdusleep">2.30 Wait for Microseconds (usleep)</a>
+ <a href="#cmdunset">2.30 Unset an Environment Variable (unset)</a>
</td>
</tr>
<tr>
<td><br></td>
<td>
- <a href="#cmdxd">2.31 Hexadecimal Dump (xd)</a>
+ <a href="#cmdusleep">2.31 Wait for Microseconds (usleep)</a>
+ </td>
+</tr>
+<tr>
+ <td><br></td>
+ <td>
+ <a href="#cmdxd">2.32 Hexadecimal Dump (xd)</a>
</td>
</tr>
<tr>
@@ -730,14 +736,37 @@ cp &lt;source-path&gt; &lt;dest-path&gt;
</pre></ul>
<p>
<b>Synopsis</b>.
- Copy of the contents of the file at <code>&lt;source-path&lt;</code> to the location
- in the filesystem indicated by <code>&lt;path-path&gt;</code>.
+ Copy of the contents of the file at <code>&lt;source-path&gt;</code> to the location
+ in the filesystem indicated by <code>&lt;dest-path&gt;</code>.
</p>
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdecho"><h2>2.5 Echo Strings and Variables (echo)</h2></a>
+ <a name="cmddd"><h2>2.5 Copy and Convert Files (dd)</h2></a>
+ </td>
+ </tr>
+</table>
+
+<a <p><b>Command Syntax:</b></p>
+<ul><pre>
+dd if=&lt;infile&gt; of=&lt;outfile&gt; [bs=&lt;sectsize&gt;] [count=&lt;sectors&gt;] [skip=&lt;sectors&gt;]
+</pre></ul>
+<p>
+ <b>Synopsis</b>.
+ Copy blocks from &lt;infile&gt; to &lt;outfile&gt;. As an example:
+<ul><pre>
+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>
+
+<table width ="100%">
+ <tr bgcolor="#e4e4e4">
+ <td>
+ <a name="cmdecho"><h2>2.6 Echo Strings and Variables (echo)</h2></a>
</td>
</tr>
</table>
@@ -755,7 +784,7 @@ echo [&lt;string|$name&gt; [&lt;string|$name&gt;...]]
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdexec"><h2>2.6 Execute User Code (exec)</h2></a>
+ <a name="cmdexec"><h2>2.7 Execute User Code (exec)</h2></a>
</td>
</tr>
</table>
@@ -774,7 +803,7 @@ exec &lt;hex-address&gt;
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdget"><h2>2.7 Get File Via TFTP (get)</h2></a>
+ <a name="cmdget"><h2>2.8 Get File Via TFTP (get)</h2></a>
</td>
</tr>
</table>
@@ -809,7 +838,7 @@ get [-b|-n] [-f &lt;local-path&gt;] -h &lt;ip-address&gt; &lt;remote-path&gt;
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdexit"><h2>2.8 Exit NSH (exit)</h2></a>
+ <a name="cmdexit"><h2>2.9 Exit NSH (exit)</h2></a>
</td>
</tr>
</table>
@@ -828,7 +857,7 @@ exit
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdhelp"><h2>2.9 Show Usage Command Usage (help)</h2></a>
+ <a name="cmdhelp"><h2>2.10 Show Usage Command Usage (help)</h2></a>
</td>
</tr>
</table>
@@ -845,7 +874,7 @@ help
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdifconfig"><h2>2.10 Show Network Configuration (ifconfig)</h2></a>
+ <a name="cmdifconfig"><h2>2.11 Show Network Configuration (ifconfig)</h2></a>
</td>
</tr>
</table>
@@ -871,7 +900,7 @@ eth0 HWaddr 00:18:11:80:10:06
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdls"><h2>2.11 List Directory Contents (ls)</h2></a>
+ <a name="cmdls"><h2>2.12 List Directory Contents (ls)</h2></a>
</td>
</tr>
</table>
@@ -908,7 +937,7 @@ ls [-lRs] &lt;dir-path&gt;
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdmbhw"><h2>2.12 Access Memory (mb, mh, and mw)</h2></a>
+ <a name="cmdmbhw"><h2>2.13 Access Memory (mb, mh, and mw)</h2></a>
</td>
</tr>
</table>
@@ -962,7 +991,7 @@ nsh&gt;
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdmem"><h2>2.13 Show Memory Manager Status (mem)</h2></a>
+ <a name="cmdmem"><h2>2.14 Show Memory Manager Status (mem)</h2></a>
</td>
</tr>
</table>
@@ -1011,7 +1040,7 @@ nsh&gt;
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdps"><h2>2.14 Show Current Tasks and Threads (ps)</h2></a>
+ <a name="cmdps"><h2>2.15 Show Current Tasks and Threads (ps)</h2></a>
</td>
</tr>
</table>
@@ -1037,7 +1066,7 @@ nsh&gt;
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdmkdir"><h2>2.15 Create a Directory (mkdir)</h2></a>
+ <a name="cmdmkdir"><h2>2.16 Create a Directory (mkdir)</h2></a>
</td>
</tr>
</table>
@@ -1072,7 +1101,7 @@ nsh>
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdmkfatfs"><h2>2.16 Create a FAT Filesystem (mkfatfs)</h2></a>
+ <a name="cmdmkfatfs"><h2>2.17 Create a FAT Filesystem (mkfatfs)</h2></a>
</td>
</tr>
</table>
@@ -1092,7 +1121,7 @@ mkfatfs &lt;path&gt;
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdmkfifo"><h2>2.17 Create a FIFO (mkfifo)</h2></a>
+ <a name="cmdmkfifo"><h2>2.18 Create a FIFO (mkfifo)</h2></a>
</td>
</tr>
</table>
@@ -1130,7 +1159,7 @@ nsh>
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdmkrd"><h2>2.18 Create a RAMDISK (mkrd)</h2></a>
+ <a name="cmdmkrd"><h2>2.19 Create a RAMDISK (mkrd)</h2></a>
</td>
</tr>
</table>
@@ -1181,7 +1210,7 @@ nsh&gt;
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdmount"><h2>2.19 Mount a File System (mount)</h2></a>
+ <a name="cmdmount"><h2>2.20 Mount a File System (mount)</h2></a>
</td>
</tr>
</table>
@@ -1248,7 +1277,7 @@ nsh>
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdping"><h2>2.20 Check Network Peer (ping)</h2></a>
+ <a name="cmdping"><h2>2.21 Check Network Peer (ping)</h2></a>
</td>
</tr>
</table>
@@ -1281,7 +1310,7 @@ nsh&gt;
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdput"><h2>2.21 Send File Via TFTP (put)</h2></a>
+ <a name="cmdput"><h2>2.22 Send File Via TFTP (put)</h2></a>
</td>
</tr>
</table>
@@ -1316,7 +1345,7 @@ put [-b|-n] [-f &lt;remote-path&gt;] -h &lt;ip-address&gt; &lt;local-path&gt;
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdpwd"><h2>2.22 Show Current Working Directory (pwd)</h2></a>
+ <a name="cmdpwd"><h2>2.23 Show Current Working Directory (pwd)</h2></a>
</td>
</tr>
</table>
@@ -1346,7 +1375,7 @@ nsh&gt;
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdrm"><h2>2.23 Remove a File (rm)</h2></a>
+ <a name="cmdrm"><h2>2.24 Remove a File (rm)</h2></a>
</td>
</tr>
</table>
@@ -1380,7 +1409,7 @@ nsh>
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdrmdir"><h2>2.24 Remove a Directory (rmdir)</h2></a>
+ <a name="cmdrmdir"><h2>2.25 Remove a Directory (rmdir)</h2></a>
</td>
</tr>
</table>
@@ -1415,7 +1444,7 @@ nsh>
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdset"><h2>2.25 Set an Environment Variable (set)</h2></a>
+ <a name="cmdset"><h2>2.26 Set an Environment Variable (set)</h2></a>
</td>
</tr>
</table>
@@ -1441,7 +1470,7 @@ nsh&gt;
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdsh"><h2>2.26 Execute an NSH Script (sh)</h2></a>
+ <a name="cmdsh"><h2>2.27 Execute an NSH Script (sh)</h2></a>
</td>
</tr>
</table>
@@ -1459,7 +1488,7 @@ sh &lt;script-path&gt;
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdsleep"><h2>2.27 Wait for Seconds (sleep)</h2></a>
+ <a name="cmdsleep"><h2>2.28 Wait for Seconds (sleep)</h2></a>
</td>
</tr>
</table>
@@ -1476,7 +1505,7 @@ sleep &lt;sec&gt;
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdunmount"><h2>2.28 Unmount a File System (umount)</h2></a>
+ <a name="cmdunmount"><h2>2.29 Unmount a File System (umount)</h2></a>
</td>
</tr>
</table>
@@ -1506,7 +1535,7 @@ nsh>
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdunset"><h2>2.29 Unset an Environment Variable (unset)</h2></a>
+ <a name="cmdunset"><h2>2.30 Unset an Environment Variable (unset)</h2></a>
</td>
</tr>
</table>
@@ -1532,7 +1561,7 @@ nsh&gt;
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdusleep"><h2>2.30 Wait for Microseconds (usleep)</h2></a>
+ <a name="cmdusleep"><h2>2.31 Wait for Microseconds (usleep)</h2></a>
</td>
</tr>
</table>
@@ -1549,7 +1578,7 @@ usleep &lt;usec&gt;
<table width ="100%">
<tr bgcolor="#e4e4e4">
<td>
- <a name="cmdxd"><h2>2.31 Hexadecimal dump (xd)</h2></a>
+ <a name="cmdxd"><h2>2.32 Hexadecimal dump (xd)</h2></a>
</td>
</tr>
</table>
@@ -1633,6 +1662,11 @@ nsh>
<td><code>CONFIG_EXAMPLES_NSH_DISABLE_CP</code></td>
</tr>
<tr>
+ <td><b><code>dd</code></b></td>
+ <td><code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0</td>
+ <td><code>CONFIG_EXAMPLES_NSH_DISABLE_DD</code></td>
+ </tr>
+ <tr>
<td><b><code>echo</code></b></td>
<td><br></td>
<td><code>CONFIG_EXAMPLES_NSH_DISABLE_ECHO</code></td>
@@ -2076,6 +2110,7 @@ nsh>
<li><a href="#nshconfiguration">Configuration settings, NSH-specific</a></li>
<li><a href="#cmdcp"><code>cp</code></a></li>
<li><a href="#currentwd">Current working directory</a></li>
+ <li><a href="#cmddd"><code>dd</code></a></li>
<li><a href="#cmdecho"><code>echo</code></a></li>
<li><a href="#environvars">Environment Variables</a></li>
<li><a href="#startupscript"><code>/etc/init.d/rcS</code></a>