=item B<clear>
-clear
+clear
Clear screen.
Example:
- $ echo Hello world | cut -f 1 -d ' '
+ $ echo "Hello world" | cut -f 1 -d ' '
Hello
- $ echo Hello world | cut -f 2 -d ' '
+ $ echo "Hello world" | cut -f 2 -d ' '
world
-------------------------------
-h print sizes in human readable format (e.g., 1K 243M 2G )
-m print sizes in megabytes
- -k print sizes in kilobytes(default)
+ -k print sizes in kilobytes(default)
Example:
-s display only a total for each argument
-h print sizes in human readable format (e.g., 1K 243M 2G )
-m print sizes in megabytes
- -k print sizes in kilobytes(default)
+ -k print sizes in kilobytes(default)
Example:
Example:
- $ echo Erik is cool
+ $ echo "Erik is cool"
Erik is cool
- $ echo -e Erik
+ $ echo -e "Erik
is
- cool
+ cool"
Erik
is
cool
- $ echo Erik
+ $ echo "Erik
is
- cool
+ cool"
Erik
is
cool
=item B<false>
-false
+false
Return an exit code of FALSE (1).
Example:
$ fbset
- mode 1024x768-76
+ mode "1024x768-76"
# D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
geometry 1024 768 1024 768 16
timings 12714 128 32 16 4 128 4
=item B<free>
-free
+free
Displays the amount of free and used system memory
Mem: 257628 248724 8904 59644 93124
Swap: 128516 8404 120112
Total: 386144 257128 129016
-
-------------------------------
-a Perform automatic repairs
-v verbose
-s Outputs super-block information
- -m Activates MINIX-like mode not cleared warnings
+ -m Activates MINIX-like "mode not cleared" warnings
-f Force file system check.
-------------------------------
$ cat getopt.test
#!/bin/sh
GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \
- -n 'example.busybox' -- $@`
+ -n 'example.busybox' -- "$@"`
if [ $? != 0 ] ; then exit 1 ; fi
- eval set -- $GETOPT
+ eval set -- "$GETOPT"
while true ; do
case $1 in
- -a|--a-long) echo Option a ; shift ;;
- -b|--b-long) echo Option b, argument `$2' ; shift 2 ;;
+ -a|--a-long) echo "Option a" ; shift ;;
+ -b|--b-long) echo "Option b, argument `$2'" ; shift 2 ;;
-c|--c-long)
- case $2 in
- \) echo Option c, no argument; shift 2 ;;
- *) echo Option c, argument `$2' ; shift 2 ;;
+ case "$2" in
+ "") echo "Option c, no argument"; shift 2 ;;
+ *) echo "Option c, argument `$2'" ; shift 2 ;;
esac ;;
--) shift ; break ;;
- *) echo Internal error! ; exit 1 ;;
+ *) echo "Internal error!" ; exit 1 ;;
esac
done
=item B<halt>
-halt
+halt
Halt the system.
=item B<hostid>
-hostid
+hostid
Print out a unique 32-bit identifier for the machine.
=item B<init>
-init
+init
Init is the parent of all processes.
WARNING: This field has a non-traditional meaning for BusyBox init!
The id field is used by BusyBox init to specify the controlling tty for
the specified process to run on. The contents of this field are
- appended to /dev/ and used as-is. There is no need for this field to
+ appended to "/dev/" and used as-is. There is no need for this field to
be unique, although if it isn't you may have strange results. If this
field is left blank, the controlling tty is set to the console. Also
note that if BusyBox detects that a serial console is in use, then only
it. Unlike sysvinit, BusyBox init does not stop processes from
respawning out of control. The 'askfirst' actions acts just like
respawn, except that before running the specified process it
- displays the line Please press Enter to activate this console.
+ displays the line "Please press Enter to activate this console."
and then waits for the user to press enter before starting the
specified process.
# /bin/sh invocations on selected ttys
#
- # Start an askfirst shell on the console (whatever that may be)
+ # Start an "askfirst" shell on the console (whatever that may be)
::askfirst:-/bin/sh
- # Start an askfirst shell on /dev/tty2-4
+ # Start an "askfirst" shell on /dev/tty2-4
tty2::askfirst:-/bin/sh
tty3::askfirst:-/bin/sh
tty4::askfirst:-/bin/sh
Example:
$ killall apache
-
-------------------------------
Example:
- $ length Hello
+ $ length "Hello"
5
-------------------------------
$ ln -s BusyBox /tmp/ls
$ ls -l /tmp/ls
lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*
-
-------------------------------
Example:
$ loadacm < /etc/i18n/acmname
-
-------------------------------
Example:
$ loadfont < /etc/i18n/fontname
-
-------------------------------
Example:
$ loadkmap < /etc/i18n/lang-keymap
-
-------------------------------
Example:
- $ logger hello
-
+ $ logger "hello"
-------------------------------
=item B<logname>
-logname
+logname
Print the name of the current user.
$ logname
root
-
-------------------------------
=item B<logread>
-logread
+logread
Shows the messages from syslogd (using circular buffer).
-x list entries by lines instead of by columns
-X sort the listing by extension
-h print sizes in human readable format (e.g., 1K 243M 2G )
- -k print sizes in kilobytes(default)
+ -k print sizes in kilobytes(default)
-------------------------------
=item B<lsmod>
-lsmod
+lsmod
List the currently loaded kernel modules.
[creates ttyS2-ttyS63]
$ makedevs /dev/hda b 3 0 0 8 s
[creates hda,hda1-hda8]
-
-------------------------------
$ mkdir /tmp/foo/bar/baz
/tmp/foo/bar/baz: No such file or directory
$ mkdir -p /tmp/foo/bar/baz
-
-------------------------------
$ mknod /dev/fd0 b 2 0
$ mknod -m 644 /tmp/pipe p
-
-------------------------------
/tmp/temp.mWiLjM
$ ls -la /tmp/temp.mWiLjM
-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM
-
-------------------------------
Example:
$ dmesg | more
-
-------------------------------
Flags:
-a: Mount all filesystems in fstab.
- -f: Fake Add entry to mount table but don't mount it.
+ -f: "Fake" Add entry to mount table but don't mount it.
-n: Don't write a mount table entry.
-o option: One of many filesystem options, listed below.
-r: Mount the filesystem read-only.
-t fs-type: Specify the filesystem type.
-w: Mount for reading and writing (default).
-Options for use with the B<-o> flag:
+Options for use with the "B<-o>" flag:
async/sync: Writes are asynchronous / synchronous.
atime/noatime: Enable / disable updates to inode access times.
devpts on /dev/pts type devpts (rw)
$ mount /dev/fd0 /mnt -t msdos -o ro
$ mount /tmp/diskimage /opt -t ext2 -o loop
-
-------------------------------
Example:
$ mv /tmp/foo /bin/bar
-
-------------------------------
=item B<nc>
-nc [IP] [port]
+nc [IP] [port]
Netcat opens a pipe to IP:port
214 NOOP QUIT RSET HELP
quit
221 foobar closing connection
-
-------------------------------
Name: debian
Address: 127.0.0.1
-
-------------------------------
--- debian ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 20.1/20.1/20.1 ms
-
-------------------------------
=item B<poweroff>
-poweroff
+poweroff
Halt the system and request that the kernel shut off the power.
Example:
- $ printf Val=%d
- 5
+ $ printf "Val=%d
+ " 5
Val=5
-
-------------------------------
=item B<ps>
-ps
+ps
Report process status
=item B<pwd>
-pwd
+pwd
Print the full filename of the current working directory.
=item B<readlink>
-readlink
+readlink
Read a symbolic link.
=item B<reboot>
-reboot
+reboot
Reboot the system.
=item B<reset>
-reset
+reset
Resets the screen.
Example:
- $ echo foo | sed -e 's/f[a-zA-Z]o/bar/g'
+ $ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g'
bar
-------------------------------
Use lash just as you would use any other shell. It properly handles pipes,
redirects, job control, can be used as the shell for scripts, and has a
sufficient set of builtins to do what is needed. It does not (yet) support
-Bourne Shell syntax. If you need things like if-then-else, while, and such
+Bourne Shell syntax. If you need things like "if-then-else", "while", and such
use ash or bash. If you just need a very simple and extremely small shell,
this will do the job.
Example:
- $ echo -e e
+ $ echo -e "e
f
b
d
c
- a | sort
+ a" | sort
a
b
c
=item B<sync>
-sync
+sync
Write all buffered filesystem blocks to disk.
File selection:
- f name of tarfile or - for stdin
+ f name of tarfile or "-" for stdin
O extract to stdout
exclude file to exclude
X file with names to exclude
Example:
- $ echo Hello | tee /tmp/foo
+ $ echo "Hello" | tee /tmp/foo
$ cat /tmp/foo
Hello
tftp command SOURCE DEST
-Transfers a file from/to a tftp server using octet mode.
+Transfers a file from/to a tftp server using "octet" mode.
Commands:
get Get file from server SOURCE and store to local DEST.
put Put local file SOURCE to server DEST.
-When nameing a server, use the syntax server:file.
+When nameing a server, use the syntax "server:file".
-------------------------------
$ touch /tmp/foo
$ ls -l /tmp/foo
-rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo
-
-------------------------------
Example:
- $ echo gdkkn vnqkc | tr [a-y] [b-z]
+ $ echo "gdkkn vnqkc" | tr [a-y] [b-z]
hello world
-
-------------------------------
=item B<true>
-true
+true
Return an exit code of TRUE (0).
=item B<tty>
-tty
+tty
Print the file name of the terminal connected to standard input.
$ uname -a
Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown
-
-------------------------------
Example:
- $ echo -e a
+ $ echo -e "a
a
b
c
c
- a | sort | uniq
+ a" | sort | uniq
a
b
c
=item B<uptime>
-uptime
+uptime
Display the time since the last boot.
$ uptime
1:55pm up 2:30, load average: 0.09, 0.04, 0.00
-
-------------------------------
=item B<usleep>
-usleep N
+usleep N
Pause for N microseconds.
Options:
- -o FILE direct output to FILE
+ -o FILE direct output to FILE
Example:
$ uudecode -o busybox busybox.uu
$ ls -l busybox
-rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox
-
-------------------------------
Options:
- -R Read-only- do not write to the file.
+ -R Read-only- do not write to the file.
-------------------------------
$ wc /etc/passwd
31 46 1365 /etc/passwd
-
-------------------------------
=item B<whoami>
-whoami
+whoami
Prints the user name associated with the current effective user id.
$ ls | xargs gzip
$ find . -name '*.c' -print | xargs rm
-
-------------------------------
=cut
-# $Id: busybox.pod,v 1.98 2001/04/09 23:27:51 kraai Exp $
+# $Id: busybox.pod,v 1.99 2001/04/10 00:00:05 kraai Exp $