c
Command Interface Module
The c
module enables users to enter the short form of
some commonly used commands.
Note!
These functions are are intended for interactive use in the Erlang shell only. The module prefix may be omitted.
Functions
bt(Pid) -> ok | undefined
Stack backtrace for a process. Equivalent to
erlang:process_display(
.
c(File) -> {ok, Module} | error
c(File, Options) -> {ok, Module} | error
c/1,2
compiles and then purges and loads the code for
a file.
defaults to []. Compilation is
equivalent to:
compile:file(File ,Options ++ [report_errors, report_warnings])
Note that purging the code means that any processes
lingering in old code for the module are killed without
warning. See code/3
for more information.
cd(Dir) -> ok
Changes working directory to
, which may be a
relative name, and then prints the name of the new working
directory.
2> cd("../erlang").
/home/ron/erlang
flush() -> ok
Flushes any messages sent to the shell.
help() -> ok
Displays help information: all valid shell internal commands, and commands in this module.
i() -> ok
ni() -> ok
i/0
displays information about the system, listing
information about all processes. ni/0
does the same,
but for all nodes the network.
i(X, Y, Z) -> [{atom(), term()}]
Displays information about a process, Equivalent to
process_info(pid(
, but location transparent.
l/1
Purges and loads, or reloads, a module by calling
code:purge(
followed by
code:load_file(
.
Note that purging the code means that any processes
lingering in old code for the module are killed without
warning. See code/3
for more information.
lc(Files) -> ok
Files = [File]
File = file:filename()
Compiles a list of files by calling compile:file(File, [report_errors, report_warnings])
for each File
in Files
.
ls() -> ok
Lists files in the current directory.
ls(Dir) -> ok
Lists files in directory
.
m() -> ok
Displays information about the loaded modules, including the files from which they have been loaded.
m(Module) -> ok
Displays information about
.
memory() -> [{Type, Size}]
Memory allocation information. Equivalent to
erlang:memory/0
.
nc(File) -> {ok, Module} | error
nc(File, Options) -> {ok, Module} | error
Compiles and then loads the code for a file on all nodes.
defaults to []. Compilation is equivalent to:
compile:file(File ,Options ++ [report_errors, report_warnings])
nl(Module) -> abcast | error
Loads
on all nodes.
pid(X, Y, Z) -> pid()
Converts
,
,
to the pid
<X.Y.Z>
. This function should only be used when
debugging.
pwd() -> ok
Prints the name of the working directory.
q() -> none()
This function is shorthand for init:stop()
, that is,
it causes the node to stop in a controlled fashion.
regs() -> ok
nregs() -> ok
regs/0
displays information about all registered
processes. nregs/0
does the same, but for all nodes
in the network.
xm(ModSpec) -> void()
ModSpec = Module | Filename
Module = atom()
Filename = string()
This function finds undefined functions, unused functions,
and calls to deprecated functions in a module by calling
xref:m/1
.
y(File) -> YeccRet
File = name() -- see filename(3)
YeccRet = -- see yecc:file/2
Generates an LALR-1 parser. Equivalent to:
yecc:file(File)
y(File, Options) -> YeccRet
File = name() -- see filename(3)
Options, YeccRet = -- see yecc:file/2
Generates an LALR-1 parser. Equivalent to:
yecc:file(File, Options)