table of contents
- stretch 1:19.2.1+dfsg-2+deb9u2
- testing 1:21.2.6+dfsg-1
- unstable 1:21.2.6+dfsg-1
- experimental 1:22.0.4+dfsg-1
c(3erl) | Erlang Module Definition | c(3erl) |
NAME¶
c - Command interface module.DESCRIPTION¶
This module enables users to enter the short form of some commonly used commands.EXPORTS¶
bt(Pid) -> ok | undefined
Types:
Stack backtrace for a process. Equivalent to erlang:process_display(Pid, backtrace).
c(File) -> {ok, Module} | error
c(File, Options) -> {ok, Module} | error
Types:
Options = [compile:option()]
Module = module()
Compiles and then purges and loads the code for a file. Options defaults to []. Compilation is equivalent to:
compile:file(File, Options ++ [report_errors, report_warnings])
Notice that purging the code means that any processes lingering in old code for the module are killed without warning. For more information, see code/3.
cd(Dir) -> ok
Types:
Changes working directory to Dir, which can be a relative name, and then prints the name of the new working directory.
Example:
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 system information, listing information about all processes. ni/0 does the same, but for all nodes the network.
i(X, Y, Z) -> [{atom(), term()}]
Types:
Displays information about a process, Equivalent to process_info(pid(X, Y, Z)), but location transparent.
l(Module) -> code:load_ret()
Types:
Purges and loads, or reloads, a module by calling code:purge(Module) followed by code:load_file(Module).
Notice that purging the code means that any processes lingering in old code for the module are killed without warning. For more information, see code/3.
lc(Files) -> ok
Types:
File
Compiles a list of files by calling compile:file(File, [report_errors, report_warnings]) for each File in Files.
For information about File, see file:filename().
ls() -> ok
Lists files in the current directory.
ls(Dir) -> ok
Types:
Lists files in directory Dir or, if Dir is a file, only lists it.
m() -> ok
Displays information about the loaded modules, including the files from which they have been loaded.
m(Module) -> ok
Types:
Displays information about Module.
memory() -> [{Type, Size}]
Types:
Size = integer() >= 0
Memory allocation information. Equivalent to erlang:memory/0.
memory(Type) -> Size
memory(Types) -> [{Type, Size}]
Types:
Type = atom()
Size = integer() >= 0
Memory allocation information. Equivalent to erlang:memory/1.
nc(File) -> {ok, Module} | error
nc(File, Options) -> {ok, Module} | error
Types:
Options = [Option] | Option
Option = compile:option()
Module = module()
Compiles and then loads the code for a file on all nodes. Options defaults to []. Compilation is equivalent to:
compile:file(File, Options ++ [report_errors, report_warnings])
nl(Module) -> abcast | error
Types:
Loads Module on all nodes.
pid(X, Y, Z) -> pid()
Types:
Converts X, Y, Z to pid <X.Y.Z>. This function is only to be used when debugging.
pwd() -> ok
Prints the name of the working directory.
q() -> no_return()
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.
uptime() -> ok
Prints the node uptime (as specified by erlang:statistics(wall_clock)) in human-readable form.
xm(ModSpec) -> void()
Types:
Finds undefined functions, unused functions, and calls to deprecated functions in a module by calling xref:m/1.
y(File) -> YeccRet
Types:
YeccRet
Generates an LALR-1 parser. Equivalent to:
yecc:file(File)
For information about File = name(), see filename(3erl). For information about YeccRet, see yecc:file/2.
y(File, Options) -> YeccRet
Types:
Options, YeccRet
Generates an LALR-1 parser. Equivalent to:
yecc:file(File, Options)
For information about File = name(), see filename(3erl). For information about Options and YeccRet, see yecc:file/2.
SEE ALSO¶
filename(3erl), compile(3erl), erlang(3erl), yecc(3erl), xref(3erl)stdlib 3.2 | Ericsson AB |