File: c.3

package info (click to toggle)
erlang-manpages 1%3A12.b.3-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,188 kB
  • ctags: 2
  • sloc: makefile: 68; perl: 30; sh: 15
file content (358 lines) | stat: -rw-r--r-- 5,396 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
.TH c 3 "stdlib  1.15.3" "Ericsson AB" "ERLANG MODULE DEFINITION"
.SH MODULE
c \- Command Interface Module
.SH DESCRIPTION
.LP
The \fIc\fR module enables users to enter the short form of some commonly used commands\&.
.SS Note:
.LP
These functions are are intended for interactive use in the Erlang shell only\&. The module prefix may be omitted\&.


.SH EXPORTS
.LP
.B
bt(Pid) -> void()
.br
.RS
.TP
Types
Pid = pid()
.br
.RE
.RS
.LP
Stack backtrace for a process\&. Equivalent to \fIerlang:process_display(Pid, backtrace)\fR\&.
.RE
.LP
.B
c(File) -> {ok, Module} | error
.br
.B
c(File, Options) -> {ok, Module} | error
.br
.RS
.TP
Types
File = name() -- see filename(3)
.br
Options = [Opt] -- see compile:file/2
.br
.RE
.RS
.LP
\fIc/1, 2\fR compiles and then purges and loads the code for a file\&. \fIOptions\fR defaults to []\&. Compilation is equivalent to:

.nf
compile:file(File, Options ++ [report_errors, report_warnings])
.fi
.LP
Note that purging the code means that any processes lingering in old code for the module are killed without warning\&. See \fIcode/3\fR for more information\&.
.RE
.LP
.B
cd(Dir) -> void()
.br
.RS
.TP
Types
Dir = name() -- see filename(3)
.br
.RE
.RS
.LP
Changes working directory to \fIDir\fR, which may be a relative name, and then prints the name of the new working directory\&.

.nf
2> cd("\&.\&./erlang")\&.

/home/ron/erlang
.fi
.RE
.LP
.B
flush() -> void()
.br
.RS
.LP
Flushes any messages sent to the shell\&.
.RE
.LP
.B
help() -> void()
.br
.RS
.LP
Displays help information: all valid shell internal commands, and commands in this module\&.
.RE
.LP
.B
i() -> void()
.br
.B
ni() -> void()
.br
.RS
.LP
\fIi/0\fR displays information about the system, listing information about all processes\&. \fIni/0\fR does the same, but for all nodes the network\&.
.RE
.LP
.B
i(X, Y, Z) -> void()
.br
.RS
.TP
Types
X = Y = Z = int()
.br
.RE
.RS
.LP
Displays information about a process, Equivalent to \fIprocess_info(pid(X, Y, Z))\fR, but location transparent\&.
.RE
.LP
.B
l(Module) -> void()
.br
.RS
.TP
Types
Module = atom()
.br
.RE
.RS
.LP
Purges and loads, or reloads, a module by calling \fIcode:purge(Module)\fR followed by \fIcode:load_file(Module)\fR\&.
.LP
Note that purging the code means that any processes lingering in old code for the module are killed without warning\&. See \fIcode/3\fR for more information\&.
.RE
.LP
.B
lc(Files) -> ok
.br
.RS
.TP
Types
Files = [File]
.br
File = name() -- see filename(3)
.br
.RE
.RS
.LP
Compiles a list of files by calling \fIcompile:file(File, [report_errors, report_warnings])\fR for each \fIFile\fR in \fIFiles\fR\&.
.RE
.LP
.B
ls() -> void()
.br
.RS
.LP
Lists files in the current directory\&.
.RE
.LP
.B
ls(Dir) -> void()
.br
.RS
.TP
Types
Dir = name() -- see filename(3)
.br
.RE
.RS
.LP
Lists files in directory \fIDir\fR\&.
.RE
.LP
.B
m() -> void()
.br
.RS
.LP
Displays information about the loaded modules, including the files from which they have been loaded\&.
.RE
.LP
.B
m(Module) -> void()
.br
.RS
.TP
Types
Module = atom()
.br
.RE
.RS
.LP
Displays information about \fIModule\fR\&.
.RE
.LP
.B
memory() -> [{Type, Size}]
.br
.RS
.TP
Types
Type, Size -- see erlang:memory/0
.br
.RE
.RS
.LP
Memory allocation information\&. Equivalent to \fIerlang:memory/0\fR\&.
.RE
.LP
.B
memory(Type) -> Size
.br
.B
memory([Type]) -> [{Type, Size}]
.br
.RS
.TP
Types
Type, Size -- see erlang:memory/0
.br
.RE
.RS
.LP
Memory allocation information\&. Equivalent to \fIerlang:memory/1\fR\&.
.RE
.LP
.B
nc(File) -> {ok, Module} | error
.br
.B
nc(File, Options) -> {ok, Module} | error
.br
.RS
.TP
Types
File = name() -- see filename(3)
.br
Options = [Opt] -- see compile:file/2
.br
.RE
.RS
.LP
Compiles and then loads the code for a file on all nodes\&. \fIOptions\fR defaults to []\&. Compilation is equivalent to:

.nf
compile:file(File, Opts ++ [report_errors, report_warnings])
.fi
.RE
.LP
.B
nl(Module) -> void()
.br
.RS
.TP
Types
Module = atom()
.br
.RE
.RS
.LP
Loads \fIModule\fR on all nodes\&.
.RE
.LP
.B
pid(X, Y, Z) -> pid()
.br
.RS
.TP
Types
X = Y = Z = int()
.br
.RE
.RS
.LP
Converts \fIX\fR, \fIY\fR, \fIZ\fR to the pid \fI<X\&.Y\&.Z>\fR\&. This function should only be used when debugging\&.
.RE
.LP
.B
pwd() -> void()
.br
.RS
.LP
Prints the name of the working directory\&.
.RE
.LP
.B
q() -> void()
.br
.RS
.LP
This function is shorthand for \fIinit:stop()\fR, that is, it causes the node to stop in a controlled fashion\&.
.RE
.LP
.B
regs() -> void()
.br
.B
nregs() -> void()
.br
.RS
.LP
\fIregs/0\fR displays information about all registered processes\&. \fInregs/0\fR does the same, but for all nodes in the network\&.
.RE
.LP
.B
xm(ModSpec) -> void()
.br
.RS
.TP
Types
ModSpec = Module | Filename
.br
Module = atom()
.br
Filename = string()
.br
.RE
.RS
.LP
This function finds undefined functions, unused functions, and calls to deprecated functions in a module by calling \fIxref:m/1\fR\&.
.RE
.LP
.B
y(File) -> YeccRet
.br
.RS
.TP
Types
File = name() -- see filename(3)
.br
YeccRet = -- see yecc:file/2
.br
.RE
.RS
.LP
Generates an LALR-1 parser\&. Equivalent to:

.nf
yecc:file(File)
.fi
.RE
.LP
.B
y(File, Options) -> YeccRet
.br
.RS
.TP
Types
File = name() -- see filename(3)
.br
Options, YeccRet = -- see yecc:file/2
.br
.RE
.RS
.LP
Generates an LALR-1 parser\&. Equivalent to:

.nf
yecc:file(File, Options)
.fi
.RE
.SH SEE ALSO
.LP
compile(3), filename(3), erlang(3), yecc(3), xref(3)