mirror of
https://github.com/sheumann/hush.git
synced 2024-09-12 15:54:56 +00:00
1057 lines
17 KiB
Plaintext
1057 lines
17 KiB
Plaintext
The following document includes a continuous description of the current
|
|
commands, functions and utilities included in the busybox.
|
|
|
|
John Cooper
|
|
johnc@lineo.com
|
|
|
|
_______________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
BusyBox 0.38, Functions and the Arguments they Support
|
|
|
|
|
|
|
|
|
|
______________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
cat [file]
|
|
Display file contents to standard output.
|
|
|
|
|
|
|
|
|
|
_______________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
chmod [-R] Mode,[Mode] file
|
|
|
|
Change file access permissions (mode) of one or more files.
|
|
|
|
-R Follows the directory tree from the current location thru all sub-directories,
|
|
|
|
applying changes.
|
|
|
|
Mode = u User
|
|
|
|
g Group
|
|
|
|
o Other
|
|
|
|
a All
|
|
|
|
Permission = r Read
|
|
|
|
w Write
|
|
|
|
s Set user (or group) ID
|
|
|
|
t Sticky bit file cannot be removed by other
|
|
|
|
than the owner.
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
chown [option] owner[group]file
|
|
|
|
Change owner and (or) group of file to owner and (or) group.
|
|
|
|
Only the current owner or a priveleged user may change an owner.
|
|
|
|
-R Follows the directory tree from the current location thru all sub-directories, applying
|
|
|
|
changes.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chgrp [option] newgroup file
|
|
|
|
Change group of file or files to new group name or ID number located in /etc/group.
|
|
|
|
Only the current owner or a priveleged user may change the group name or ID
|
|
|
|
-R Follows the directory tree from the current location thru all sub-directories,
|
|
|
|
applying changes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
chroot NEWROOT [Command...] (System Admin Command)
|
|
|
|
Run command with root directory set to NEWROOT. Only the current owner or a priveleged
|
|
|
|
user may use this command.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
clear
|
|
|
|
Clear screen.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
cp [option] fileA fileB
|
|
|
|
Copy fileA to fileB or fileA to directory maintaining fileA name.
|
|
|
|
-a archive Maintain file attributes whenever possible. Same as -dpR
|
|
|
|
-d no dereference Maintain hard link relationships between fileA and fileB.
|
|
|
|
No dereference of symbolic links.
|
|
|
|
-p maintain file Maintain all file attributes and information including owner
|
|
|
|
attributes group permissions and time information.
|
|
|
|
-R recursive Copy to the current location and all subdirectories in the tree.
|
|
|
|
|
|
|
|
|
|
|
|
_________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
date [option [+format] [date]
|
|
|
|
date [option] [MMDDhhmm[[CC]YY][.SS]]
|
|
|
|
Display the current system date and time.
|
|
|
|
-R RFC-822 string Output an RFC-822 compliant date string.
|
|
|
|
-s set DATE Set date where date is entered in MMDDhhmm etc. format.
|
|
|
|
-u universal Print or set Coordinated Universal Time.
|
|
|
|
|
|
|
|
|
|
|
|
_______________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dd [if=name] [of=name] [bs=n] [count=n]
|
|
|
|
|
|
Copy a file, converting and formatting according to options. Most useful when copying from
|
|
|
|
physical input and output devices.
|
|
|
|
if=fileA (instead of standard input)
|
|
|
|
of=fileB (instead of standard output)
|
|
|
|
bs=n Read and write N Bytes at a time.
|
|
|
|
count=n Copy only n input blocks.
|
|
|
|
Bytes may be suffixed by k for x1024, b for x512 and w for x2.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
df
|
|
|
|
|
|
Display filesystem, number of blocks used, number of blocks available, number of blocks in use,
|
|
|
|
and mount point.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dmesg [-c] [-n level] [-s bufsize] (System Admin Command)
|
|
|
|
|
|
Display system control messages. Stored in the kernel ring buffer are all messages since the
|
|
|
|
last system boot, or the most recent if the buffer had been full.
|
|
|
|
|
|
-c Clear buffer after printing messages.
|
|
|
|
-n level Set the level of system message to be displayed on the console.
|
|
|
|
-s bufsize Display the size of the kernel ring buffer.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
|
|
find [PATH] [EXPRESSION]
|
|
|
|
Search for files in the current directory, and all subdirectories for patterns that match
|
|
|
|
expression. Expressions may consist of the following.
|
|
|
|
-follow Dereference symbolic links.
|
|
|
|
-name PATTERN Find files that match PATTERN. Metacharacters should be escaped or
|
|
|
|
quoted.
|
|
|
|
-print Print full file name, followed by a newline, to standard out.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
chvt N
|
|
|
|
Change foreground virtual terminal to /dev/ttyN.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
deallocvt N
|
|
|
|
Deallocate unused virtual terminal /dev/ttyN.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
fsck.minix [-larvsmf] /dev/name
|
|
|
|
Perform a consistency check for minix filesystems.
|
|
|
|
-l List filenames.
|
|
|
|
-r Perform interactive repairs.
|
|
|
|
-q Perform automatic repairs
|
|
|
|
-v Verbose
|
|
|
|
-s Output superblock information
|
|
|
|
-m Activates minix-like "mode not cleared" warnings.
|
|
|
|
-f Force file system check.
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
mkfs.minix [-c | -l filename ] [-nXX] [-iXX] /dev/name [blocks]
|
|
|
|
Make a minix file system.
|
|
|
|
-c Check device for bad blocks.
|
|
|
|
-n [ 14|30 ] Specify max length of filenames.
|
|
|
|
-i Specify number of inodes for filesystem.
|
|
|
|
-l filename
|
|
|
|
Read the bad blocks list from filename.
|
|
|
|
-v Make a minix version 2 filesystem.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
grep [OPTIONS] PATTERN [FILE]
|
|
|
|
Search for PATTERN in each FILE or from standard input.
|
|
|
|
-h Suppress prefixing filename on output.
|
|
|
|
-i Ignore case distinctions.
|
|
|
|
-n Print line number with output lines.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
init
|
|
|
|
The parent of all processes. Only to be run by the kernel.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
kill [ -s sigspec | -signum | -sigspec ] [pid | job ] or
|
|
|
|
kill -l [ exitstatus ]
|
|
|
|
Currently no information help page for this command
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
ln [option] TARGET... LINK_NAME|DIRECTORY
|
|
|
|
Create a link named LINK_NAME or DIRECTORY to TARGET.
|
|
|
|
-s Make symbolic links instead of hard links.
|
|
|
|
-f Remove existing destination files.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
ls [ -1acdelnpuxACF ] [FILENAMES]
|
|
|
|
List contents of directories.
|
|
|
|
-1 Single entry per column of output.
|
|
|
|
-a All files including hidden files beginning with a ..
|
|
|
|
-c Files are listed by status change time.
|
|
|
|
-d List directories, not there contents.
|
|
|
|
-e (no information on this option)
|
|
|
|
-l List in long format including permissions, owner, size
|
|
|
|
modification time etc.
|
|
|
|
-n Similar to -l, except use group ID and user ID instead
|
|
|
|
of owner and group names.
|
|
|
|
-p Directories are marked with a /.
|
|
|
|
-u Display files sorted by file access time.
|
|
|
|
-x Display files across the screen in rows.
|
|
|
|
-A Display hidden and all other files except . and ...
|
|
|
|
-C (Default, display files in columns)
|
|
|
|
-F Tag files by type by appending:
|
|
|
|
/ to directories
|
|
|
|
* to executables
|
|
|
|
@ to symbolic links
|
|
|
|
| to fifo's
|
|
|
|
= to sockets
|
|
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
mkdir [OPTION] directory
|
|
|
|
Create directories if they do not already exist. You must have write permission to create
|
|
|
|
directories. Default mode can be modified by users umask.
|
|
|
|
-m Used to set permission mode. (See chmod description)
|
|
|
|
-p Make parent directories if they don't already exist. Return error code if
|
|
|
|
they already exist.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
mknod (Segmentation Fault when executing this command)
|
|
|
|
(No embedix information available for this command.)
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mkswap [-c] [ -v0|-v1 ] device [block-count]
|
|
|
|
Prepare a disk partition to be used as a swap partition.
|
|
|
|
-c Check for read-ability.
|
|
|
|
-v0 Make version 0 swap [max 128 megs]
|
|
|
|
-v1 Make version 1 swap [big |] default for
|
|
|
|
kernels > 2.1.117.
|
|
|
|
block-count
|
|
|
|
Number of blocks to use. (Default is the entire
|
|
|
|
partition).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
more [file]
|
|
|
|
Display file one screen page at a time.
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
mount [flags]
|
|
|
|
mount [flags] device directory [-o options, more options ]
|
|
|
|
Mount a filesystem for file access.
|
|
|
|
-a Mount all file systems in fstab.
|
|
|
|
-o option
|
|
|
|
async/sync: Writes are asynchronous/synchronous.
|
|
|
|
dev/nodev: Allow use of special device files
|
|
|
|
/disallow them.
|
|
|
|
exec/noexec: Allow use of executable files
|
|
|
|
/disallow them.
|
|
|
|
suid/nosuid: Allow set-user-id-root programs
|
|
|
|
/disallow them.
|
|
|
|
remount: Remount a currently-mounted filesystem
|
|
|
|
changing it's flags.
|
|
|
|
ro/rw: Mount for read-only/read-write.
|
|
|
|
(There are more flags specific to each filesystem.
|
|
|
|
See the written documentation for those.)
|
|
|
|
-r Mount the filesystem read only.
|
|
|
|
-t FILESYSTEM TYPE
|
|
|
|
Specify the filesystem type.
|
|
|
|
-w Mount for reading and writing default
|
|
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mv fileA fileB or
|
|
|
|
mv fileA dirA
|
|
|
|
Move fileA to fileB. (Renames fileA to fileB)
|
|
|
|
Move fileA to dirA (Moves fileA into dirA)
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
ps
|
|
|
|
Report process status. No options are currently supported.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
pwd
|
|
|
|
Print working directory
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
reboot
|
|
|
|
Reboot system. No options are currently supported.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
rm [option] file
|
|
|
|
Remove or unlink the files.
|
|
|
|
-f Remove existing destinations. Never prompt.
|
|
|
|
-r or -R Remove contents of directories recursively.
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
rmdir [OPTION] ... directory
|
|
|
|
Remove directories if they are empty.
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
sed
|
|
|
|
Sed scripts are subject to the following format: 's/regexp/replacement/[gp]' which attempts to
|
|
|
|
to match regexp against the pattern space and if successful, replaces the matched portion with
|
|
|
|
replacement -r or -R Remove contents of directories recursively.
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
rmdir [OPTION] ... directory
|
|
|
|
Remove directories if they are empty.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
rmdir [OPTION] ... directory
|
|
|
|
Remove directories if they are empty.
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
sed
|
|
|
|
Sed scripts are subject to the following format: 's/regexp/replacement/[gp]' which attempts to
|
|
|
|
match regexp against the pattern space and if successful, replaces the matched portion with
|
|
|
|
replacement. This version of sed matches
|
|
|
|
full regular expressions.
|
|
|
|
-e Add the script to the commands to be executed.
|
|
|
|
-n Suppress automatic printing of pattern space..
|
|
|
|
-e Add the script to the commands to be executed.
|
|
|
|
-n Suppress automatic printing of pattern space..
|
|
|
|
-e Add the script to the commands to be executed.
|
|
|
|
-n Suppress automatic printing of pattern space.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
sleep N
|
|
|
|
Pause for N seconds.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
tar -[cxtvOf] [tarFileName] [file]
|
|
|
|
Create, extract or list files from a tar file.
|
|
|
|
c=create
|
|
|
|
x=extract
|
|
|
|
t=list contents
|
|
|
|
v=verbose
|
|
|
|
O=extract to stdout
|
|
|
|
f=tarfile or "-" for standard input
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
swapon device
|
|
|
|
Start swapping virtual memory pages on the given device.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
swapoff device
|
|
|
|
Stop swapping virtual memory pages on the given device.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
sync
|
|
|
|
Write all buffered filesystem blocks to disk.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
touch [-c] file [file...]
|
|
|
|
Update the last modified date on given file(s).
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
true
|
|
|
|
A null command that returns a successful 0 exit status code. (See false)
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
false
|
|
|
|
A null command that returns an unsuccessful or non-zero exit status.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
uname [option]
|
|
|
|
Print certain system information. With no option, same as -s.
|
|
|
|
-a Display all information
|
|
|
|
-m Display machine hardware type.
|
|
|
|
-n Display machine network node hostname.
|
|
|
|
-r Display OS release
|
|
|
|
-s Display OS Name.
|
|
|
|
-p Display Host processor type.
|
|
|
|
-v Display OS Version.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
umount [flags] filesystem | directory
|
|
|
|
Unmounts designated filesystem previously mounted on device.
|
|
|
|
-a Unmount all file systems.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
update
|
|
|
|
cvs update [options] files
|
|
|
|
Incorporates recent changes from the repository into files in your working directory. No
|
|
|
|
options are currently supported.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
zcat [options] files
|
|
|
|
Uncompress file from gzip, gunzip or compress command or standard input if file is '-'.
|
|
|
|
-c Write output to standard output.
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
gunzip (Same as zcat)
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gzip (Same as zcat)
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loadfont
|
|
|
|
No information available with --help.
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
loadkmap
|
|
|
|
No information available with --help
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
linuxrc
|
|
|
|
No information available with --help
|
|
|
|
|
|
|
|
|
|
|
|
________________________________________________________________________________________________________
|
|
|