diff --git a/Documentation/NuttShell.html b/Documentation/NuttShell.html
index a4056e6d662..e1e2390aba7 100644
--- a/Documentation/NuttShell.html
+++ b/Documentation/NuttShell.html
@@ -8,7 +8,7 @@
NuttShell (NSH)
- Last Updated: October 24, 2017
+ Last Updated: January 4, 2018
|
@@ -443,61 +443,67 @@
|
- 2.60 Unmount a File System (umount)
+ 2.60 Set the Size of a File (truncate)
|
|
- 2.61 Print system information (uname)
+ 2.61 Unmount a File System (umount)
|
|
- 2.62 Unset an Environment Variable (unset)
+ 2.62 Print system information (uname)
|
|
- 2.63 URL Decode (urldecode)
+ 2.63 Unset an Environment Variable (unset)
|
|
- 2.64 URL Encode (urlencode)
+ 2.64 URL Decode (urldecode)
|
|
- 2.65 Add a New User (useradd)
+ 2.65 URL Encode (urlencode)
|
|
- 2.66 Delete a user (userdel)
+ 2.66 Add a New User (useradd)
|
|
- 2.67 Wait for Microseconds (usleep)
+ 2.67 Delete a user (userdel)
|
|
- 2.68 Get File Via HTTP (wget)
+ 2.68 Wait for Microseconds (usleep)
|
|
- 2.69 Hexadecimal Dump of Memory (xd)
+ 2.69 Get File Via HTTP (wget)
+ |
+
+
+
|
+
+ 2.70 Hexadecimal Dump of Memory (xd)
|
@@ -2977,7 +2983,35 @@ nsh>
+
+Command Syntax:
+
+truncate -s <length> <file-path>
+
+
+ Synopsis.
+ Shrink or extend the size of the regular file at <file-path> to the
+ specified<length>.
+
+
+ A <file-path> argument that does not exist is created. The <length>
+ option is NOT optional.
+
+
+ If a <file-path> is larger than the specified size, the extra data is
+ lost. If a <file-path> is shorter, it is extended and the extended part
+ reads as zero bytes.
+
+
+
+
@@ -3007,7 +3041,7 @@ nsh>
@@ -3074,7 +3108,7 @@ uname [-a | -imnoprsv]
@@ -3100,7 +3134,7 @@ nsh>
@@ -3117,7 +3151,7 @@ urldecode [-f] <string or filepath>
@@ -3134,7 +3168,7 @@ urlencode [-f] <string or filepath>
@@ -3151,7 +3185,7 @@ useradd <username> <password>
@@ -3168,7 +3202,7 @@ userdel <username>
@@ -3185,7 +3219,7 @@ usleep <usec>
@@ -3212,7 +3246,7 @@ wget [-o <local-path>] <url>
@@ -3639,6 +3673,11 @@ nsh>
|
CONFIG_NSH_DISABLE_TIME |
+
+ truncate |
+ !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 |
+ CONFIG_NSH_DISABLE_TRUNCATE |
+
umount |
!CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_READABLE3 |
@@ -5443,10 +5482,10 @@ xxd -i romfs_img >nsh_romfsimg.h
CONFIG_NSH_ARCHROMFS
CONFIG_NSH_ROMFSMOUNTPT
CONFIG_NSH_ROMFSSECTSIZE
+ CONFIG_NSH_STRERROR
|
- nfsmount
- nice
- NSH library (
nshlib)
- NSH library (
nshlib)
nsh_consolemain()
@@ -5565,6 +5604,7 @@ xxd -i romfs_img >nsh_romfsimg.h
telnetd
test
time
+ truncate
umount
uname
unset
diff --git a/libc/README.txt b/libc/README.txt
index b07e903a8c6..b80438c9b91 100644
--- a/libc/README.txt
+++ b/libc/README.txt
@@ -35,9 +35,9 @@ we have:
locale - locale.h
fixedmath - fixedmath.h
inttypes - inttypes.h
- machine - Various architecture-specifica implementations.
+ machine - Various architecture-specific implementations.
math - math.h
- modlib - Part of module and shared libary logic: nuttx/lib/modlib.h
+ modlib - Part of module and shared library logic: nuttx/lib/modlib.h
net - Various network-related header files: netinet/ether.h, arpa/inet.h
pthread - pthread.h
queue - queue.h
|