JNode Commands

This page contains the available documentation for most of the useful JNode commands. For commands not listed below, try running help <alias> at the JNode command prompt to get the command's syntax description and built-in help. Running alias will list all available command aliases.

If you come across a command that is not documented, please raise an issue. (Better still, if you have website content authoring access, please add a page yourself using one of the existing command pages as a template.)

acpi

acpi

Synopsis
acpi displays ACPI details
acpi --dump | -d lists all devices that can be discovered and controlled through ACPI
acpi --battery | -b displays information about installed batteries
Details
The acpi command currently just displays some information that can be gleaned from the host's "Advanced Configuration & Power Interface" (ACPI). In the future we would like to interact with ACPI to do useful things. However, this appears to be a complex topic, rife with compatibility issues, so don't expect anything soon.

The ACPI specifications can be found on the net, also have a look at wikipedia.

Bugs
This command does nothing useful at the moment; it is a work in progress.

alias

alias

Synopsis
alias prints all available aliases and corresponding classnames
alias <alias> <classname> creates an alias for a given classname
alias -r <alias> removes an existing alias
Details
The alias command creates a binding between a name (the alias) and the fully qualified Java name of the class that implements the command. When an alias is created, no attempt is made to check that the supplied Java class name denotes a suitable Java class. If the alias name is already in use, alias will update the binding.

If the classname argument is actually an existing alias name, the alias command will create a new alias that is bound to the same Java classname as the existing alias.

A command class (e.g. one whose name is given by an aliased classname) needs to implement an entry point method with one of the following signatures:

public void execute(CommandLine cmd, InputStream in, PrintStream out, PrintStream err);
This is the JNode preferred entry point. It allows stream redirection in any invoker / interpreter that supports this. In addition, the CommandLine object provides the alias and arguments in both String and Token form.
public static void main(String[] args);
This is the classic Java entry point signature. It does not allow the command class to find out the alias name that was used to invoke it. In JNode, this makes stream redirection problematic unless the command is executed in an isolate or a proclet.

If a command class has both execute and main methods, most invokers will use the former in preference to the latter. Ideally, a command class should extend org.jnode.shell.AbstractCommand.

arp

arp

Synopsis
arp prints the ARP cache
arp -d clears the ARP cache
Details
ARP (the Address Resolution Protocol) is a low level protocol for discovering the MAC address of a network interface on the local network. MAC address are the low-level network addresses for routing IP (and other) network packets on a physical network.

When a host needs to comminutate with an unknown local IP address, it broadcasts an ARP request on the local network, asking for the MAC address for the IP address. The node with the IP address broadcasts a response giving the MAC address for the network interface corresponding to the IP address.

The ARP cache stores IP to MAC address mappings that have previously been discovered. This allows the network stack to send IP packets without repeatedly broadcasting for MAC addresses.

The arp command allows you to examine the contents of the ARP cache, and if necessary clear it to get rid of stale entries.

basename

basename

Synopsis
basename String [Suffix]
 
Details
Strip directory and suffix from filenames
 
Compatibility
JNode basename is posix compatible.
 
Links

beep

beep

Synopsis
beep makes a beep noise
Details
Useful for alerting the user, or annoying other people in the room.

bindkeys

bindkeys

Synopsis
bindkeys print the current key bindings
bindkeys --reset reset the key bindings to the JNode defaults
bindkeys --add <action> (<vkSpec> | <character>) add a key binding
bindkeys --remove <action> [<vkSpec> | <character>] remove a key binding
Details
The bindkeys command prints or changes the JNode console's key bindings; i.e. the mapping from key events to input editing actions. The bindkeys form of the command prints the current bindings to standard output, and the bindkeys --reset form resets the bindings to the hard-wired JNode default settings.

The bindkeys --add ... form of the command adds a new binding. The <action> argument specifies an input editing action; e.g. 'KR_ENTER' causes the input editor to append a newline to the input buffer and 'commit' the input line for reading by the shell or application. The <vkSpec> or <character> argument specifies an input event that is mapped to the <action>.

The recognized <action> values are listed in the output the no-argument form of the bindkeys command.

The <vkSpec> values are formed from the "VK_xxx" constants defined by the "java.awt.event.KeyEvent" class and "modifier" names; e.g. "Shift+VK_ENTER".

The <character> values are either single ASCII printable characters or standard ASCII control character names; e.g. "NUL", "CR" and so on.

The bindkeys --add ... form of the command removes a single binding or (if you leave out the optional <vkSpec> or <character> argument) all bindings for the supplied <action>.

Bugs
Changing the key bindings in one JNode console affects all consoles.

The bindkeys command provides no online documentation for what the action codes mean / do.

bootp

bootp

Synopsis
bootp <device> configures a network interface using BOOTP
Details
The bootp command configures the network interface given by <device> using settings obtained using BOOTP. BOOTP is a network protocol that allows a host to obtain its IP address and netmask, and the IP of the local gateway from a service on the local network.

bsh

bsh

Synopsis
bsh [ --interactive | -i ] [ --file | -f <file> ] [ --code | -c <code> ] Run the BeanShell interpreter
Details
The bsh command runs the BeanShell interpreter. The options are as follows:

  • --interactive | -i start an interactive BeanShell.
  • --file | -f <file> take BeanShell input from <file>. If --interactive is also given, the BeanShell will go into interactive mode after processing the file.
  • --code | -c <code> execute <code> as a BeanShell code. If --interactive is also given, the BeanShell will go into interactive mode after processing the code.

If no arguments are given, --interactive is assumed.

bzip2

bzip2

Synopsis
bzip2 [Options] [File ...]
bunzip2 [Options] [File ...]
bzcat [File ...]
 
Details
The bzip2 program handles compression and decompression of files in the bzip2 format.
 
Compatibility
JNode bzip2 aims to be fully compatible with BZip2.
 
Links

cat

cat

Synopsis
cat copies standard input to standard output
cat <filename> ... copies files to standard output
cat --urls | -u <url> ... copies objects identified by URL to standard output
Details
The cat command copies data to standard output, depending on the command line arguments:

  • If there are no arguments, cat copies from standard input to standard output until it encounters "end of file" on the input stream. If standard input is coming from the console, CTRL-D is used to denote end of file.
  • If the arguments consist of file names, the corresponding file's contents are copied to standard output in the order specified.
  • If the first argument is --urls or -u, the arguments are URLs. The cat opens each URL in turn and copies the resulting data streams to standard output. Supported URL protocols include "file:", "http:" and "ftp:".

The name "cat" is borrowed from UNIX, and is short for "concatenate".

Bugs
There is no dog command.

cd

cd

Synopsis
cd [ <dirName> ] change the current directory
Details
The cd command changes the "current" directory for the current isolate, and everything running within it. If a <dirName> argument is provided, that will be the new "current" directory. Otherwise, the current directory is set to the user's "home" directory as given by the "user.home" property.

JNode currently changes the "current" directory by setting the "user.dir" property in the system properties object.

Bugs
The global (to the isolate) nature of the "current" directory is a problem. For example, if you have two non-isolated consoles, changing the current directory in one will change the current directory for the other,

class

class

Synopsis
class <className> print details of a class
Details
The class command allows you to print some details of any class on the shell's current classpath. The <className> argument should be a fully qualified Java class name. Running class will cause the named class to be loaded if this hasn't already happened.

classpath

classpath

Synopsis
classpath prints the current classpath
classpath <url> adds the supplied url to the end of the classpath
classpath --clear clears the classpath
classpath --refresh cause classes loaded from the classpath to be reloaded on next use
Details
The classpath command controls the path that the command shell uses to locate commands to be loaded. By default, the shell loads classes from the currently loaded plug-ins. If the shell's classpath is non-empty, the urls on the path are searched ahead of the plug-ins. Each shell instance has its own classpath.

If the <url> argument ends with a '/', it will be interpreted as a base directory that may contain classes and resources. Otherwise, the argument is interpreted as the path for a JAR file. While "file:" URLs are the norm, protocols like "ftp:" and "http:" should also work.

clear

clear

Synopsis
clear clear the console screen
Details
The clear command clears the screen for the current command shell's console.

compile

compile

Synopsis
compile [ --test ] [ --level <level> ] <className> compile a class to native code
Details
The compile command uses the native code compiler to compile or recompile a class on the shell's class path. The <className> argument should be the fully qualified name for the class to be compiled

The --level option allows you to select the optimization level. The --test option allows you to compile with the "test" compilers.

This command is primarily used for native code compiler development. JNode will automatically run the native code compiler on any class that is about to be executed for the first time.

console

console

Synopsis
console --list | -l list all registered consoles
console --new | -n [--isolated | --i] starts a new console running the CommandShell
console --test | -t starts a raw text console (no shell)
Details
The console command lists the current consoles, or creates a new one.

The first form of the console command list all consoles registered with the console manager. The listing includes the console name and the "F<n>" code for selecting it. (Use ALT F<n> to switch consoles.)

The second form of the console command starts and registers a new console running a new instance of CommandShell. If the --isolate option is used with --new, the new console's shell will run in a new Isolate.

The last form of the console command starts a raw text console without a shell. This is just for testing purposes.

cpuid

cpuid

Synopsis
cpuid print the computer's CPU id and metrics
Details
The cpuid command prints the computer's CPU id and metrics to standard output.

date

date

Synopsis
date print the current date
Details
The date command prints the current date and time to standard output. The date / time printed are relative to the machine's local time zone.

Bugs
A fixed format is used to output date and times.

Printing date / time values as UTC is not supported.

This command will not help your love life.

del

del

Synopsis
del [ -r | --recursive ] <path> ... delete files and directories
Details
The del command deletes the files and/or directories given by the <path> arguments.

Normally, the del command will only delete a directory if it is empty apart from the '.' and '..' entries. The -r option tells the del command to delete directories and their contents recursively.

device

device

Synopsis
device shows all devices
device <device> shows a specific device
device ( start | stop | restart | remove ) <device> perform an action on a device
Details
The device command shows information about JNode devices and performs generic management actions on them.

The first form of the device command list all devices registered with the device manager, showing their device ids, driver class names and statuses.

The second form of the device command takes a device id given as the <device> argument. It shows the above information for the corresponding device, and also lists all device APIs implemented by the device. Finally, if the device implements the "DeviceInfo" API, it is used to get further device-specific information.

The last form of the device command performs actions on the device denoted by the device id given as the <device> argument. The actions are as follows:

  • start - starts the device.
  • stop - stops the device.
  • restart - equivalent to stop followed by start.
  • remove - performs a stop and then removes the device from the device manager.
Bugs
This command does not allow you to perform device-specific actions.

df

df

Synopsis
df [ <device> ] display disk space usage info
Details
The df command prints disk space usage information for file systems. If a <device>, usage information is displayed for the file system on the device. Otherwise, information is displayed for all registered file systems.

dhcp

dhcp

Synopsis
dhcp <device> configures a network interface using DHCP
Details
The dhcp command configures the network interface given by <device> using settings obtained using DHCP. DHCP is the most commonly used network configuration protocol. The protocol provides an IP address and netmask for the machine, and the IP addresses of the local gateway and the local DNS service.

DHCP allocates IP address dynamically. A DHCP server will often allocate the same IP address to a given machine, but this is not guaranteed. If you require a fixed IP address for your JNode machine, you should use bootp or ifconfig. (And, if you have a DHCP service on your network, you need to configure it to not reallocate your machine's staticly assigned IP address.)

dir

dir

Synopsis
dir [ <path> ] list a file or directory
Details
The dir command lists the file or directory given by the <path> argument. If no argument is provided, the current directory is listed.

dirname

dirname

Synopsis
dirname String
 
Details
Strip non-directory suffix from file names
 
Compatibility
JNode dirname is posix compatible.
 
Links

disasm

disasm

Synopsis
disasm [ --test ] [ --level <level> ] <className> [ <methodName> ] disassemble a class or method
Details
The disasm command disassembles a class or method for a class on the shell's class path The <className> argument should be the fully qualified name for the class to be compiled. The <methodName> should be a method declared by the class. If the method is overloaded, all of the overloads will be disassembled.

The --level option allows you to select the optimization level. The --test option allows you to compile with the "test" compilers.

This command is primarily used for native code compiler development. Note, contrary to its name and description above, the command doesn't actually disassemble the class method(s). Instead it runs the native compiler in a mode that outputs assembly language rather than machine code.

echo

echo

Synopsis
echo [ <text> ... ] print the argument text
Details
The echo command prints the text arguments to standard output. A single space is output between the arguments, and text is completed with a newline.

edit

edit

Synopsis
edit <filename> edit a file
Details
The edit command edits a text file given by the <filename> argument. This editor is based on the "charva" text forms system.

The edit command displays a screen with two parts. The top part is the menu section; press ENTER to display the file action menu. The bottom part is the text editing window. The TAB key selects menu entries, and also moves the cursor between the two screen parts.

Bugs
This command needs more comprehensive user documentation.

eject

eject

Synopsis
eject [ <device> ... ] eject a removable medium
Details
The eject command ejects a removable medium (e.g. CD or floppy disk) from a device.

env

env

Synopsis
env [ -e | --env ] print the system properties or environment variables
Details
By default, the env command prints the system properties to standard output. The properties are printed one per line in ascending order based on the property names. Each line consists of a property name, the '=' character, and the property's value.

If the -e or --env option is given, the env command prints out the current shell environment variables. At the moment, this only works with the bjorne CommandInterpreter and the proclet CommandInvoker.

exit

exit

Synopsis
exit cause the current shell to exit
Details
The exit command causes the current shell to exit. If the current shell is the JNode main console shell, JNode will shut down.
Bugs
This should be handled as a shell interpreter built-in, and it should only kill the shell if the user runs it directly from the shell's command prompt.

gc

gc

Synopsis
gc run the garbage collector
Details
The gc command manually runs the garbage collector.

In theory, it should not be necessary to use this command. The garbage collector should run automatically at the most appropriate time. (A modern garbage collector will run most efficiently when it has lots of garbage to collect, and the JVM is in a good position to know when this is likely to be.)

In practice, it is necessary to run this command:

  • to cope with GC-related issues; e.g. before running startawt,
  • when debugging the garbage collector, and
  • when doing performance-related benchmarking.

grep

grep

Synopsis
grep [Options] Pattern [File ...]
grep [Options] [ -e Pattern | -f File ...] [File ...]
 
Details
grep searches the input Files (or standard input if not files are give, or if - is given as a file name) for lines containing a match to the Pattern. By default grep prints the matching lines.
 
Compatibility
JNode grep implements most of the POSIX grep standard
JNode grep implements most of the GNU grep extensions
 
Links
 
Bugs
  • grep -E and grep -B do not really work, instead they default to grep -P.
  • grep -o/--only-matching does not work

gzip

gzip

Synopsis
gzip [Options] [-S suffix] [File ...]
gunzip [Options] [-S suffix] [File ...]
zcat [-f] [File ...]
 
Details
The gzip program handles the compress and decompression of files in the gzip format.
 
Compatibility
JNode gzip aims to be fully compatible with gnu zip.
 
Links

halt

reboot

Synopsis
halt shutdown and halt JNode
Details
The halt command shuts down JNode services and devices, and puts the machine into a state in which it is safe to turn off the power.

help

help

Synopsis
help [ <name> ] print command help
Details
The help command prints help for the command corresponding to the <name> argument. This should be either an alias known to the current shell, or a fully qualified name of a Java command class. If the <name> argument is omitted, this command prints help information for itself.

Currently, help prints command usage information and descriptions that it derives from a command's old or new-style argument and syntax descriptors. This means that (unlike Unix "man" for example), the usage information will always be up-to-date.

No help information is printed for Java applications which have no JNode syntax descriptors.

hexdump

hexdump

Synopsis
hexdump <path> print a hex dump of a file
hexdump -u | --url <url> print a hex dump of a URL
hexdump print a hex dump of standard input
Details
The hexdump command prints a hexadecimal dump of a file, a URL or standard input.

history

history

Synopsis
history print the history list
history [-t | --test] <index> | <prefix> find and execute a command from the history list
Details
The history command takes two form. The first form (with no arguments) simply prints the current command history list. The list is formatted with one entry per line, with each line starting with the history index.

The second form of the history command finds and executes a command from the history list and executes it. If an <index> "i" is supplied, the "ith" entry is selected, with "0" meaning the oldest entry, "1" the second oldest and so on. If a <prefix> is supplied, the first command found that starts with the prefix is executed. The --test (or -t) flag tells the history command to print the selected command instead of executing it.

Bugs
The history command currently does not execute the selected command. This is maybe a good thing.

When the shell executes a command, the history list gets reordered in a rather non-intuitive way.

ifconfig

ifconfig

Synopsis
ifconfig List IP address assignments for all network devices
ifconfig <device> List IP address assignments for one network device
ifconfig <device> <ipAddress> [ <subnetMask> ] Assign an IP address to a network device
Details
The ifconfig command is used for assigning IP addresses to network devices, and printing network address bindings.

The first form prints the MAC address, assigned IP address(es) and MTU for all network devices. You should see the "loopback" device in addition to devices corresponding to each of your machine's ethernet cards.

The second form prints the assigned IP address(es) for the given <device>.

The final form assigns the supplied IP address and associated subnet mask to the given <device>.

Bugs
Only IPv4 addresses are currently supported.

When you attempt to bind an address, the output shows the address as "null", irrespective of the actual outcome. Run "ifconfig <device>" to check that it succeeded

java

java

Synopsis
java <className> [ <arg> ... ] run a Java class via its 'main' method
Details
The java command runs the supplied class by calling its 'public static void main(String[])' entry point. The <className> should be the fully qualified name of a Java class. The java command will look for the class to be run on the current shell's classpath. If that fails, it will look in the current directory. The <arg> list (if any) is passed to the 'main' method as a String array.

kdb

kdb

Synopsis
kdb show the current kdb state
kdb --on turn on kdb
kdb --off turn off kdb
Details
The kdb command allows you to control "kernel debugging" from the command line. At the moment, the kernel debugging functionality is limited to copying the output produced by the light-weight "org.jnode.vm.Unsafe.debug(...)" calls to the serial port. If you are running under VMWare, you can configure it to capture this in a file in the host OS.

The kdb command turns this on and off. Kernel debugging is normally off when JNode boots, but you can alter this with a bootstrap switch.

leed, levi

leed & levi

Synopsis
leed <filename> edit a file
levi <filename> view a file
Details
The leed and levi command respectively edit and view the text file given by the <filename> argument. These commands open the editor in a new text console, and provide simple intuitive screen-based editing and viewing.

The leed command understands the following control functions:

  • CTRL-S saves the file.
  • CTRL-Q quits the editor.

The levi command understands the following control function:

  • q quits the viewer.
Bugs
These commands need more comprehensive user documentation.

loadkeys

loadkeys

Synopsis
loadkeys print the current keyboard interpreter
loadkeys <country> [ <language> [<variant> ] ] change the keyboard interpreter
Details
The loadkeys command allows you to change the current keyboard interpreter. A JNode keyboard interpreter maps device specific codes coming from the physical keyboard into device independent keycodes. This mapping serves to insulate the JNode operating system and applications from the fact that keyboards designed for different countries have different keyboard layouts and produce different codes.

A JNode keyboard interpreter is identified by a triple consisting of a 2 character ISO country code, together with an optional 2 character ISO language code and an optional variant identifier. Examples of valid country codes include "US", "FR", "DE", and so on. Examples of language code include "en", "fr", "de" and so on. (You can use JNode completion to get complete lists of the codes. Unfortunately, you cannot get the set of supported triples.)

When you run "loadkeys <country> ..., the command will attempt to find a keyboard interpreter class that matches the supplied triple. These classes are in the "org.jnode.driver.input.i10n" package, and should be part of the plugin with the same identifier. If loadkeys cannot find an interpreter that matches your triple, try making it less specific; i.e. leave out the <language> and <variant> parts of the triple.

Note: JNode's default keyboard layout is given by the "org/jnode/shell/driver/input/KeyboardLayout.properties" file. (The directory location in the JNode source code tree is "core/src/driver/org/jnode/driver/input/".)

Bugs
Loadkeys should allow you to find out what keyboard interpreter are available without looking at the JNode source tree or plugin JAR files.

Loadkeys should allow you to set the keyboard interpreter independently for each connected keyboard.

Loadkeys should allow you to change key bindings at the finest granularity. For example, the user should be able to (say) remap the "Windows" key to "Z" to deal with a broken "Z" key. This would allow you to configure JNode to use a currently unsupported keyboard type. (It would also help those game freaks out there who have been pounding on the "fire" key too much.)

locale

locale

Synopsis
locale print the current default Locale
locale --list | -l list all available Locales
locale <language> [ <country> [<variant> ] ] change the default Locale
Details
The locale command allows you to print, or change JNode's default Locale, or list all available Locales.

log4j

console

Synopsis
log4j --list | -l list the current log4j Loggers
log4j <configFile> reloads log4j configs from a file
log4j --url | -u <configURL> reloads log4j configs from a URL
log4j --setLevel | -s <level> [ <logger> ] changes logging levels
Details
The log4j command manages JNode's log4j logging system. It can list loggers and logging levels, reload the logging configuration and adjust logging levels.

The first form of the log4j command list the currently defined Loggers and there explicit or effective logging levels. An effective level is typically inherited from the "root" logger, and is shown in parentheses.

The second and third forms of the log4j command reload the log4j configurations from a file or URL.

The final form of the log4j command allows you to manually change logging levels. You can use completion to see what the legal logging levels and the current logger names are. If no <logger> argument is given, the command will change the level for the root logger.

ls

ls

Synopsis
ls [ <path> ... ] list files and directories
Details
The ls command lists the files and/or directories given by the <path> arguments. If no arguments are provided, the current directory is listed.
Bugs
The current output format for 'ls' does not clearly distinguish between an argument that is a file and one that is a directory. A format that looks more like the output for UNIX 'ls' would be better.

lsirq

lsirq

Synopsis
lsirq print IRQ handler information
Details
The lsirq command prints interrupt counts and device names for each IRQ.

man

man

Synopsis
man [ <name> ] print command help
Details
The man command is an alias for help.

memory

locale

Synopsis
memory show JNode memory usage
Details
The memory command shows how much JNode memory is in use and how much is free.

mkdir

mkdir

Synopsis
mkdir <path> create a new directory
Details
The mkdir command creates a new directory. All directories in the supplied path must already exist.

mount

mount

Synopsis
mount show all mounted file systems
mount <device> <directory> <fsPath> mount a file system
Details
The mount command manages mounted file systems. The first form of the command shows all mounted file systems showing the mount points and the device identifiers.

The second form of the command mounts a file system. The file system on <device> is mounted as <directory>, with <fsPath> specifying the directory in the file system being mounted that will be used as the root of the file system. Note that the mount point given by <directory> must not exist before mount is run. (JNode mounts the file system as the mount point, not on top of it as UNIX and Linux do.)

namespace

locale

Synopsis
namespace Print the contents of the system namespace
Details
The namespace command shows the contents of the system namespace. The output gives the class names of the various managers and services in the namespace.

netstat

netstat

Synopsis
netstat Print network statistics
Details
The netstat command prints address family and protocol statistics gathered by JNode's network protocol stacks.

onheap

onheap

Synopsis
onheap [--minCount <count>] [--minTotalSize <size>] [--className <size>]* Print per-class heap usage statistics
Details
The onheap command scans the heap to gather statistics on heap usage. Then it outputs a per-class breakdown, showing the number of instances of each class and the total space used by those instances.

When you run the command with no options, the output report shows the heap usage for all classes. This is typically too large to be directly useful. If you are looking for statistics for specific classes, you can pipe the output to the grep command and select the classes of interest with a regex. If you are trying to find out what classes are using a lot of space, you can use the onheap command's options to limit the output as follows:

  • --minCount <count> : this option filters out any classes that have less than <count> instances.
  • --minTotalSize <size> : this option filters out any classes for which the total space usage is less than <size> bytes.
  • --className <substring> : this option filters out any classes whose name doesn't contain <substring>.

page

page

Synopsis
page [ <file> ] page a file
page page standard input
Details
The page command displays the supplied file a screen page at a time on a new virtual console. If no arguments are provided, standard input is paged.

The command uses keyboard input to control paging. For example, a space character advances one screen page and ENTER advances one line. Enter 'h' for a listing of the available pager commands and actions.

Bugs
While the current implementation does not pre-read an input stream, nothing will be displayed until the next screen full is available. Also, the entire contents of the file or input stream will be buffered in memory.

A number useful features supported by typical 'more' and 'less' commands have not been implemented yet.

ping

ping

Synopsis
ping <host> Ping a remote host
Details
The ping command sends ICMP PING messages to the remote host given by <host> and prints statistics on the replies received. Pinging is a commonly used technique for testing that a remote host is contactable. However, ping "failure" does not necessarily mean that the machine is uncontactable. Gateways and even hosts are often configured to silently block or ignore PING messages.

Bugs
The ping command uses hard-wired parameters for the PING packet's TTL, size, count, interval and timeout. These should be command line options.

plugin

plugin

Synopsis
plugin List all plugins and their status
plugin <plugin> List a given plugin
plugin --load | -l <plugin> [ <version> ] Load a plugin
plugin --unload | -u <plugin> Unload a plugin
plugin --reload | -r <plugin> [ <version> ] Reload a plugin
plugin --addLoader | -a <url> Add a new plugin loader
Details
The plugin command lists and manages plugins and plugin loaders.

The no argument form of the command lists all plugins known to the system, showing each one's status.

The one argument form lists a single plugin.

The --load, --unload and --reload options tell the plugin command to load, unload or reload a specified plugin. The --load and --reload forms can also specify a version of the plugin to load or reload.

The --addLoader option configures a new plugin loader that will load plugin from the location given by the <url>.

propset

propset

Synopsis
propset [ -s | --shell ] <name> [ <value> ] Set or remove a property
Details
The propset command sets and removes properties in either the System property space or (if -s or --shell is used) Shell property space. If both <name> and <value> are supplied, the property <name> is set to the supplied <value>. If just <name> is given, the named property is removed.

The System property space consists of the properties returned by "System.getProperty()". This space are currently isolate-wide, but there are moves afoot to make it proclet specific. The Shell property space consists of properties stored by each Shell instance. This space is is separate from an shell interpreter's variable space, and persists over changes in a Shell's interpreter.

The 'set' command is an alias for 'propset', but if you are using the 'bjorne' interpreter the 'set' alias is obscured by the POSIX 'set' builtin command which has incompatible semantics. Hence 'propset' is the recommended alias.

pwd

pwd

Synopsis
pwd print the pathname for current directory
Details
The pwd command prints the pathname for the current directory; i.e. the value of the System "user.dir" property mapped to an absolute pathname. Note that the current directory is not guaranteed to exist, or to ever have existed.

ramdisk

ramdisk

Synopsis
ramdisk -c | --create [ -s | --size <size> ]
Details
The ramdisk command manages RAM disk devices. A RAM disk is a simulated disk device that uses RAM to store its state.

The --create form of the command creates a new RAM disk with a size in bytes given by the --size option The default size is 16K bytes. Note that the RAM disk has a notional block size of 512 bytes, so the size should be a multiple of that.

reboot

reboot

Synopsis
reboot shutdown and reboot JNode
Details
The reboot command shuts down JNode services and devices, and then reboots the machine.

remoteout

remoteout

Synopsis
remoteout [--udp | -u] --host | -h <host> [--port | -p <port>] Copy console output and logging to a remote receiver
Details
Running the remoteout command tells the shell to copy console output (both 'out' and 'err') and logger output to a remote TCP or UDP receiver. The options are as follows:

  • --host | -h <host> - this option specifies the hostname or IP address of the host running the remote receiver.
  • --port | -p <port> - this option specifies the port number for the remote receiver. The default port is 5612.
  • --udp | -u - this option tells remoteout to use UDP. The default is to use TCP. UDP is inherently lossy, but TCP mode currently does not allow logger output to be captured; see Bugs.

Before you run remoteout on JNode, you need to start a TCP or UDP receiver on the relevant remote host and port. The JNode codebase includes a simple receiver application implemented in Java. You can run as follows:

    java -cp $JNODE/core/build/classes org.jnode.debug.RemoteReceiver &

Running the RemoteReceiver application with the --help option will print out a "usage" message.

Notes:

  1. Before you run remoutout, you will need to configure JNode networking.
  2. If you have problems getting remoteout to work, check that network access is not being blocked by a network firewall or local firewall software on the remote host. (TCP and UDP access on non-standard ports like 5612 is often blocked by default.)
Bugs
In addition to the inherent lossiness of UDP, the UDPOutputStream implementation can discard output arriving simultaneously from multiple threads.

Logger output redirection is disabled in TCP mode due to a bug that triggers kernel panics.

There is currently no way to turn off console/logger copying once it has been started.

Running remoteout and a receiver on the same JNode instance, may cause JNode to lock up in a storm of console output.

resolver

resolver

Synopsis
resolver List the DNS servers the resolver uses
resolver --add | -a <ipAddr> Add a DNS server to the resolver list
resolver --del | -d <ipAddr> Remove a DNS server from the resolver list
Details
The resolver manages the list of DNS servers that the Resolver uses to resolve names of remote computers and services.

The zero argument form of resolver list the IP addresses of the DNS servers in the order that they are used.

The --add form adds a DNS aerver (identified by a numeric IP address) to the front of the resolver list.

The --del form removes a DNS server from the resolver list.

route

route

Synopsis
route List the network routing tables
route --add | -a <target> <device> [ <gateway> ] Add a new route to the routing tables
route --del | -d <target> <device> [ <gateway> ] Remove a route from the routing tables
Details
The routing table tells the JNode network stacks which network devices to use to send packets to remote machines. A routing table entry consists of the "target" address for a host or network, the device to use when sending to that address, and optionally the address of the local gateway to use.

The route command manages the routing table. The no-argument form of the command lists the current routing table. The --add and --del add and delete routes respectively.

For more information on how to use route to configure JNode networking, refer to the FAQ.

rpcinfo

rpcinfo

Synopsis
rpcinfo <host> Probe a remote host's ONC portmapper service
Details
The rpcinfo command sends a query to the OMC portmapper service running on the remote <host> and lists the results.

run

run

Synopsis
run <file> Run a command script
Details
The run command runs a command script. If the script starts with a line of the form

#!<interpreter>

where <interpreter> is the name of a registered CommandInterpreter, the script will be run using the nominated interpreter. Otherwise, the script will be run using the shell's current interpreter.

startawt

startawt

Synopsis
startawt start the JNode Graphical User Interface
Details
The startawt command starts the JNode GUI and launches the desktop class specified by the system property jnode.desktop. The default value is "org.jnode.desktop.classic.Desktop"

There is more information on the JNode GUI page, including information on how to exit the GUI.

syntax

syntax

Synopsis
syntax lists all aliases that have a defined syntax
syntax --load | -l loads the syntax for an alias from a file
syntax --dump | -d dumps the syntax for an alias to standard output
syntax --dump-all dumps all syntaxes to standard output
syntax --remove | -r alias remove the syntax for the alias
Details
The syntax command allows you to override the built-in syntaxes for commands that use the new command syntax mechanism. The command can "dump" a command's current syntax specification as XML, and "load" a new one from an XML file. It can also "remove" a syntax, provided that the syntax was defined or overridden in the command shell's syntax manager.

The built-in syntax for a command is typically specified in the plugin descriptor for a parent plugin of the command class. If there is no explicit syntax specification, a default one will be created on-the-fly from the command's registered arguments.

Note: not all classes use the new syntax mechanism. Some JNode command classes use an older mechanism that is being phased out. Other command classes use the classic Java approach of decoding arguments passed via a "public static void main(String[])" entry point.

Bugs
The XML produced by "--dump" or "--dump-all" should be pretty-printed to make it more readable / editable.

tar

tar

Synopsis
tar -Acdtrux [Options] [File ...]
 
Details
The tar program provides the ability to create tar archives, as well as various other kinds of manipulation. For example, you can use tar on previously created archives to extract files, to store additional files, or to update or list files which were already stored.
 
Compatibility
JNode tar aims to be fully compliant with gnu tar.
 
Links

tcpinout

tcpinout

Synopsis
tcpinout <host> <port> Run tcpinout in client mode
tcpinout <local port> Run tcpinout in server mode
Details
The tcpinout command is a test utility that sets up a TCP connection to a remote host and then connects the command's input and output streams to the socket. The command's standard input is read and sent to the remote machine, and simultaneously output from the remote machine is written to the command's standard output. This continues until the remote host closes the socket or a network error occurs.

In "client mode", the tcpinout command opens a connection to the supplied <host> and <port>. This assumes that there is a service on the remote host that is "listening" for connections on the port.

In "server mode", the tcpinout command listens for an incoming TCP connection on the supplied <local port>.

thread

thread

Synopsis
thread [--groupDump | -g] Display info for all extand Threads
thread <threadName> Display info for the named Thread
Details
The thread command can display information for a single Thread or all Threads that are still extant.

The first form of the command traverses the ThreadGroup hierarchy, displaying information for each Thread that it finds. The information displayed consists of the Thread's 'id', its 'name', its 'priority' and its 'state'. The latter tells you (for example) if the thread is running, waiting on a lock or exited. If the Thread has died with an uncaught exception, you will also see a stacktrace.

If you set the --groupDump flag, the information is produced by calling the "GroupInfo.list()" debug method. The output contains more information but the format is ugly.

The second form of the thread command outputs information for the thread given by the <threadName> argument. No ThreadGroup information is shown.

Bugs
The output does not show the relationship between ThreadGroups unless you use --groupDump.

The second form of the command should set a non-zero return code if it cannot find the requested thread.

There should be a variant for selecting Threads by 'id'.

time

time

Synopsis
time Alias [Args]
 
Details
Executes the command given by Alias and outputs the total execution time of that command.

touch

cd

Synopsis
touch <filename> create a file if it does not exist
Details
The touch command creates the named file if it does not already exist. If the <filename> is a pathname rather than a simple filename, the command will also create parent directories as required.

unzip

unzip

Synopsis
unzip [Options] Archive [File ...] [-x Pattern] [-d Directory]
 
Details
The unzip program handles the extraction and listing of archives based on the PKZIP format.
 
Compatibility
JNode unzip aims to be compatible with INFO-Zip.
 
Links

utest

utest

Synopsis
utest <classname> runs the JUnit tests in a class.
Details
The utest command loads the class given by <className> creates a JUnit TestSuite from it, and then runs the TestSuite using a text-mode TestRunner. The results are written to standard output.

vminfo

vminfo

Synopsis
vminfo [ --reset ] show JNode VM information
Details
The vminfo command prints out some statistics and other information about the JNode VM. The --reset flag causes some VM counters to be zeroed after their values have been printed.

wc

wc

Synopsis
wc [-cmlLw] [File ...]
 
Details
print newline, word and byte counts for each file.
 
Compatibility
JNode wc is posix compatible.
 
Links

zip

zip

Synopsis
zip [Options] [Archive] [File ...] [-xi Pattern]
 
Details
The zip program handles the creation and modification of zip archives based on the PKZIP format.
 
Compatibility
JNode zip aims to be compatible with INFO-Zip.
 
Links