1 | @c |
---|
2 | @c COPYRIGHT (c) 1988-2008. |
---|
3 | @c On-Line Applications Research Corporation (OAR). |
---|
4 | @c All rights reserved. |
---|
5 | |
---|
6 | @chapter File and Directory Commands |
---|
7 | |
---|
8 | @section Introduction |
---|
9 | |
---|
10 | The RTEMS shell has the following file and directory commands: |
---|
11 | |
---|
12 | @itemize @bullet |
---|
13 | |
---|
14 | @item @code{blksync} - sync the block driver |
---|
15 | @item @code{cat} - display file contents |
---|
16 | @item @code{cd} - alias for chdir |
---|
17 | @item @code{chdir} - change the current directory |
---|
18 | @item @code{chmod} - change permissions of a file |
---|
19 | @item @code{chroot} - change the root directory |
---|
20 | @item @code{cp} - copy files |
---|
21 | @item @code{dd} - format disks |
---|
22 | @item @code{debugrfs} - debug RFS file system |
---|
23 | @item @code{df} - display file system disk space usage |
---|
24 | @item @code{dir} - alias for ls |
---|
25 | @item @code{fdisk} - format disks |
---|
26 | @item @code{hexdump} - format disks |
---|
27 | @item @code{ln} - make links |
---|
28 | @item @code{ls} - list files in the directory |
---|
29 | @item @code{md5} - display file system disk space usage |
---|
30 | @item @code{mkdir} - create a directory |
---|
31 | @item @code{mkdos} - DOSFS disk format |
---|
32 | @item @code{mknod} - make device special file |
---|
33 | @item @code{mkrfs} - format RFS file system |
---|
34 | @item @code{mount} - mount disk |
---|
35 | @item @code{mv} - move files |
---|
36 | @item @code{pwd} - print work directory |
---|
37 | @item @code{rmdir} - remove empty directories |
---|
38 | @item @code{rm} - remove files |
---|
39 | @item @code{umask} - Set file mode creation mask |
---|
40 | @item @code{unmount} - unmount disk |
---|
41 | |
---|
42 | @end itemize |
---|
43 | |
---|
44 | @section Commands |
---|
45 | |
---|
46 | This section details the File and Directory Commands available. A |
---|
47 | subsection is dedicated to each of the commands and |
---|
48 | describes the behavior and configuration of that |
---|
49 | command as well as providing an example usage. |
---|
50 | |
---|
51 | @c |
---|
52 | @c |
---|
53 | @c |
---|
54 | @page |
---|
55 | @subsection blksync - sync the block driver |
---|
56 | |
---|
57 | @pgindex blksync |
---|
58 | |
---|
59 | @subheading SYNOPSYS: |
---|
60 | |
---|
61 | @example |
---|
62 | blksync driver |
---|
63 | @end example |
---|
64 | |
---|
65 | @subheading DESCRIPTION: |
---|
66 | |
---|
67 | This command XXX |
---|
68 | |
---|
69 | @subheading EXIT STATUS: |
---|
70 | |
---|
71 | This command returns 0 on success and non-zero if an error is encountered. |
---|
72 | |
---|
73 | @subheading NOTES: |
---|
74 | |
---|
75 | NONE |
---|
76 | |
---|
77 | @subheading EXAMPLES: |
---|
78 | |
---|
79 | The following is an example of how to use @code{blksync}: |
---|
80 | |
---|
81 | @example |
---|
82 | EXAMPLE_TBD |
---|
83 | @end example |
---|
84 | |
---|
85 | @subheading CONFIGURATION: |
---|
86 | |
---|
87 | @findex CONFIGURE_SHELL_NO_COMMAND_BLKSYNC |
---|
88 | @findex CONFIGURE_SHELL_COMMAND_BLKSYNC |
---|
89 | |
---|
90 | This command is included in the default shell command set. |
---|
91 | When building a custom command set, define |
---|
92 | @code{CONFIGURE_SHELL_COMMAND_BLKSYNC} to have this |
---|
93 | command included. |
---|
94 | |
---|
95 | This command can be excluded from the shell command set by |
---|
96 | defining @code{CONFIGURE_SHELL_NO_COMMAND_BLKSYNC} when all |
---|
97 | shell commands have been configured. |
---|
98 | |
---|
99 | @subheading PROGRAMMING INFORMATION: |
---|
100 | |
---|
101 | @findex rtems_shell_rtems_main_blksync |
---|
102 | |
---|
103 | The @code{blksync} is implemented by a C language function |
---|
104 | which has the following prototype: |
---|
105 | |
---|
106 | @example |
---|
107 | int rtems_shell_rtems_main_blksync( |
---|
108 | int argc, |
---|
109 | char **argv |
---|
110 | ); |
---|
111 | @end example |
---|
112 | |
---|
113 | The configuration structure for the @code{blksync} has the |
---|
114 | following prototype: |
---|
115 | |
---|
116 | @example |
---|
117 | extern rtems_shell_cmd_t rtems_shell_BLKSYNC_Command; |
---|
118 | @end example |
---|
119 | |
---|
120 | @c |
---|
121 | @c |
---|
122 | @c |
---|
123 | @page |
---|
124 | @subsection cat - display file contents |
---|
125 | |
---|
126 | @pgindex cat |
---|
127 | |
---|
128 | @subheading SYNOPSYS: |
---|
129 | |
---|
130 | @example |
---|
131 | cat file1 [file2 .. fileN] |
---|
132 | @end example |
---|
133 | |
---|
134 | @subheading DESCRIPTION: |
---|
135 | |
---|
136 | This command displays the contents of the specified files. |
---|
137 | |
---|
138 | @subheading EXIT STATUS: |
---|
139 | |
---|
140 | This command returns 0 on success and non-zero if an error is encountered. |
---|
141 | |
---|
142 | @subheading NOTES: |
---|
143 | |
---|
144 | It is possible to read the input from a device file using @code{cat}. |
---|
145 | |
---|
146 | @subheading EXAMPLES: |
---|
147 | |
---|
148 | The following is an example of how to use @code{cat}: |
---|
149 | |
---|
150 | @example |
---|
151 | SHLL [/] # cat /etc/passwd |
---|
152 | root:*:0:0:root::/:/bin/sh |
---|
153 | rtems:*:1:1:RTEMS Application::/:/bin/sh |
---|
154 | tty:!:2:2:tty owner::/:/bin/false |
---|
155 | @end example |
---|
156 | |
---|
157 | @subheading CONFIGURATION: |
---|
158 | |
---|
159 | @findex CONFIGURE_SHELL_NO_COMMAND_CAT |
---|
160 | @findex CONFIGURE_SHELL_COMMAND_CAT |
---|
161 | |
---|
162 | This command is included in the default shell command set. |
---|
163 | When building a custom command set, define |
---|
164 | @code{CONFIGURE_SHELL_COMMAND_CAT} to have this |
---|
165 | command included. |
---|
166 | |
---|
167 | This command can be excluded from the shell command set by |
---|
168 | defining @code{CONFIGURE_SHELL_NO_COMMAND_CAT} when all |
---|
169 | shell commands have been configured. |
---|
170 | |
---|
171 | @subheading PROGRAMMING INFORMATION: |
---|
172 | |
---|
173 | @findex rtems_shell_rtems_main_cat |
---|
174 | |
---|
175 | The @code{cat} is implemented by a C language function |
---|
176 | which has the following prototype: |
---|
177 | |
---|
178 | @example |
---|
179 | int rtems_shell_rtems_main_cat( |
---|
180 | int argc, |
---|
181 | char **argv |
---|
182 | ); |
---|
183 | @end example |
---|
184 | |
---|
185 | The configuration structure for the @code{cat} has the |
---|
186 | following prototype: |
---|
187 | |
---|
188 | @example |
---|
189 | extern rtems_shell_cmd_t rtems_shell_CAT_Command; |
---|
190 | @end example |
---|
191 | |
---|
192 | @c |
---|
193 | @c |
---|
194 | @c |
---|
195 | @page |
---|
196 | @subsection cd - alias for chdir |
---|
197 | |
---|
198 | @pgindex cd |
---|
199 | |
---|
200 | @subheading SYNOPSYS: |
---|
201 | |
---|
202 | @example |
---|
203 | cd directory |
---|
204 | @end example |
---|
205 | |
---|
206 | @subheading DESCRIPTION: |
---|
207 | |
---|
208 | This command is an alias or alternate name for the @code{chdir}. |
---|
209 | See @ref{File and Directory Commands chdir - change the current directory, cd} |
---|
210 | for more information. |
---|
211 | |
---|
212 | @subheading EXIT STATUS: |
---|
213 | |
---|
214 | This command returns 0 on success and non-zero if an error is encountered. |
---|
215 | |
---|
216 | @subheading NOTES: |
---|
217 | |
---|
218 | NONE |
---|
219 | |
---|
220 | @subheading EXAMPLES: |
---|
221 | |
---|
222 | The following is an example of how to use @code{cd}: |
---|
223 | |
---|
224 | @example |
---|
225 | SHLL [/] $ cd etc |
---|
226 | SHLL [/etc] $ cd / |
---|
227 | SHLL [/] $ cd /etc |
---|
228 | SHLL [/etc] $ pwd |
---|
229 | /etc |
---|
230 | SHLL [/etc] $ cd / |
---|
231 | SHLL [/] $ pwd |
---|
232 | / |
---|
233 | SHLL [/] $ cd etc |
---|
234 | SHLL [/etc] $ cd .. |
---|
235 | SHLL [/] $ pwd |
---|
236 | / |
---|
237 | @end example |
---|
238 | |
---|
239 | @subheading CONFIGURATION: |
---|
240 | |
---|
241 | @findex CONFIGURE_SHELL_NO_COMMAND_CD |
---|
242 | @findex CONFIGURE_SHELL_COMMAND_CD |
---|
243 | |
---|
244 | This command is included in the default shell command set. |
---|
245 | When building a custom command set, define |
---|
246 | @code{CONFIGURE_SHELL_COMMAND_CD} to have this |
---|
247 | command included. |
---|
248 | |
---|
249 | This command can be excluded from the shell command set by |
---|
250 | defining @code{CONFIGURE_SHELL_NO_COMMAND_CD} when all |
---|
251 | shell commands have been configured. |
---|
252 | |
---|
253 | @subheading PROGRAMMING INFORMATION: |
---|
254 | |
---|
255 | @findex rtems_shell_rtems_main_cd |
---|
256 | |
---|
257 | The @code{cd} is implemented by a C language function |
---|
258 | which has the following prototype: |
---|
259 | |
---|
260 | @example |
---|
261 | int rtems_shell_rtems_main_cd( |
---|
262 | int argc, |
---|
263 | char **argv |
---|
264 | ); |
---|
265 | @end example |
---|
266 | |
---|
267 | The configuration structure for the @code{cd} has the |
---|
268 | following prototype: |
---|
269 | |
---|
270 | @example |
---|
271 | extern rtems_shell_cmd_t rtems_shell_CD_Command; |
---|
272 | @end example |
---|
273 | |
---|
274 | @c |
---|
275 | @c |
---|
276 | @c |
---|
277 | @page |
---|
278 | @subsection chdir - change the current directory |
---|
279 | |
---|
280 | @pgindex chdir |
---|
281 | |
---|
282 | @subheading SYNOPSYS: |
---|
283 | |
---|
284 | @example |
---|
285 | chdir [dir] |
---|
286 | @end example |
---|
287 | |
---|
288 | @subheading DESCRIPTION: |
---|
289 | |
---|
290 | This command is used to change the current working directory to |
---|
291 | the specified directory. If no arguments are given, the current |
---|
292 | working directory will be changed to @code{/}. |
---|
293 | |
---|
294 | @subheading EXIT STATUS: |
---|
295 | |
---|
296 | This command returns 0 on success and non-zero if an error is encountered. |
---|
297 | |
---|
298 | @subheading NOTES: |
---|
299 | |
---|
300 | NONE |
---|
301 | |
---|
302 | @subheading EXAMPLES: |
---|
303 | |
---|
304 | The following is an example of how to use @code{chdir}: |
---|
305 | |
---|
306 | @example |
---|
307 | SHLL [/] $ pwd |
---|
308 | / |
---|
309 | SHLL [/] $ chdir etc |
---|
310 | SHLL [/etc] $ pwd |
---|
311 | /etc |
---|
312 | @end example |
---|
313 | |
---|
314 | @subheading CONFIGURATION: |
---|
315 | |
---|
316 | @findex CONFIGURE_SHELL_NO_COMMAND_CHDIR |
---|
317 | @findex CONFIGURE_SHELL_COMMAND_CHDIR |
---|
318 | |
---|
319 | This command is included in the default shell command set. |
---|
320 | When building a custom command set, define |
---|
321 | @code{CONFIGURE_SHELL_COMMAND_CHDIR} to have this |
---|
322 | command included. |
---|
323 | |
---|
324 | This command can be excluded from the shell command set by |
---|
325 | defining @code{CONFIGURE_SHELL_NO_COMMAND_CHDIR} when all |
---|
326 | shell commands have been configured. |
---|
327 | |
---|
328 | @subheading PROGRAMMING INFORMATION: |
---|
329 | |
---|
330 | @findex rtems_shell_rtems_main_chdir |
---|
331 | |
---|
332 | The @code{chdir} is implemented by a C language function |
---|
333 | which has the following prototype: |
---|
334 | |
---|
335 | @example |
---|
336 | int rtems_shell_rtems_main_chdir( |
---|
337 | int argc, |
---|
338 | char **argv |
---|
339 | ); |
---|
340 | @end example |
---|
341 | |
---|
342 | The configuration structure for the @code{chdir} has the |
---|
343 | following prototype: |
---|
344 | |
---|
345 | @example |
---|
346 | extern rtems_shell_cmd_t rtems_shell_CHDIR_Command; |
---|
347 | @end example |
---|
348 | |
---|
349 | @c |
---|
350 | @c |
---|
351 | @c |
---|
352 | @page |
---|
353 | @subsection chmod - change permissions of a file |
---|
354 | |
---|
355 | @pgindex chmod |
---|
356 | |
---|
357 | @subheading SYNOPSYS: |
---|
358 | |
---|
359 | @example |
---|
360 | chmod permissions file1 [file2...] |
---|
361 | @end example |
---|
362 | |
---|
363 | @subheading DESCRIPTION: |
---|
364 | |
---|
365 | This command changes the permissions on the files specified to the |
---|
366 | indicated @code{permissions}. The permission values are POSIX based |
---|
367 | with owner, group, and world having individual read, write, and |
---|
368 | executive permission bits. |
---|
369 | |
---|
370 | @subheading EXIT STATUS: |
---|
371 | |
---|
372 | This command returns 0 on success and non-zero if an error is encountered. |
---|
373 | |
---|
374 | @subheading NOTES: |
---|
375 | |
---|
376 | The @code{chmod} command only takes numeric representations of |
---|
377 | the permissions. |
---|
378 | |
---|
379 | @subheading EXAMPLES: |
---|
380 | |
---|
381 | The following is an example of how to use @code{chmod}: |
---|
382 | |
---|
383 | @example |
---|
384 | SHLL [/] # cd etc |
---|
385 | SHLL [/etc] # ls |
---|
386 | -rw-r--r-- 1 root root 102 Jan 01 00:00 passwd |
---|
387 | -rw-r--r-- 1 root root 42 Jan 01 00:00 group |
---|
388 | -rw-r--r-- 1 root root 30 Jan 01 00:00 issue |
---|
389 | -rw-r--r-- 1 root root 28 Jan 01 00:00 issue.net |
---|
390 | 4 files 202 bytes occupied |
---|
391 | SHLL [/etc] # chmod 0777 passwd |
---|
392 | SHLL [/etc] # ls |
---|
393 | -rwxrwxrwx 1 root root 102 Jan 01 00:00 passwd |
---|
394 | -rw-r--r-- 1 root root 42 Jan 01 00:00 group |
---|
395 | -rw-r--r-- 1 root root 30 Jan 01 00:00 issue |
---|
396 | -rw-r--r-- 1 root root 28 Jan 01 00:00 issue.net |
---|
397 | 4 files 202 bytes occupied |
---|
398 | SHLL [/etc] # chmod 0322 passwd |
---|
399 | SHLL [/etc] # ls |
---|
400 | --wx-w--w- 1 nouser root 102 Jan 01 00:00 passwd |
---|
401 | -rw-r--r-- 1 nouser root 42 Jan 01 00:00 group |
---|
402 | -rw-r--r-- 1 nouser root 30 Jan 01 00:00 issue |
---|
403 | -rw-r--r-- 1 nouser root 28 Jan 01 00:00 issue.net |
---|
404 | 4 files 202 bytes occupied |
---|
405 | SHLL [/etc] # chmod 0644 passwd |
---|
406 | SHLL [/etc] # ls |
---|
407 | -rw-r--r-- 1 root root 102 Jan 01 00:00 passwd |
---|
408 | -rw-r--r-- 1 root root 42 Jan 01 00:00 group |
---|
409 | -rw-r--r-- 1 root root 30 Jan 01 00:00 issue |
---|
410 | -rw-r--r-- 1 root root 28 Jan 01 00:00 issue.net |
---|
411 | 4 files 202 bytes occupied |
---|
412 | @end example |
---|
413 | |
---|
414 | @subheading CONFIGURATION: |
---|
415 | |
---|
416 | @findex CONFIGURE_SHELL_NO_COMMAND_CHMOD |
---|
417 | @findex CONFIGURE_SHELL_COMMAND_CHMOD |
---|
418 | |
---|
419 | This command is included in the default shell command set. |
---|
420 | When building a custom command set, define |
---|
421 | @code{CONFIGURE_SHELL_COMMAND_CHMOD} to have this |
---|
422 | command included. |
---|
423 | |
---|
424 | This command can be excluded from the shell command set by |
---|
425 | defining @code{CONFIGURE_SHELL_NO_COMMAND_CHMOD} when all |
---|
426 | shell commands have been configured. |
---|
427 | |
---|
428 | @subheading PROGRAMMING INFORMATION: |
---|
429 | |
---|
430 | @findex rtems_shell_rtems_main_chmod |
---|
431 | |
---|
432 | The @code{chmod} is implemented by a C language function |
---|
433 | which has the following prototype: |
---|
434 | |
---|
435 | @example |
---|
436 | int rtems_shell_rtems_main_chmod( |
---|
437 | int argc, |
---|
438 | char **argv |
---|
439 | ); |
---|
440 | @end example |
---|
441 | |
---|
442 | The configuration structure for the @code{chmod} has the |
---|
443 | following prototype: |
---|
444 | |
---|
445 | @example |
---|
446 | extern rtems_shell_cmd_t rtems_shell_CHMOD_Command; |
---|
447 | @end example |
---|
448 | |
---|
449 | @c |
---|
450 | @c |
---|
451 | @c |
---|
452 | @page |
---|
453 | @subsection chroot - change the root directory |
---|
454 | |
---|
455 | @pgindex chroot |
---|
456 | |
---|
457 | @subheading SYNOPSYS: |
---|
458 | |
---|
459 | @example |
---|
460 | chroot [dir] |
---|
461 | @end example |
---|
462 | |
---|
463 | @subheading DESCRIPTION: |
---|
464 | |
---|
465 | This command changes the root directory to @code{dir} for subsequent |
---|
466 | commands. |
---|
467 | |
---|
468 | @subheading EXIT STATUS: |
---|
469 | |
---|
470 | This command returns 0 on success and non-zero if an error is encountered. |
---|
471 | |
---|
472 | The destination directory @code{dir} must exist. |
---|
473 | |
---|
474 | @subheading NOTES: |
---|
475 | |
---|
476 | NONE |
---|
477 | |
---|
478 | @subheading EXAMPLES: |
---|
479 | |
---|
480 | The following is an example of how to use @code{chroot} |
---|
481 | and the impact it has on the environment for subsequent |
---|
482 | command invocations: |
---|
483 | |
---|
484 | @example |
---|
485 | SHLL [/] $ cat passwd |
---|
486 | cat: passwd: No such file or directory |
---|
487 | SHLL [/] $ chroot etc |
---|
488 | SHLL [/] $ cat passwd |
---|
489 | root:*:0:0:root::/:/bin/sh |
---|
490 | rtems:*:1:1:RTEMS Application::/:/bin/sh |
---|
491 | tty:!:2:2:tty owner::/:/bin/false |
---|
492 | SHLL [/] $ cat /etc/passwd |
---|
493 | cat: /etc/passwd: No such file or directory |
---|
494 | @end example |
---|
495 | |
---|
496 | @subheading CONFIGURATION: |
---|
497 | |
---|
498 | @findex CONFIGURE_SHELL_NO_COMMAND_CHROOT |
---|
499 | @findex CONFIGURE_SHELL_COMMAND_CHROOT |
---|
500 | |
---|
501 | This command is included in the default shell command set. |
---|
502 | When building a custom command set, define |
---|
503 | @code{CONFIGURE_SHELL_COMMAND_CHROOT} to have this |
---|
504 | command included. Additional to that you have to add one |
---|
505 | POSIX key value pair for each thread where you want to use |
---|
506 | the command. |
---|
507 | |
---|
508 | This command can be excluded from the shell command set by |
---|
509 | defining @code{CONFIGURE_SHELL_NO_COMMAND_CHROOT} when all |
---|
510 | shell commands have been configured. |
---|
511 | |
---|
512 | @subheading PROGRAMMING INFORMATION: |
---|
513 | |
---|
514 | @findex rtems_shell_rtems_main_chroot |
---|
515 | |
---|
516 | The @code{chroot} is implemented by a C language function |
---|
517 | which has the following prototype: |
---|
518 | |
---|
519 | @example |
---|
520 | int rtems_shell_rtems_main_chroot( |
---|
521 | int argc, |
---|
522 | char **argv |
---|
523 | ); |
---|
524 | @end example |
---|
525 | |
---|
526 | The configuration structure for the @code{chroot} has the |
---|
527 | following prototype: |
---|
528 | |
---|
529 | @example |
---|
530 | extern rtems_shell_cmd_t rtems_shell_CHROOT_Command; |
---|
531 | @end example |
---|
532 | |
---|
533 | @c |
---|
534 | @c |
---|
535 | @c |
---|
536 | @page |
---|
537 | @subsection cp - copy files |
---|
538 | |
---|
539 | @pgindex cp |
---|
540 | |
---|
541 | @subheading SYNOPSYS: |
---|
542 | |
---|
543 | @example |
---|
544 | cp [-R [-H | -L | -P]] [-f | -i] [-pv] src target |
---|
545 | cp [-R [-H | -L] ] [-f | -i] [-NpPv] source_file ... target_directory |
---|
546 | @end example |
---|
547 | |
---|
548 | @subheading DESCRIPTION: |
---|
549 | |
---|
550 | In the first synopsis form, the cp utility copies the contents of the |
---|
551 | source_file to the target_file. In the second synopsis form, the contents of |
---|
552 | each named source_file is copied to the destination target_directory. The names |
---|
553 | of the files themselves are not changed. If cp detects an attempt to copy a |
---|
554 | file to itself, the copy will fail. |
---|
555 | |
---|
556 | The following options are available: |
---|
557 | |
---|
558 | @table @b |
---|
559 | @item -f |
---|
560 | For each existing destination pathname, attempt to overwrite it. If permissions |
---|
561 | do not allow copy to succeed, remove it and create a new file, without |
---|
562 | prompting for confirmation. (The -i option is ignored if the -f option is |
---|
563 | specified.) |
---|
564 | |
---|
565 | @item -H |
---|
566 | If the -R option is specified, symbolic links on the command line are followed. |
---|
567 | (Symbolic links encountered in the tree traversal are not followed.) |
---|
568 | |
---|
569 | @item -i |
---|
570 | Causes cp to write a prompt to the standard error output before copying a file |
---|
571 | that would overwrite an existing file. If the response from the standard input |
---|
572 | begins with the character 'y', the file copy is attempted. |
---|
573 | |
---|
574 | @item -L |
---|
575 | If the -R option is specified, all symbolic links are followed. |
---|
576 | |
---|
577 | @item -N |
---|
578 | When used with -p, do not copy file flags. |
---|
579 | |
---|
580 | @item -P |
---|
581 | No symbolic links are followed. |
---|
582 | |
---|
583 | @item -p |
---|
584 | Causes cp to preserve in the copy as many of the modification time, access |
---|
585 | time, file flags, file mode, user ID, and group ID as allowed by permissions. |
---|
586 | |
---|
587 | If the user ID and group ID cannot be preserved, no error message is displayed |
---|
588 | and the exit value is not altered. |
---|
589 | |
---|
590 | If the source file has its set user ID bit on and the user ID cannot be |
---|
591 | preserved, the set user ID bit is not preserved in the copy's permissions. If |
---|
592 | the source file has its set group ID bit on and the group ID cannot be |
---|
593 | preserved, the set group ID bit is not preserved in the copy's permissions. If |
---|
594 | the source file has both its set user ID and set group ID bits on, and either |
---|
595 | the user ID or group ID cannot be preserved, neither the set user ID or set |
---|
596 | group ID bits are preserved in the copy's permissions. |
---|
597 | |
---|
598 | @item -R |
---|
599 | If source_file designates a directory, cp copies the directory and the entire |
---|
600 | subtree connected at that point. This option also causes symbolic links to be |
---|
601 | copied, rather than indirected through, and for cp to create special files |
---|
602 | rather than copying them as normal files. Created directories have the same |
---|
603 | mode as the corresponding source directory, unmodified by the process's umask. |
---|
604 | |
---|
605 | @item -v |
---|
606 | Cause cp to be verbose, showing files as they are copied. |
---|
607 | |
---|
608 | @end table |
---|
609 | |
---|
610 | For each destination file that already exists, its contents are overwritten if |
---|
611 | permissions allow, but its mode, user ID, and group ID are unchanged. |
---|
612 | |
---|
613 | In the second synopsis form, target_directory must exist unless there is only |
---|
614 | one named source_file which is a directory and the -R flag is specified. |
---|
615 | |
---|
616 | If the destination file does not exist, the mode of the source file is used as |
---|
617 | modified by the file mode creation mask (umask, see csh(1)). If the source file |
---|
618 | has its set user ID bit on, that bit is removed unless both the source file and |
---|
619 | the destination file are owned by the same user. If the source file has its set |
---|
620 | group ID bit on, that bit is removed unless both the source file and the |
---|
621 | destination file are in the same group and the user is a member of that group. |
---|
622 | If both the set user ID and set group ID bits are set, all of the above |
---|
623 | conditions must be fulfilled or both bits are removed. |
---|
624 | |
---|
625 | Appropriate permissions are required for file creation or overwriting. |
---|
626 | |
---|
627 | Symbolic links are always followed unless the -R flag is set, in which case |
---|
628 | symbolic links are not followed, by default. The -H or -L flags (in conjunction |
---|
629 | with the -R flag), as well as the -P flag cause symbolic links to be followed |
---|
630 | as described above. The -H and -L options are ignored unless the -R option is |
---|
631 | specified. In addition, these options override eachsubhedading other and the |
---|
632 | command's actions are determined by the last one specified. |
---|
633 | |
---|
634 | @subheading EXIT STATUS: |
---|
635 | |
---|
636 | This command returns 0 on success and non-zero if an error is encountered. |
---|
637 | |
---|
638 | @subheading NOTES: |
---|
639 | |
---|
640 | NONE |
---|
641 | |
---|
642 | @subheading EXAMPLES: |
---|
643 | |
---|
644 | The following is an example of how to use @code{cp} to |
---|
645 | copy a file to a new name in the current directory: |
---|
646 | |
---|
647 | @example |
---|
648 | SHLL [/] # cat joel |
---|
649 | cat: joel: No such file or directory |
---|
650 | SHLL [/] # cp etc/passwd joel |
---|
651 | SHLL [/] # cat joel |
---|
652 | root:*:0:0:root::/:/bin/sh |
---|
653 | rtems:*:1:1:RTEMS Application::/:/bin/sh |
---|
654 | tty:!:2:2:tty owner::/:/bin/false |
---|
655 | SHLL [/] # ls |
---|
656 | drwxr-xr-x 1 root root 536 Jan 01 00:00 dev/ |
---|
657 | drwxr-xr-x 1 root root 1072 Jan 01 00:00 etc/ |
---|
658 | -rw-r--r-- 1 root root 102 Jan 01 00:00 joel |
---|
659 | 3 files 1710 bytes occupied |
---|
660 | @end example |
---|
661 | |
---|
662 | The following is an example of how to use @code{cp} to |
---|
663 | copy one or more files to a destination directory and |
---|
664 | use the same @code{basename} in the destination directory: |
---|
665 | |
---|
666 | @example |
---|
667 | SHLL [/] # mkdir tmp |
---|
668 | SHLL [/] # ls tmp |
---|
669 | 0 files 0 bytes occupied |
---|
670 | SHLL [/] # cp /etc/passwd tmp |
---|
671 | SHLL [/] # ls /tmp |
---|
672 | -rw-r--r-- 1 root root 102 Jan 01 00:01 passwd |
---|
673 | 1 files 102 bytes occupied |
---|
674 | SHLL [/] # cp /etc/passwd /etc/group /tmp |
---|
675 | SHLL [/] # ls /tmp |
---|
676 | -rw-r--r-- 1 root root 102 Jan 01 00:01 passwd |
---|
677 | -rw-r--r-- 1 root root 42 Jan 01 00:01 group |
---|
678 | 2 files 144 bytes occupied |
---|
679 | SHLL [/] # |
---|
680 | @end example |
---|
681 | |
---|
682 | @subheading CONFIGURATION: |
---|
683 | |
---|
684 | @findex CONFIGURE_SHELL_NO_COMMAND_CP |
---|
685 | @findex CONFIGURE_SHELL_COMMAND_CP |
---|
686 | |
---|
687 | This command is included in the default shell command set. |
---|
688 | When building a custom command set, define |
---|
689 | @code{CONFIGURE_SHELL_COMMAND_CP} to have this |
---|
690 | command included. |
---|
691 | |
---|
692 | This command can be excluded from the shell command set by |
---|
693 | defining @code{CONFIGURE_SHELL_NO_COMMAND_CP} when all |
---|
694 | shell commands have been configured. |
---|
695 | |
---|
696 | @subheading PROGRAMMING INFORMATION: |
---|
697 | |
---|
698 | @findex rtems_shell_rtems_main_cp |
---|
699 | |
---|
700 | The @code{cp} command is implemented by a C language function which |
---|
701 | has the following prototype: |
---|
702 | |
---|
703 | @example |
---|
704 | int rtems_shell_rtems_main_cp( |
---|
705 | int argc, |
---|
706 | char **argv |
---|
707 | ); |
---|
708 | @end example |
---|
709 | |
---|
710 | The configuration structure for the @code{cp} has the |
---|
711 | following prototype: |
---|
712 | |
---|
713 | @example |
---|
714 | extern rtems_shell_cmd_t rtems_shell_CP_Command; |
---|
715 | @end example |
---|
716 | |
---|
717 | @subheading ORIGIN: |
---|
718 | |
---|
719 | The implementation and portions of the documentation for this |
---|
720 | command are from NetBSD 4.0. |
---|
721 | |
---|
722 | @c |
---|
723 | @c |
---|
724 | @c |
---|
725 | @page |
---|
726 | @subsection dd - convert and copy a file |
---|
727 | |
---|
728 | @pgindex dd |
---|
729 | |
---|
730 | @subheading SYNOPSYS: |
---|
731 | |
---|
732 | @example |
---|
733 | dd [operands ...] |
---|
734 | @end example |
---|
735 | |
---|
736 | @subheading DESCRIPTION: |
---|
737 | |
---|
738 | The dd utility copies the standard input to the standard output. |
---|
739 | Input data is read and written in 512-byte blocks. If input reads are |
---|
740 | short, input from multiple reads are aggregated to form the output |
---|
741 | block. When finished, dd displays the number of complete and partial |
---|
742 | input and output blocks and truncated input records to the standard |
---|
743 | error output. |
---|
744 | |
---|
745 | The following operands are available: |
---|
746 | |
---|
747 | @table @b |
---|
748 | @item bs=n |
---|
749 | Set both input and output block size, superseding the ibs and obs |
---|
750 | operands. If no conversion values other than noerror, notrunc or sync |
---|
751 | are specified, then each input block is copied to the output as a |
---|
752 | single block without any aggregation of short blocks. |
---|
753 | |
---|
754 | @item cbs=n |
---|
755 | Set the conversion record size to n bytes. The conversion record size |
---|
756 | is required by the record oriented conversion values. |
---|
757 | |
---|
758 | @item count=n |
---|
759 | Copy only n input blocks. |
---|
760 | |
---|
761 | @item files=n |
---|
762 | Copy n input files before terminating. This operand is only |
---|
763 | applicable when the input device is a tape. |
---|
764 | |
---|
765 | @item ibs=n |
---|
766 | Set the input block size to n bytes instead of the default 512. |
---|
767 | |
---|
768 | @item if=file |
---|
769 | Read input from file instead of the standard input. |
---|
770 | |
---|
771 | @item obs=n |
---|
772 | Set the output block size to n bytes instead of the default 512. |
---|
773 | |
---|
774 | @item of=file |
---|
775 | Write output to file instead of the standard output. Any regular |
---|
776 | output file is truncated unless the notrunc conversion value is |
---|
777 | specified. If an initial portion of the output file is skipped (see |
---|
778 | the seek operand) the output file is truncated at that point. |
---|
779 | |
---|
780 | @item seek=n |
---|
781 | Seek n blocks from the beginning of the output before copying. On |
---|
782 | non-tape devices, a @i{lseek} operation is used. Otherwise, existing |
---|
783 | blocks are read and the data discarded. If the seek operation is past |
---|
784 | the end of file, space from the current end of file to the specified |
---|
785 | offset is filled with blocks of NUL bytes. |
---|
786 | |
---|
787 | @item skip=n |
---|
788 | Skip n blocks from the beginning of the input before copying. On |
---|
789 | input which supports seeks, a @i{lseek} operation is used. Otherwise, |
---|
790 | input data is read and discarded. For pipes, the correct number of |
---|
791 | bytes is read. For all other devices, the correct number of blocks is |
---|
792 | read without distinguishing between a partial or complete block being |
---|
793 | read. |
---|
794 | |
---|
795 | @item progress=n |
---|
796 | Switch on display of progress if n is set to any non-zero value. This |
---|
797 | will cause a ``.'' to be printed (to the standard error output) for |
---|
798 | every n full or partial blocks written to the output file. |
---|
799 | |
---|
800 | @item conv=value[,value...] |
---|
801 | Where value is one of the symbols from the following list. |
---|
802 | |
---|
803 | @table @b |
---|
804 | @item ascii, oldascii |
---|
805 | The same as the unblock value except that characters are translated |
---|
806 | from EBCDIC to ASCII before the records are converted. (These values |
---|
807 | imply unblock if the operand cbs is also specified.) There are two |
---|
808 | conversion maps for ASCII. The value ascii specifies the recom- |
---|
809 | mended one which is compatible with AT&T System V UNIX. The value |
---|
810 | oldascii specifies the one used in historic AT&T and pre 4.3BSD-Reno |
---|
811 | systems. |
---|
812 | |
---|
813 | @item block |
---|
814 | Treats the input as a sequence of newline or end-of-file terminated |
---|
815 | variable length records independent of input and output block |
---|
816 | boundaries. Any trailing newline character is discarded. Each |
---|
817 | input record is converted to a fixed length output record where the |
---|
818 | length is specified by the cbs operand. Input records shorter than |
---|
819 | the conversion record size are padded with spaces. Input records |
---|
820 | longer than the conversion record size are truncated. The number of |
---|
821 | truncated input records, if any, are reported to the standard error |
---|
822 | output at the completion of the copy. |
---|
823 | |
---|
824 | @item ebcdic, ibm, oldebcdic, oldibm |
---|
825 | The same as the block value except that characters are translated from |
---|
826 | ASCII to EBCDIC after the records are converted. (These values imply |
---|
827 | block if the operand cbs is also specified.) There are four |
---|
828 | conversion maps for EBCDIC. The value ebcdic specifies the |
---|
829 | recommended one which is compatible with AT&T System V UNIX. The |
---|
830 | value ibm is a slightly different mapping, which is compatible with |
---|
831 | the AT&T System V UNIX ibm value. The values oldebcdic and oldibm are |
---|
832 | maps used in historic AT&T and pre 4.3BSD-Reno systems. |
---|
833 | |
---|
834 | @item lcase |
---|
835 | Transform uppercase characters into lowercase characters. |
---|
836 | |
---|
837 | @item noerror |
---|
838 | Do not stop processing on an input error. When an input error occurs, |
---|
839 | a diagnostic message followed by the current input and output block |
---|
840 | counts will be written to the standard error output in the same format |
---|
841 | as the standard completion message. If the sync conversion is also |
---|
842 | specified, any missing input data will be replaced with NUL bytes (or |
---|
843 | with spaces if a block oriented conversion value was specified) and |
---|
844 | processed as a normal input buffer. If the sync conversion is not |
---|
845 | specified, the input block is omitted from the output. On input files |
---|
846 | which are not tapes or pipes, the file offset will be positioned past |
---|
847 | the block in which the error occurred using lseek(2). |
---|
848 | |
---|
849 | @item notrunc |
---|
850 | Do not truncate the output file. This will preserve any blocks in the |
---|
851 | output file not explicitly written by dd. The notrunc value is not |
---|
852 | supported for tapes. |
---|
853 | |
---|
854 | @item osync |
---|
855 | Pad the final output block to the full output block size. If the |
---|
856 | input file is not a multiple of the output block size after |
---|
857 | conversion, this conversion forces the final output block to be the |
---|
858 | same size as preceding blocks for use on devices that require |
---|
859 | regularly sized blocks to be written. This option is incompatible |
---|
860 | with use of the bs=n block size specification. |
---|
861 | |
---|
862 | @item sparse |
---|
863 | If one or more non-final output blocks would consist solely of NUL |
---|
864 | bytes, try to seek the output file by the required space instead of |
---|
865 | filling them with NULs. This results in a sparse file on some file |
---|
866 | systems. |
---|
867 | |
---|
868 | @item swab |
---|
869 | Swap every pair of input bytes. If an input buffer has an odd number |
---|
870 | of bytes, the last byte will be ignored during swapping. |
---|
871 | |
---|
872 | @item sync |
---|
873 | Pad every input block to the input buffer size. Spaces are used for |
---|
874 | pad bytes if a block oriented conversion value is specified, otherwise |
---|
875 | NUL bytes are used. |
---|
876 | |
---|
877 | @item ucase |
---|
878 | Transform lowercase characters into uppercase characters. |
---|
879 | |
---|
880 | @item unblock |
---|
881 | Treats the input as a sequence of fixed length records independent of |
---|
882 | input and output block boundaries. The length of the input records is |
---|
883 | specified by the cbs operand. Any trailing space characters are |
---|
884 | discarded and a newline character is appended. |
---|
885 | @end table |
---|
886 | @end table |
---|
887 | |
---|
888 | Where sizes are specified, a decimal number of bytes is expected. Two |
---|
889 | or more numbers may be separated by an ``x'' to indicate a product. |
---|
890 | Each number may have one of the following optional suffixes: |
---|
891 | @table @b |
---|
892 | @item b |
---|
893 | Block; multiply by 512 |
---|
894 | @item k |
---|
895 | Kibi; multiply by 1024 (1 KiB) |
---|
896 | @item m |
---|
897 | Mebi; multiply by 1048576 (1 MiB) |
---|
898 | @item g |
---|
899 | Gibi; multiply by 1073741824 (1 GiB) |
---|
900 | @item t |
---|
901 | Tebi; multiply by 1099511627776 (1 TiB) |
---|
902 | @item w |
---|
903 | Word; multiply by the number of bytes in an integer |
---|
904 | @end table |
---|
905 | |
---|
906 | When finished, dd displays the number of complete and partial input |
---|
907 | and output blocks, truncated input records and odd-length |
---|
908 | byte-swapping ritten. Partial output blocks to tape devices are |
---|
909 | considered fatal errors. Otherwise, the rest of the block will be |
---|
910 | written. Partial output blocks to character devices will produce a |
---|
911 | warning message. A truncated input block is one where a variable |
---|
912 | length record oriented conversion value was specified and the input |
---|
913 | line was too long to fit in the conversion record or was not newline |
---|
914 | terminated. |
---|
915 | |
---|
916 | Normally, data resulting from input or conversion or both are |
---|
917 | aggregated into output blocks of the specified size. After the end of |
---|
918 | input is reached, any remaining output is written as a block. This |
---|
919 | means that the final output block may be shorter than the output block |
---|
920 | size. |
---|
921 | |
---|
922 | @subheading EXIT STATUS: |
---|
923 | |
---|
924 | This command returns 0 on success and non-zero if an error is encountered. |
---|
925 | |
---|
926 | @subheading NOTES: |
---|
927 | |
---|
928 | NONE |
---|
929 | |
---|
930 | @subheading EXAMPLES: |
---|
931 | |
---|
932 | The following is an example of how to use @code{dd}: |
---|
933 | |
---|
934 | @example |
---|
935 | SHLL [/] $ dd if=/nfs/boot-image of=/dev/hda1 |
---|
936 | @end example |
---|
937 | |
---|
938 | @subheading CONFIGURATION: |
---|
939 | |
---|
940 | @findex CONFIGURE_SHELL_NO_COMMAND_DD |
---|
941 | @findex CONFIGURE_SHELL_COMMAND_DD |
---|
942 | |
---|
943 | This command is included in the default shell command set. When |
---|
944 | building a custom command set, define |
---|
945 | @code{CONFIGURE_SHELL_COMMAND_DD} to have this command included. |
---|
946 | |
---|
947 | This command can be excluded from the shell command set by defining |
---|
948 | @code{CONFIGURE_SHELL_NO_COMMAND_DD} when all shell commands have been |
---|
949 | configured. |
---|
950 | |
---|
951 | @subheading PROGRAMMING INFORMATION: |
---|
952 | |
---|
953 | @findex rtems_shell_rtems_main_dd |
---|
954 | |
---|
955 | The @code{dd} command is implemented by a C language function which |
---|
956 | has the following prototype: |
---|
957 | |
---|
958 | @example |
---|
959 | int rtems_shell_rtems_main_dd( |
---|
960 | int argc, |
---|
961 | char **argv |
---|
962 | ); |
---|
963 | @end example |
---|
964 | |
---|
965 | The configuration structure for the @code{dd} has the following |
---|
966 | prototype: |
---|
967 | |
---|
968 | @example |
---|
969 | extern rtems_shell_cmd_t rtems_shell_DD_Command; |
---|
970 | @end example |
---|
971 | |
---|
972 | @c |
---|
973 | @c |
---|
974 | @c |
---|
975 | @page |
---|
976 | @subsection debugrfs - debug RFS file system |
---|
977 | |
---|
978 | @pgindex debugrfs |
---|
979 | |
---|
980 | @subheading SYNOPSYS: |
---|
981 | |
---|
982 | @example |
---|
983 | debugrfs [-hl] path command [options] |
---|
984 | @end example |
---|
985 | |
---|
986 | @subheading DESCRIPTION: |
---|
987 | |
---|
988 | The command provides debugging information for the RFS file system. |
---|
989 | |
---|
990 | The options are: |
---|
991 | |
---|
992 | @table @b |
---|
993 | @item -h |
---|
994 | Print a help message. |
---|
995 | |
---|
996 | @item -l |
---|
997 | List the commands. |
---|
998 | |
---|
999 | @item path |
---|
1000 | Path to the mounted RFS file system. The file system has to be mounted |
---|
1001 | to view to use this command. |
---|
1002 | @end table |
---|
1003 | |
---|
1004 | The commands are: |
---|
1005 | |
---|
1006 | @table @b |
---|
1007 | @item block start [end] |
---|
1008 | Display the contents of the blocks from start to end. |
---|
1009 | |
---|
1010 | @item data |
---|
1011 | Display the file system data and configuration. |
---|
1012 | |
---|
1013 | @item dir bno |
---|
1014 | Process the block as a directory displaying the entries. |
---|
1015 | |
---|
1016 | @item group start [end] |
---|
1017 | Display the group data from the start group to the end group. |
---|
1018 | |
---|
1019 | @item inode [-aef] [start] [end] |
---|
1020 | Display the inodes between start and end. If no start and end is |
---|
1021 | provides all inodes are displayed. |
---|
1022 | |
---|
1023 | @table @b |
---|
1024 | @item -a |
---|
1025 | Display all inodes. That is allocated and unallocated inodes. |
---|
1026 | @item -e |
---|
1027 | Search and display on inodes that have an error. |
---|
1028 | @item -f |
---|
1029 | Force display of inodes, even when in error. |
---|
1030 | @end table |
---|
1031 | @end table |
---|
1032 | |
---|
1033 | @subheading EXIT STATUS: |
---|
1034 | |
---|
1035 | This command returns 0 on success and non-zero if an error is encountered. |
---|
1036 | |
---|
1037 | @subheading NOTES: |
---|
1038 | |
---|
1039 | NONE |
---|
1040 | |
---|
1041 | @subheading EXAMPLES: |
---|
1042 | |
---|
1043 | The following is an example of how to use @code{debugrfs}: |
---|
1044 | |
---|
1045 | @example |
---|
1046 | SHLL [/] $ debugrfs /c data |
---|
1047 | @end example |
---|
1048 | |
---|
1049 | @subheading CONFIGURATION: |
---|
1050 | |
---|
1051 | @findex CONFIGURE_SHELL_NO_COMMAND_DEBUGRFS |
---|
1052 | @findex CONFIGURE_SHELL_COMMAND_DEBUGRFS |
---|
1053 | |
---|
1054 | This command is included in the default shell command set. |
---|
1055 | When building a custom command set, define |
---|
1056 | @code{CONFIGURE_SHELL_COMMAND_DEBUGRFS} to have this |
---|
1057 | command included. |
---|
1058 | |
---|
1059 | This command can be excluded from the shell command set by |
---|
1060 | defining @code{CONFIGURE_SHELL_NO_COMMAND_DEBUGRFS} when all |
---|
1061 | shell commands have been configured. |
---|
1062 | |
---|
1063 | @subheading PROGRAMMING INFORMATION: |
---|
1064 | |
---|
1065 | @findex rtems_shell_rtems_main_debugrfs |
---|
1066 | |
---|
1067 | The @code{debugrfs} command is implemented by a C language function which |
---|
1068 | has the following prototype: |
---|
1069 | |
---|
1070 | @example |
---|
1071 | int rtems_shell_rtems_main_debugrfs( |
---|
1072 | int argc, |
---|
1073 | char **argv |
---|
1074 | ); |
---|
1075 | @end example |
---|
1076 | |
---|
1077 | The configuration structure for @code{debugrfs} has the following |
---|
1078 | prototype: |
---|
1079 | |
---|
1080 | @example |
---|
1081 | extern rtems_shell_cmd_t rtems_shell_DEBUGRFS_Command; |
---|
1082 | @end example |
---|
1083 | |
---|
1084 | @c |
---|
1085 | @c |
---|
1086 | @c |
---|
1087 | @page |
---|
1088 | @subsection df - display file system disk space usage |
---|
1089 | |
---|
1090 | @pgindex df |
---|
1091 | |
---|
1092 | @subheading SYNOPSYS: |
---|
1093 | |
---|
1094 | @example |
---|
1095 | df [-h] [-B block_size] |
---|
1096 | @end example |
---|
1097 | |
---|
1098 | @subheading DESCRIPTION: |
---|
1099 | |
---|
1100 | This command print disk space usage for mounted file systems. |
---|
1101 | |
---|
1102 | @subheading EXIT STATUS: |
---|
1103 | |
---|
1104 | This command returns 0 on success and non-zero if an error is encountered. |
---|
1105 | |
---|
1106 | @subheading NOTES: |
---|
1107 | |
---|
1108 | NONE |
---|
1109 | |
---|
1110 | @subheading EXAMPLES: |
---|
1111 | |
---|
1112 | The following is an example of how to use @code{df}: |
---|
1113 | |
---|
1114 | @example |
---|
1115 | SHLL [/] $ df -B 4K |
---|
1116 | Filesystem 4K-blocks Used Available Use% Mounted on |
---|
1117 | /dev/rda 124 1 124 0% /mnt/ramdisk |
---|
1118 | SHLL [/] $ df |
---|
1119 | Filesystem 1K-blocks Used Available Use% Mounted on |
---|
1120 | /dev/rda 495 1 494 0% /mnt/ramdisk |
---|
1121 | SHLL [/] $ df -h |
---|
1122 | Filesystem Size Used Available Use% Mounted on |
---|
1123 | /dev/rda 495K 1K 494K 0% /mnt/ramdisk |
---|
1124 | @end example |
---|
1125 | |
---|
1126 | @subheading CONFIGURATION: |
---|
1127 | |
---|
1128 | @findex CONFIGURE_SHELL_NO_COMMAND_DF |
---|
1129 | @findex CONFIGURE_SHELL_COMMAND_DF |
---|
1130 | |
---|
1131 | This command is included in the default shell command set. |
---|
1132 | When building a custom command set, define |
---|
1133 | @code{CONFIGURE_SHELL_COMMAND_DF} to have this |
---|
1134 | command included. |
---|
1135 | |
---|
1136 | This command can be excluded from the shell command set by |
---|
1137 | defining @code{CONFIGURE_SHELL_NO_COMMAND_DF} when all |
---|
1138 | shell commands have been configured. |
---|
1139 | |
---|
1140 | @subheading PROGRAMMING INFORMATION: |
---|
1141 | |
---|
1142 | @findex rtems_shell_rtems_main_df |
---|
1143 | |
---|
1144 | The @code{df} is implemented by a C language function |
---|
1145 | which has the following prototype: |
---|
1146 | |
---|
1147 | @example |
---|
1148 | int rtems_shell_main_df( |
---|
1149 | int argc, |
---|
1150 | char **argv |
---|
1151 | ); |
---|
1152 | @end example |
---|
1153 | |
---|
1154 | The configuration structure for the @code{df} has the |
---|
1155 | following prototype: |
---|
1156 | |
---|
1157 | @example |
---|
1158 | extern rtems_shell_cmd_t rtems_shell_DF_Command; |
---|
1159 | @end example |
---|
1160 | |
---|
1161 | @c |
---|
1162 | @c |
---|
1163 | @c |
---|
1164 | @page |
---|
1165 | @subsection dir - alias for ls |
---|
1166 | |
---|
1167 | @pgindex dir |
---|
1168 | |
---|
1169 | @subheading SYNOPSYS: |
---|
1170 | |
---|
1171 | @example |
---|
1172 | dir [dir] |
---|
1173 | @end example |
---|
1174 | |
---|
1175 | @subheading DESCRIPTION: |
---|
1176 | |
---|
1177 | This command is an alias or alternate name for the @code{ls}. |
---|
1178 | See @ref{File and Directory Commands ls - list files in the directory, ls} |
---|
1179 | for more information. |
---|
1180 | |
---|
1181 | @subheading EXIT STATUS: |
---|
1182 | |
---|
1183 | This command returns 0 on success and non-zero if an error is encountered. |
---|
1184 | |
---|
1185 | @subheading NOTES: |
---|
1186 | |
---|
1187 | NONE |
---|
1188 | |
---|
1189 | @subheading EXAMPLES: |
---|
1190 | |
---|
1191 | The following is an example of how to use @code{dir}: |
---|
1192 | |
---|
1193 | @example |
---|
1194 | SHLL [/] $ dir |
---|
1195 | drwxr-xr-x 1 root root 536 Jan 01 00:00 dev/ |
---|
1196 | drwxr-xr-x 1 root root 1072 Jan 01 00:00 etc/ |
---|
1197 | 2 files 1608 bytes occupied |
---|
1198 | SHLL [/] $ dir etc |
---|
1199 | -rw-r--r-- 1 root root 102 Jan 01 00:00 passwd |
---|
1200 | -rw-r--r-- 1 root root 42 Jan 01 00:00 group |
---|
1201 | -rw-r--r-- 1 root root 30 Jan 01 00:00 issue |
---|
1202 | -rw-r--r-- 1 root root 28 Jan 01 00:00 issue.net |
---|
1203 | 4 files 202 bytes occupied |
---|
1204 | @end example |
---|
1205 | |
---|
1206 | @subheading CONFIGURATION: |
---|
1207 | |
---|
1208 | @findex CONFIGURE_SHELL_NO_COMMAND_DIR |
---|
1209 | @findex CONFIGURE_SHELL_COMMAND_DIR |
---|
1210 | |
---|
1211 | This command is included in the default shell command set. |
---|
1212 | When building a custom command set, define |
---|
1213 | @code{CONFIGURE_SHELL_COMMAND_DIR} to have this |
---|
1214 | command included. |
---|
1215 | |
---|
1216 | This command can be excluded from the shell command set by |
---|
1217 | defining @code{CONFIGURE_SHELL_NO_COMMAND_DIR} when all |
---|
1218 | shell commands have been configured. |
---|
1219 | |
---|
1220 | @subheading PROGRAMMING INFORMATION: |
---|
1221 | |
---|
1222 | @findex rtems_shell_rtems_main_dir |
---|
1223 | |
---|
1224 | The @code{dir} is implemented by a C language function |
---|
1225 | which has the following prototype: |
---|
1226 | |
---|
1227 | @example |
---|
1228 | int rtems_shell_rtems_main_dir( |
---|
1229 | int argc, |
---|
1230 | char **argv |
---|
1231 | ); |
---|
1232 | @end example |
---|
1233 | |
---|
1234 | The configuration structure for the @code{dir} has the |
---|
1235 | following prototype: |
---|
1236 | |
---|
1237 | @example |
---|
1238 | extern rtems_shell_cmd_t rtems_shell_DIR_Command; |
---|
1239 | @end example |
---|
1240 | |
---|
1241 | @c |
---|
1242 | @c |
---|
1243 | @c |
---|
1244 | @page |
---|
1245 | @subsection fdisk - format disk |
---|
1246 | |
---|
1247 | @pgindex fdisk |
---|
1248 | |
---|
1249 | @subheading SYNOPSYS: |
---|
1250 | |
---|
1251 | @example |
---|
1252 | fdisk |
---|
1253 | @end example |
---|
1254 | |
---|
1255 | @subheading CONFIGURATION: |
---|
1256 | |
---|
1257 | @findex CONFIGURE_SHELL_NO_COMMAND_FDISK |
---|
1258 | @findex CONFIGURE_SHELL_COMMAND_FDISK |
---|
1259 | |
---|
1260 | This command is included in the default shell command set. |
---|
1261 | When building a custom command set, define |
---|
1262 | @code{CONFIGURE_SHELL_COMMAND_FDISK} to have this |
---|
1263 | command included. |
---|
1264 | |
---|
1265 | This command can be excluded from the shell command set by |
---|
1266 | defining @code{CONFIGURE_SHELL_NO_COMMAND_FDISK} when all |
---|
1267 | shell commands have been configured. |
---|
1268 | |
---|
1269 | @c |
---|
1270 | @c |
---|
1271 | @c |
---|
1272 | @page |
---|
1273 | @subsection hexdump - ascii/dec/hex/octal dump |
---|
1274 | |
---|
1275 | @pgindex hexdump |
---|
1276 | |
---|
1277 | @subheading SYNOPSYS: |
---|
1278 | |
---|
1279 | @example |
---|
1280 | hexdump [-bcCdovx] [-e format_string] [-f format_file] [-n length] |
---|
1281 | [-s skip] file ... |
---|
1282 | @end example |
---|
1283 | |
---|
1284 | @subheading DESCRIPTION: |
---|
1285 | |
---|
1286 | The hexdump utility is a filter which displays the specified files, or |
---|
1287 | the standard input, if no files are specified, in a user specified |
---|
1288 | format. |
---|
1289 | |
---|
1290 | The options are as follows: |
---|
1291 | |
---|
1292 | @table @b |
---|
1293 | @item -b |
---|
1294 | One-byte octal display. Display the input offset in hexadecimal, |
---|
1295 | followed by sixteen space-separated, three column, zero-filled, bytes |
---|
1296 | of input data, in octal, per line. |
---|
1297 | |
---|
1298 | @item -c |
---|
1299 | One-byte character display. Display the input offset in hexadecimal, |
---|
1300 | followed by sixteen space-separated, three column, space-filled, |
---|
1301 | characters of input data per line. |
---|
1302 | |
---|
1303 | @item -C |
---|
1304 | Canonical hex+ASCII display. Display the input offset in hexadecimal, |
---|
1305 | followed by sixteen space-separated, two column, hexadecimal bytes, |
---|
1306 | followed by the same sixteen bytes in %_p format enclosed in ``|'' |
---|
1307 | characters. |
---|
1308 | |
---|
1309 | @item -d |
---|
1310 | Two-byte decimal display. Display the input offset in hexadecimal, |
---|
1311 | followed by eight space-separated, five column, zero-filled, two-byte |
---|
1312 | units of input data, in unsigned decimal, per line. |
---|
1313 | |
---|
1314 | @item -e format_string |
---|
1315 | Specify a format string to be used for displaying data. |
---|
1316 | |
---|
1317 | @item -f format_file |
---|
1318 | Specify a file that contains one or more newline separated format |
---|
1319 | strings. Empty lines and lines whose first non-blank character is a |
---|
1320 | hash mark (#) are ignored. |
---|
1321 | |
---|
1322 | @item -n length |
---|
1323 | Interpret only length bytes of input. |
---|
1324 | |
---|
1325 | @item -o |
---|
1326 | Two-byte octal display. Display the input offset in hexadecimal, |
---|
1327 | followed by eight space-separated, six column, zerofilled, two byte |
---|
1328 | quantities of input data, in octal, per line. |
---|
1329 | |
---|
1330 | @item -s offset |
---|
1331 | Skip offset bytes from the beginning of the input. By default, offset |
---|
1332 | is interpreted as a decimal number. With a leading 0x or 0X, offset |
---|
1333 | is interpreted as a hexadecimal number, otherwise, with a leading 0, |
---|
1334 | offset is interpreted as an octal number. Appending the character b, |
---|
1335 | k, or m to offset causes it to be interpreted as a multiple of 512, |
---|
1336 | 1024, or 1048576, respectively. |
---|
1337 | |
---|
1338 | @item -v |
---|
1339 | The -v option causes hexdump to display all input data. Without the |
---|
1340 | -v option, any number of groups of output lines, which would be |
---|
1341 | identical to the immediately preceding group of output lines (except |
---|
1342 | for the input offsets), are replaced with a line containing a single |
---|
1343 | asterisk. |
---|
1344 | |
---|
1345 | @item -x |
---|
1346 | Two-byte hexadecimal display. Display the input offset in |
---|
1347 | hexadecimal, followed by eight, space separated, four column, |
---|
1348 | zero-filled, two-byte quantities of input data, in hexadecimal, per |
---|
1349 | line. |
---|
1350 | @end table |
---|
1351 | |
---|
1352 | For each input file, hexdump sequentially copies the input to standard |
---|
1353 | output, transforming the data according to the format strings |
---|
1354 | specified by the -e and -f options, in the order that they were |
---|
1355 | specified. |
---|
1356 | |
---|
1357 | @b{Formats} |
---|
1358 | |
---|
1359 | A format string contains any number of format units, separated by |
---|
1360 | whitespace. A format unit contains up to three items: an iteration |
---|
1361 | count, a byte count, and a format. |
---|
1362 | |
---|
1363 | The iteration count is an optional positive integer, which defaults to |
---|
1364 | one. Each format is applied iteration count times. |
---|
1365 | |
---|
1366 | The byte count is an optional positive integer. If specified it |
---|
1367 | defines the number of bytes to be interpreted by each iteration of the |
---|
1368 | format. |
---|
1369 | |
---|
1370 | If an iteration count and/or a byte count is specified, a single slash |
---|
1371 | must be placed after the iteration count and/or before the byte count |
---|
1372 | to disambiguate them. Any whitespace before or after the slash is |
---|
1373 | ignored. |
---|
1374 | |
---|
1375 | The format is required and must be surrounded by double quote (`` ``) |
---|
1376 | marks. It is interpreted as a fprintf-style format string (see |
---|
1377 | @i{fprintf}), with the following exceptions: |
---|
1378 | |
---|
1379 | @itemize @bullet |
---|
1380 | @item |
---|
1381 | An asterisk (*) may not be used as a field width or precision. |
---|
1382 | @item |
---|
1383 | A byte count or field precision is required for each ``s'' con- |
---|
1384 | version character (unlike the fprintf(3) default which prints the |
---|
1385 | entire string if the precision is unspecified). |
---|
1386 | @item |
---|
1387 | The conversion characters ``h'', ``l'', ``n'', ``p'' and ``q'' are not |
---|
1388 | supported. |
---|
1389 | @item |
---|
1390 | The single character escape sequences described in the C standard |
---|
1391 | are supported: |
---|
1392 | @quotation |
---|
1393 | NUL \0 |
---|
1394 | <alert character> \a |
---|
1395 | <backspace> \b |
---|
1396 | <form-feed> \f |
---|
1397 | <newline> \n |
---|
1398 | <carriage return> \r |
---|
1399 | <tab> \t |
---|
1400 | <vertical tab> \v |
---|
1401 | @end quotation |
---|
1402 | @end itemize |
---|
1403 | |
---|
1404 | Hexdump also supports the following additional conversion strings: |
---|
1405 | |
---|
1406 | @table @b |
---|
1407 | @item _a[dox] |
---|
1408 | Display the input offset, cumulative across input files, of the next |
---|
1409 | byte to be displayed. The appended characters d, o, and x specify the |
---|
1410 | display base as decimal, octal or hexadecimal respectively. |
---|
1411 | |
---|
1412 | @item _A[dox] |
---|
1413 | Identical to the _a conversion string except that it is only performed |
---|
1414 | once, when all of the input data has been processed. |
---|
1415 | |
---|
1416 | @item _c |
---|
1417 | Output characters in the default character set. Nonprinting |
---|
1418 | characters are displayed in three character, zero-padded octal, except |
---|
1419 | for those representable by standard escape notation (see above), which |
---|
1420 | are displayed as two character strings. |
---|
1421 | |
---|
1422 | @item _p |
---|
1423 | Output characters in the default character set. Nonprinting |
---|
1424 | characters are displayed as a single ``.''. |
---|
1425 | |
---|
1426 | @item _u |
---|
1427 | Output US ASCII characters, with the exception that control characters |
---|
1428 | are displayed using the following, lower-case, names. Characters |
---|
1429 | greater than 0xff, hexadecimal, are displayed as hexadecimal |
---|
1430 | strings. |
---|
1431 | |
---|
1432 | 000 nul 001 soh 002 stx 003 etx 004 eot 005 enq |
---|
1433 | 006 ack 007 bel 008 bs 009 ht 00A lf 00B vt |
---|
1434 | 00C ff 00D cr 00E so 00F si 010 dle 011 dc1 |
---|
1435 | 012 dc2 013 dc3 014 dc4 015 nak 016 syn 017 etb |
---|
1436 | 018 can 019 em 01A sub 01B esc 01C fs 01D gs |
---|
1437 | 01E rs 01F us 07F del |
---|
1438 | @end table |
---|
1439 | |
---|
1440 | The default and supported byte counts for the conversion characters |
---|
1441 | are as follows: |
---|
1442 | |
---|
1443 | @quotation |
---|
1444 | %_c, %_p, %_u, %c One byte counts only. |
---|
1445 | |
---|
1446 | %d, %i, %o, %u, %X, %x Four byte default, one, two, four |
---|
1447 | and eight byte counts supported. |
---|
1448 | |
---|
1449 | %E, %e, %f, %G, %g Eight byte default, four byte |
---|
1450 | counts supported. |
---|
1451 | @end quotation |
---|
1452 | |
---|
1453 | The amount of data interpreted by each format string is the sum of the |
---|
1454 | data required by each format unit, which is the iteration count times |
---|
1455 | the byte count, or the iteration count times the number of bytes |
---|
1456 | required by the format if the byte count is not specified. |
---|
1457 | |
---|
1458 | The input is manipulated in ``blocks'', where a block is defined as |
---|
1459 | the largest amount of data specified by any format string. Format |
---|
1460 | strings interpreting less than an input block's worth of data, whose |
---|
1461 | last format unit both interprets some number of bytes and does not |
---|
1462 | have a specified iteration count, have the iteration count incremented |
---|
1463 | until the entire input block has been processed or there is not enough |
---|
1464 | data remaining in the block to satisfy the format string. |
---|
1465 | |
---|
1466 | If, either as a result of user specification or hexdump modifying the |
---|
1467 | iteration count as described above, an iteration count is greater than |
---|
1468 | one, no trailing whitespace characters are output during the last |
---|
1469 | iteration. |
---|
1470 | |
---|
1471 | It is an error to specify a byte count as well as multiple conversion |
---|
1472 | characters or strings unless all but one of the conversion characters |
---|
1473 | or strings is _a or _A. |
---|
1474 | |
---|
1475 | If, as a result of the specification of the -n option or end-of-file |
---|
1476 | being reached, input data only partially satisfies a format string, |
---|
1477 | the input block is zero-padded sufficiently to display all available |
---|
1478 | data (i.e. any format units overlapping the end of data will display |
---|
1479 | some num- ber of the zero bytes). |
---|
1480 | |
---|
1481 | Further output by such format strings is replaced by an equivalent |
---|
1482 | number of spaces. An equivalent number of spaces is defined as the |
---|
1483 | number of spaces output by an s conversion character with the same |
---|
1484 | field width and precision as the original conversion character or |
---|
1485 | conversion string but with any ``+'', `` '', ``#'' conversion flag |
---|
1486 | characters removed, and ref- erencing a NULL string. |
---|
1487 | |
---|
1488 | If no format strings are specified, the default display is equivalent |
---|
1489 | to specifying the -x option. |
---|
1490 | |
---|
1491 | @subheading EXIT STATUS: |
---|
1492 | |
---|
1493 | This command returns 0 on success and non-zero if an error is encountered. |
---|
1494 | |
---|
1495 | @subheading NOTES: |
---|
1496 | |
---|
1497 | NONE |
---|
1498 | |
---|
1499 | @subheading EXAMPLES: |
---|
1500 | |
---|
1501 | The following is an example of how to use @code{hexdump}: |
---|
1502 | |
---|
1503 | @example |
---|
1504 | SHLL [/] $ hexdump -C -n 512 /dev/hda1 |
---|
1505 | @end example |
---|
1506 | |
---|
1507 | @subheading CONFIGURATION: |
---|
1508 | |
---|
1509 | @findex CONFIGURE_SHELL_NO_COMMAND_HEXDUMP |
---|
1510 | @findex CONFIGURE_SHELL_COMMAND_HEXDUMP |
---|
1511 | |
---|
1512 | This command is included in the default shell command set. When |
---|
1513 | building a custom command set, define |
---|
1514 | @code{CONFIGURE_SHELL_COMMAND_HEXDUMP} to have this command included. |
---|
1515 | |
---|
1516 | This command can be excluded from the shell command set by defining |
---|
1517 | @code{CONFIGURE_SHELL_NO_COMMAND_HEXDUMP} when all shell commands have |
---|
1518 | been configured. |
---|
1519 | |
---|
1520 | @subheading PROGRAMMING INFORMATION: |
---|
1521 | |
---|
1522 | @findex rtems_shell_rtems_main_hexdump |
---|
1523 | |
---|
1524 | The @code{hexdump} command is implemented by a C language function |
---|
1525 | which has the following prototype: |
---|
1526 | |
---|
1527 | @example |
---|
1528 | int rtems_shell_rtems_main_hexdump( |
---|
1529 | int argc, |
---|
1530 | char **argv |
---|
1531 | ); |
---|
1532 | @end example |
---|
1533 | |
---|
1534 | The configuration structure for the @code{hexdump} has the following |
---|
1535 | prototype: |
---|
1536 | |
---|
1537 | @example |
---|
1538 | extern rtems_shell_cmd_t rtems_shell_HEXDUMP_Command; |
---|
1539 | @end example |
---|
1540 | |
---|
1541 | @c |
---|
1542 | @c |
---|
1543 | @c |
---|
1544 | @page |
---|
1545 | @subsection ln - make links |
---|
1546 | |
---|
1547 | @pgindex ln |
---|
1548 | |
---|
1549 | @subheading SYNOPSYS: |
---|
1550 | |
---|
1551 | @example |
---|
1552 | ln [-fhinsv] source_file [target_file] |
---|
1553 | ln [-fhinsv] source_file ... target_dir |
---|
1554 | @end example |
---|
1555 | |
---|
1556 | @subheading DESCRIPTION: |
---|
1557 | |
---|
1558 | The ln utility creates a new directory entry (linked file) which has |
---|
1559 | the same modes as the original file. It is useful for maintaining |
---|
1560 | multiple copies of a file in many places at once without using up |
---|
1561 | storage for the ``copies''; instead, a link ``points'' to the original |
---|
1562 | copy. There are two types of links; hard links and symbolic links. |
---|
1563 | How a link ``points'' to a file is one of the differences between a |
---|
1564 | hard or symbolic link. |
---|
1565 | |
---|
1566 | The options are as follows: |
---|
1567 | @table @b |
---|
1568 | @item -f |
---|
1569 | Unlink any already existing file, permitting the link to occur. |
---|
1570 | |
---|
1571 | @item -h |
---|
1572 | If the target_file or target_dir is a symbolic link, do not follow it. |
---|
1573 | This is most useful with the -f option, to replace a symlink which may |
---|
1574 | point to a directory. |
---|
1575 | |
---|
1576 | @item -i |
---|
1577 | Cause ln to write a prompt to standard error if the target file |
---|
1578 | exists. If the response from the standard input begins with the |
---|
1579 | character `y' or `Y', then unlink the target file so that the link may |
---|
1580 | occur. Otherwise, do not attempt the link. (The -i option overrides |
---|
1581 | any previous -f options.) |
---|
1582 | |
---|
1583 | @item -n |
---|
1584 | Same as -h, for compatibility with other ln implementations. |
---|
1585 | |
---|
1586 | @item -s |
---|
1587 | Create a symbolic link. |
---|
1588 | |
---|
1589 | @item -v |
---|
1590 | Cause ln to be verbose, showing files as they are processed. |
---|
1591 | @end table |
---|
1592 | |
---|
1593 | By default ln makes hard links. A hard link to a file is |
---|
1594 | indistinguishable from the original directory entry; any changes to a |
---|
1595 | file are effective independent of the name used to reference the file. |
---|
1596 | Hard links may not normally refer to directories and may not span file |
---|
1597 | systems. |
---|
1598 | |
---|
1599 | A symbolic link contains the name of the file to which it is linked. |
---|
1600 | The referenced file is used when an @i{open} operation is performed on |
---|
1601 | the link. A @i{stat} on a symbolic link will return the linked-to |
---|
1602 | file; an @i{lstat} must be done to obtain information about the link. |
---|
1603 | The @i{readlink} call may be used to read the contents of a symbolic |
---|
1604 | link. Symbolic links may span file systems and may refer to |
---|
1605 | directories. |
---|
1606 | |
---|
1607 | Given one or two arguments, ln creates a link to an existing file |
---|
1608 | source_file. If target_file is given, the link has that name; |
---|
1609 | target_file may also be a directory in which to place the link; |
---|
1610 | otherwise it is placed in the current directory. If only the |
---|
1611 | directory is specified, the link will be made to the last component of |
---|
1612 | source_file. |
---|
1613 | |
---|
1614 | Given more than two arguments, ln makes links in target_dir to all the |
---|
1615 | named source files. The links made will have the same name as the |
---|
1616 | files being linked to. |
---|
1617 | |
---|
1618 | @subheading EXIT STATUS: |
---|
1619 | |
---|
1620 | The @code{ln} utility exits 0 on success, and >0 if an error occurs. |
---|
1621 | |
---|
1622 | @subheading NOTES: |
---|
1623 | |
---|
1624 | NONE |
---|
1625 | |
---|
1626 | @subheading EXAMPLES: |
---|
1627 | |
---|
1628 | @example |
---|
1629 | SHLL [/] ln -s /dev/console /dev/con1 |
---|
1630 | @end example |
---|
1631 | |
---|
1632 | @subheading CONFIGURATION: |
---|
1633 | |
---|
1634 | @findex CONFIGURE_SHELL_NO_COMMAND_LN |
---|
1635 | @findex CONFIGURE_SHELL_COMMAND_LN |
---|
1636 | |
---|
1637 | This command is included in the default shell command set. When |
---|
1638 | building a custom command set, define |
---|
1639 | @code{CONFIGURE_SHELL_COMMAND_LN} to have this command included. |
---|
1640 | |
---|
1641 | This command can be excluded from the shell command set by |
---|
1642 | defining @code{CONFIGURE_SHELL_NO_COMMAND_LN} when all |
---|
1643 | shell commands have been configured. |
---|
1644 | |
---|
1645 | @subheading PROGRAMMING INFORMATION: |
---|
1646 | |
---|
1647 | @findex rtems_shell_rtems_main_ln |
---|
1648 | |
---|
1649 | The @code{ln} command is implemented by a C language function which |
---|
1650 | has the following prototype: |
---|
1651 | |
---|
1652 | @example |
---|
1653 | int rtems_shell_rtems_main_ln( |
---|
1654 | int argc, |
---|
1655 | char **argv |
---|
1656 | ); |
---|
1657 | @end example |
---|
1658 | |
---|
1659 | The configuration structure for the @code{ln} has the following |
---|
1660 | prototype: |
---|
1661 | |
---|
1662 | @example |
---|
1663 | extern rtems_shell_cmd_t rtems_shell_LN_Command; |
---|
1664 | @end example |
---|
1665 | |
---|
1666 | @subheading ORIGIN: |
---|
1667 | |
---|
1668 | The implementation and portions of the documentation for this command |
---|
1669 | are from NetBSD 4.0. |
---|
1670 | |
---|
1671 | @c |
---|
1672 | @c |
---|
1673 | @c |
---|
1674 | @page |
---|
1675 | @subsection ls - list files in the directory |
---|
1676 | |
---|
1677 | @pgindex ls |
---|
1678 | |
---|
1679 | @subheading SYNOPSYS: |
---|
1680 | |
---|
1681 | @example |
---|
1682 | ls [dir] |
---|
1683 | @end example |
---|
1684 | |
---|
1685 | @subheading DESCRIPTION: |
---|
1686 | |
---|
1687 | This command displays the contents of the specified directory. If |
---|
1688 | no arguments are given, then it displays the contents of the current |
---|
1689 | working directory. |
---|
1690 | |
---|
1691 | @subheading EXIT STATUS: |
---|
1692 | |
---|
1693 | This command returns 0 on success and non-zero if an error is encountered. |
---|
1694 | |
---|
1695 | @subheading NOTES: |
---|
1696 | |
---|
1697 | This command currently does not display information on a set of |
---|
1698 | files like the POSIX ls(1). It only displays the contents of |
---|
1699 | entire directories. |
---|
1700 | |
---|
1701 | @subheading EXAMPLES: |
---|
1702 | |
---|
1703 | The following is an example of how to use @code{ls}: |
---|
1704 | |
---|
1705 | @example |
---|
1706 | SHLL [/] $ ls |
---|
1707 | drwxr-xr-x 1 root root 536 Jan 01 00:00 dev/ |
---|
1708 | drwxr-xr-x 1 root root 1072 Jan 01 00:00 etc/ |
---|
1709 | 2 files 1608 bytes occupied |
---|
1710 | SHLL [/] $ ls etc |
---|
1711 | -rw-r--r-- 1 root root 102 Jan 01 00:00 passwd |
---|
1712 | -rw-r--r-- 1 root root 42 Jan 01 00:00 group |
---|
1713 | -rw-r--r-- 1 root root 30 Jan 01 00:00 issue |
---|
1714 | -rw-r--r-- 1 root root 28 Jan 01 00:00 issue.net |
---|
1715 | 4 files 202 bytes occupied |
---|
1716 | SHLL [/] $ ls dev etc |
---|
1717 | -rwxr-xr-x 1 rtems root 0 Jan 01 00:00 console |
---|
1718 | -rwxr-xr-x 1 root root 0 Jan 01 00:00 console_b |
---|
1719 | @end example |
---|
1720 | |
---|
1721 | @subheading CONFIGURATION: |
---|
1722 | |
---|
1723 | @findex CONFIGURE_SHELL_NO_COMMAND_LS |
---|
1724 | @findex CONFIGURE_SHELL_COMMAND_LS |
---|
1725 | |
---|
1726 | This command is included in the default shell command set. |
---|
1727 | When building a custom command set, define |
---|
1728 | @code{CONFIGURE_SHELL_COMMAND_LS} to have this |
---|
1729 | command included. |
---|
1730 | |
---|
1731 | This command can be excluded from the shell command set by |
---|
1732 | defining @code{CONFIGURE_SHELL_NO_COMMAND_LS} when all |
---|
1733 | shell commands have been configured. |
---|
1734 | |
---|
1735 | @subheading PROGRAMMING INFORMATION: |
---|
1736 | |
---|
1737 | @findex rtems_shell_rtems_main_ls |
---|
1738 | |
---|
1739 | The @code{ls} is implemented by a C language function |
---|
1740 | which has the following prototype: |
---|
1741 | |
---|
1742 | @example |
---|
1743 | int rtems_shell_rtems_main_ls( |
---|
1744 | int argc, |
---|
1745 | char **argv |
---|
1746 | ); |
---|
1747 | @end example |
---|
1748 | |
---|
1749 | The configuration structure for the @code{ls} has the |
---|
1750 | following prototype: |
---|
1751 | |
---|
1752 | @example |
---|
1753 | extern rtems_shell_cmd_t rtems_shell_LS_Command; |
---|
1754 | @end example |
---|
1755 | |
---|
1756 | @c |
---|
1757 | @c |
---|
1758 | @c |
---|
1759 | @page |
---|
1760 | @subsection md5 - compute the Md5 hash of a file or list of files |
---|
1761 | |
---|
1762 | @pgindex md5 |
---|
1763 | |
---|
1764 | @subheading SYNOPSYS: |
---|
1765 | |
---|
1766 | @example |
---|
1767 | md5 <files> |
---|
1768 | @end example |
---|
1769 | |
---|
1770 | @subheading DESCRIPTION: |
---|
1771 | |
---|
1772 | This command prints the MD5 of a file. You can provide one or more |
---|
1773 | files on the command line and a hash for each file is printed in a |
---|
1774 | single line of output. |
---|
1775 | |
---|
1776 | @subheading EXIT STATUS: |
---|
1777 | |
---|
1778 | This command returns 0 on success and non-zero if an error is encountered. |
---|
1779 | |
---|
1780 | @subheading NOTES: |
---|
1781 | |
---|
1782 | NONE |
---|
1783 | |
---|
1784 | @subheading EXAMPLES: |
---|
1785 | |
---|
1786 | The following is an example of how to use @code{md5}: |
---|
1787 | |
---|
1788 | @example |
---|
1789 | SHLL [/] $ md5 shell-init |
---|
1790 | MD5 (shell-init) = 43b4d2e71b47db79eae679a2efeacf31 |
---|
1791 | @end example |
---|
1792 | |
---|
1793 | @subheading CONFIGURATION: |
---|
1794 | |
---|
1795 | @findex CONFIGURE_SHELL_NO_COMMAND_MD5 |
---|
1796 | @findex CONFIGURE_SHELL_COMMAND_MD5 |
---|
1797 | |
---|
1798 | This command is included in the default shell command set. |
---|
1799 | When building a custom command set, define |
---|
1800 | @code{CONFIGURE_SHELL_COMMAND_MD5} to have this |
---|
1801 | command included. |
---|
1802 | |
---|
1803 | This command can be excluded from the shell command set by |
---|
1804 | defining @code{CONFIGURE_SHELL_NO_COMMAND_MD5} when all |
---|
1805 | shell commands have been configured. |
---|
1806 | |
---|
1807 | @subheading PROGRAMMING INFORMATION: |
---|
1808 | |
---|
1809 | @findex rtems_shell_rtems_main_md5 |
---|
1810 | |
---|
1811 | The @code{df} is implemented by a C language function |
---|
1812 | which has the following prototype: |
---|
1813 | |
---|
1814 | @example |
---|
1815 | int rtems_shell_main_md5( |
---|
1816 | int argc, |
---|
1817 | char **argv |
---|
1818 | ); |
---|
1819 | @end example |
---|
1820 | |
---|
1821 | The configuration structure for the @code{md5} has the |
---|
1822 | following prototype: |
---|
1823 | |
---|
1824 | @example |
---|
1825 | extern rtems_shell_cmd_t rtems_shell_MD5_Command; |
---|
1826 | @end example |
---|
1827 | |
---|
1828 | @c |
---|
1829 | @c |
---|
1830 | @c |
---|
1831 | @page |
---|
1832 | @subsection mkdir - create a directory |
---|
1833 | |
---|
1834 | @pgindex mkdir |
---|
1835 | |
---|
1836 | @subheading SYNOPSYS: |
---|
1837 | |
---|
1838 | @example |
---|
1839 | mkdir dir [dir1 .. dirN] |
---|
1840 | @end example |
---|
1841 | |
---|
1842 | @subheading DESCRIPTION: |
---|
1843 | |
---|
1844 | This command creates the set of directories in the order they |
---|
1845 | are specified on the command line. If an error is encountered |
---|
1846 | making one of the directories, the command will continue to |
---|
1847 | attempt to create the remaining directories on the command line. |
---|
1848 | |
---|
1849 | @subheading EXIT STATUS: |
---|
1850 | |
---|
1851 | This command returns 0 on success and non-zero if an error is encountered. |
---|
1852 | |
---|
1853 | @subheading NOTES: |
---|
1854 | |
---|
1855 | If this command is invoked with no arguments, nothing occurs. |
---|
1856 | |
---|
1857 | The user must have sufficient permissions to create the directory. |
---|
1858 | For the @code{fileio} test provided with RTEMS, this means the user |
---|
1859 | must login as @code{root} not @code{rtems}. |
---|
1860 | |
---|
1861 | @subheading EXAMPLES: |
---|
1862 | |
---|
1863 | The following is an example of how to use @code{mkdir}: |
---|
1864 | |
---|
1865 | @example |
---|
1866 | SHLL [/] # ls |
---|
1867 | drwxr-xr-x 1 root root 536 Jan 01 00:00 dev/ |
---|
1868 | drwxr-xr-x 1 root root 1072 Jan 01 00:00 etc/ |
---|
1869 | 2 files 1608 bytes occupied |
---|
1870 | SHLL [/] # mkdir joel |
---|
1871 | SHLL [/] # ls joel |
---|
1872 | 0 files 0 bytes occupied |
---|
1873 | SHLL [/] # cp etc/passwd joel |
---|
1874 | SHLL [/] # ls joel |
---|
1875 | -rw-r--r-- 1 root root 102 Jan 01 00:02 passwd |
---|
1876 | 1 files 102 bytes occupied |
---|
1877 | @end example |
---|
1878 | |
---|
1879 | @subheading CONFIGURATION: |
---|
1880 | |
---|
1881 | @findex CONFIGURE_SHELL_NO_COMMAND_MKDIR |
---|
1882 | @findex CONFIGURE_SHELL_COMMAND_MKDIR |
---|
1883 | |
---|
1884 | This command is included in the default shell command set. |
---|
1885 | When building a custom command set, define |
---|
1886 | @code{CONFIGURE_SHELL_COMMAND_MKDIR} to have this |
---|
1887 | command included. |
---|
1888 | |
---|
1889 | This command can be excluded from the shell command set by |
---|
1890 | defining @code{CONFIGURE_SHELL_NO_COMMAND_MKDIR} when all |
---|
1891 | shell commands have been configured. |
---|
1892 | |
---|
1893 | @subheading PROGRAMMING INFORMATION: |
---|
1894 | |
---|
1895 | @findex rtems_shell_rtems_main_mkdir |
---|
1896 | |
---|
1897 | The @code{mkdir} is implemented by a C language function |
---|
1898 | which has the following prototype: |
---|
1899 | |
---|
1900 | @example |
---|
1901 | int rtems_shell_rtems_main_mkdir( |
---|
1902 | int argc, |
---|
1903 | char **argv |
---|
1904 | ); |
---|
1905 | @end example |
---|
1906 | |
---|
1907 | The configuration structure for the @code{mkdir} has the |
---|
1908 | following prototype: |
---|
1909 | |
---|
1910 | @example |
---|
1911 | extern rtems_shell_cmd_t rtems_shell_MKDIR_Command; |
---|
1912 | @end example |
---|
1913 | |
---|
1914 | @c |
---|
1915 | @c |
---|
1916 | @c |
---|
1917 | @page |
---|
1918 | @subsection mldos - DOSFS file system format |
---|
1919 | |
---|
1920 | @pgindex pwd |
---|
1921 | |
---|
1922 | @subheading SYNOPSYS: |
---|
1923 | |
---|
1924 | @example |
---|
1925 | mkdir [-V label] [-s sectors/cluster] [-r size] [-v] path |
---|
1926 | @end example |
---|
1927 | |
---|
1928 | @subheading DESCRIPTION: |
---|
1929 | |
---|
1930 | This command formats a block device entry with the DOSFS file system. |
---|
1931 | |
---|
1932 | @table @b |
---|
1933 | @item -V label |
---|
1934 | |
---|
1935 | @item -s sectors/cluster |
---|
1936 | |
---|
1937 | @item -r size |
---|
1938 | |
---|
1939 | @end table |
---|
1940 | |
---|
1941 | @subheading EXIT STATUS: |
---|
1942 | |
---|
1943 | This command returns 0 on success and non-zero if an error is encountered. |
---|
1944 | |
---|
1945 | @subheading NOTES: |
---|
1946 | |
---|
1947 | NONE |
---|
1948 | |
---|
1949 | @subheading EXAMPLES: |
---|
1950 | |
---|
1951 | The following is an example of how to use @code{mkdos}: |
---|
1952 | |
---|
1953 | @example |
---|
1954 | SHLL [/] $ mkdos /dev/rda1 |
---|
1955 | @end example |
---|
1956 | |
---|
1957 | @subheading CONFIGURATION: |
---|
1958 | |
---|
1959 | @findex CONFIGURE_SHELL_NO_COMMAND_MKDOS |
---|
1960 | @findex CONFIGURE_SHELL_COMMAND_MKDOS |
---|
1961 | |
---|
1962 | This command is included in the default shell command set. |
---|
1963 | When building a custom command set, define |
---|
1964 | @code{CONFIGURE_SHELL_COMMAND_MKDOS} to have this |
---|
1965 | command included. |
---|
1966 | |
---|
1967 | This command can be excluded from the shell command set by |
---|
1968 | defining @code{CONFIGURE_SHELL_NO_COMMAND_MKDOS} when all |
---|
1969 | shell commands have been configured. |
---|
1970 | |
---|
1971 | @subheading PROGRAMMING INFORMATION: |
---|
1972 | |
---|
1973 | @findex rtems_shell_rtems_main_mkdos |
---|
1974 | |
---|
1975 | The @code{mkdos} is implemented by a C language function |
---|
1976 | which has the following prototype: |
---|
1977 | |
---|
1978 | @example |
---|
1979 | int rtems_shell_rtems_main_mkdos( |
---|
1980 | int argc, |
---|
1981 | char **argv |
---|
1982 | ); |
---|
1983 | @end example |
---|
1984 | |
---|
1985 | The configuration structure for the @code{mkdos} has the |
---|
1986 | following prototype: |
---|
1987 | |
---|
1988 | @example |
---|
1989 | extern rtems_shell_cmd_t rtems_shell_MKDOS_Command; |
---|
1990 | @end example |
---|
1991 | |
---|
1992 | @c |
---|
1993 | @c |
---|
1994 | @c |
---|
1995 | @page |
---|
1996 | @subsection mknod - make device special file |
---|
1997 | |
---|
1998 | @pgindex mknod |
---|
1999 | |
---|
2000 | @subheading SYNOPSYS: |
---|
2001 | |
---|
2002 | @example |
---|
2003 | mknod [-rR] [-F fmt] [-g gid] [-m mode] [-u uid] name [c | b] |
---|
2004 | [driver | major] minor |
---|
2005 | mknod [-rR] [-F fmt] [-g gid] [-m mode] [-u uid] name [c | b] |
---|
2006 | major unit subunit |
---|
2007 | mknod [-rR] [-g gid] [-m mode] [-u uid] name [c | b] number |
---|
2008 | mknod [-rR] [-g gid] [-m mode] [-u uid] name p |
---|
2009 | @end example |
---|
2010 | |
---|
2011 | @subheading DESCRIPTION: |
---|
2012 | |
---|
2013 | The mknod command creates device special files, or fifos. Normally |
---|
2014 | the shell script /dev/MAKEDEV is used to create special files for |
---|
2015 | commonly known devices; it executes mknod with the appropriate |
---|
2016 | arguments and can make all the files required for the device. |
---|
2017 | |
---|
2018 | To make nodes manually, the arguments are: |
---|
2019 | |
---|
2020 | @table @b |
---|
2021 | @item -r |
---|
2022 | Replace an existing file if its type is incorrect. |
---|
2023 | |
---|
2024 | @item -R |
---|
2025 | Replace an existing file if its type is incorrect. Correct the |
---|
2026 | mode, user and group. |
---|
2027 | |
---|
2028 | @item -g gid |
---|
2029 | Specify the group for the device node. The gid operand may be a |
---|
2030 | numeric group ID or a group name. If a group name is also a numeric |
---|
2031 | group ID, the operand is used as a group name. Precede a numeric |
---|
2032 | group ID with a # to stop it being treated as a name. |
---|
2033 | |
---|
2034 | @item -m mode |
---|
2035 | Specify the mode for the device node. The mode may be absolute or |
---|
2036 | symbolic, see @i{chmod}. |
---|
2037 | |
---|
2038 | @item -u uid |
---|
2039 | Specify the user for the device node. The uid operand may be a |
---|
2040 | numeric user ID or a user name. If a user name is also a numeric user |
---|
2041 | ID, the operand is used as a user name. Precede a numeric user ID |
---|
2042 | with a # to stop it being treated as a name. |
---|
2043 | |
---|
2044 | @item name |
---|
2045 | Device name, for example ``tty'' for a termios serial device or ``hd'' |
---|
2046 | for a disk. |
---|
2047 | |
---|
2048 | @item b | c | p |
---|
2049 | Type of device. If the device is a block type device such as a tape |
---|
2050 | or disk drive which needs both cooked and raw special files, the type |
---|
2051 | is b. All other devices are character type devices, such as terminal |
---|
2052 | and pseudo devices, and are type c. Specifying p creates fifo files. |
---|
2053 | |
---|
2054 | @item driver | major |
---|
2055 | The major device number is an integer number which tells the kernel |
---|
2056 | which device driver entry point to use. If the device driver is |
---|
2057 | configured into the current kernel it may be specified by driver name |
---|
2058 | or major number. |
---|
2059 | |
---|
2060 | @item minor |
---|
2061 | The minor device number tells the kernel which one of several similar |
---|
2062 | devices the node corresponds to; for example, it may be a specific |
---|
2063 | serial port or pty. |
---|
2064 | |
---|
2065 | @item unit and subunit |
---|
2066 | The unit and subunit numbers select a subset of a device; for example, |
---|
2067 | the unit may specify a particular disk, and the subunit a partition on |
---|
2068 | that disk. (Currently this form of specification is only supported |
---|
2069 | by the bsdos format, for compatibility with the BSD/OS mknod). |
---|
2070 | |
---|
2071 | @item number |
---|
2072 | A single opaque device number. Useful for netbooted computers which |
---|
2073 | require device numbers packed in a format that isn't supported by |
---|
2074 | -F. |
---|
2075 | @end table |
---|
2076 | |
---|
2077 | @subheading EXIT STATUS: |
---|
2078 | |
---|
2079 | The @code{mknod} utility exits 0 on success, and >0 if an error occurs. |
---|
2080 | |
---|
2081 | @subheading NOTES: |
---|
2082 | |
---|
2083 | NONE |
---|
2084 | |
---|
2085 | @subheading EXAMPLES: |
---|
2086 | |
---|
2087 | @example |
---|
2088 | SHLL [/] mknod c 3 0 /dev/ttyS10 |
---|
2089 | @end example |
---|
2090 | |
---|
2091 | @subheading CONFIGURATION: |
---|
2092 | |
---|
2093 | @findex CONFIGURE_SHELL_NO_COMMAND_MKNOD |
---|
2094 | @findex CONFIGURE_SHELL_COMMAND_MKNOD |
---|
2095 | |
---|
2096 | This command is included in the default shell command set. When |
---|
2097 | building a custom command set, define |
---|
2098 | @code{CONFIGURE_SHELL_COMMAND_MKNOD} to have this command included. |
---|
2099 | |
---|
2100 | This command can be excluded from the shell command set by |
---|
2101 | defining @code{CONFIGURE_SHELL_NO_COMMAND_MKNOD} when all |
---|
2102 | shell commands have been configured. |
---|
2103 | |
---|
2104 | @subheading PROGRAMMING INFORMATION: |
---|
2105 | |
---|
2106 | @findex rtems_shell_rtems_main_mknod |
---|
2107 | |
---|
2108 | The @code{mknod} command is implemented by a C language function which |
---|
2109 | has the following prototype: |
---|
2110 | |
---|
2111 | @example |
---|
2112 | int rtems_shell_rtems_main_mknod( |
---|
2113 | int argc, |
---|
2114 | char **argv |
---|
2115 | ); |
---|
2116 | @end example |
---|
2117 | |
---|
2118 | The configuration structure for the @code{mknod} has the following |
---|
2119 | prototype: |
---|
2120 | |
---|
2121 | @example |
---|
2122 | extern rtems_shell_cmd_t rtems_shell_MKNOD_Command; |
---|
2123 | @end example |
---|
2124 | |
---|
2125 | @subheading ORIGIN: |
---|
2126 | |
---|
2127 | The implementation and portions of the documentation for this command |
---|
2128 | are from NetBSD 4.0. |
---|
2129 | |
---|
2130 | @c |
---|
2131 | @c |
---|
2132 | @c |
---|
2133 | @page |
---|
2134 | @subsection mkrfs - format RFS file system |
---|
2135 | |
---|
2136 | @pgindex mkrfs |
---|
2137 | |
---|
2138 | @subheading SYNOPSYS: |
---|
2139 | |
---|
2140 | @example |
---|
2141 | mkrfs [-vsbiIo] device |
---|
2142 | @end example |
---|
2143 | |
---|
2144 | @subheading DESCRIPTION: |
---|
2145 | |
---|
2146 | Format the block device with the RTEMS File System (RFS). The default |
---|
2147 | configuration with not parameters selects a suitable block size based |
---|
2148 | on the size of the media being formatted. |
---|
2149 | |
---|
2150 | The media is broken up into groups of blocks. The number of blocks in |
---|
2151 | a group is based on the number of bits a block contains. The large a |
---|
2152 | block the more blocks a group contains and the fewer groups in the |
---|
2153 | file system. |
---|
2154 | |
---|
2155 | The following options are provided: |
---|
2156 | |
---|
2157 | @table @b |
---|
2158 | @item -v |
---|
2159 | Display configuration and progress of the format. |
---|
2160 | |
---|
2161 | @item -s |
---|
2162 | Set the block size in bytes. |
---|
2163 | |
---|
2164 | @item -b |
---|
2165 | The number of blocks in a group. The block count must be equal or less |
---|
2166 | than the number of bits in a block. |
---|
2167 | |
---|
2168 | @item -i |
---|
2169 | Number of inodes in a group. The inode count must be equal or less |
---|
2170 | than the number of bits in a block. |
---|
2171 | |
---|
2172 | @item -I |
---|
2173 | Initialise the inodes. The default is not to initialise the inodes and |
---|
2174 | to rely on the inode being initialised when allocated. Initialising |
---|
2175 | the inode table helps recovery if a problem appears. |
---|
2176 | |
---|
2177 | @item -o |
---|
2178 | Integer percentage of the media used by inodes. The default is 1%. |
---|
2179 | |
---|
2180 | @item device |
---|
2181 | Path of the device to format. |
---|
2182 | @end table |
---|
2183 | |
---|
2184 | @subheading EXIT STATUS: |
---|
2185 | |
---|
2186 | This command returns 0 on success and non-zero if an error is encountered. |
---|
2187 | |
---|
2188 | @subheading NOTES: |
---|
2189 | |
---|
2190 | NONE |
---|
2191 | |
---|
2192 | @subheading EXAMPLES: |
---|
2193 | |
---|
2194 | The following is an example of how to use @code{mkrfs}: |
---|
2195 | |
---|
2196 | @example |
---|
2197 | SHLL [/] $ mkrfs /dev/fdda |
---|
2198 | @end example |
---|
2199 | |
---|
2200 | @subheading CONFIGURATION: |
---|
2201 | |
---|
2202 | @findex CONFIGURE_SHELL_NO_COMMAND_MKRFS |
---|
2203 | @findex CONFIGURE_SHELL_COMMAND_MKRFS |
---|
2204 | |
---|
2205 | This command is included in the default shell command set. |
---|
2206 | When building a custom command set, define |
---|
2207 | @code{CONFIGURE_SHELL_COMMAND_MKRFS} to have this |
---|
2208 | command included. |
---|
2209 | |
---|
2210 | This command can be excluded from the shell command set by |
---|
2211 | defining @code{CONFIGURE_SHELL_NO_COMMAND_MKRFS} when all |
---|
2212 | shell commands have been configured. |
---|
2213 | |
---|
2214 | @subheading PROGRAMMING INFORMATION: |
---|
2215 | |
---|
2216 | @findex rtems_shell_rtems_main_mkrfs |
---|
2217 | |
---|
2218 | The @code{mkrfs} command is implemented by a C language function which |
---|
2219 | has the following prototype: |
---|
2220 | |
---|
2221 | @example |
---|
2222 | int rtems_shell_rtems_main_mkrfs( |
---|
2223 | int argc, |
---|
2224 | char **argv |
---|
2225 | ); |
---|
2226 | @end example |
---|
2227 | |
---|
2228 | The configuration structure for @code{mkrfs} has the following |
---|
2229 | prototype: |
---|
2230 | |
---|
2231 | @example |
---|
2232 | extern rtems_shell_cmd_t rtems_shell_MKRFS_Command; |
---|
2233 | @end example |
---|
2234 | |
---|
2235 | @c |
---|
2236 | @c |
---|
2237 | @c |
---|
2238 | @page |
---|
2239 | @subsection mount - mount disk |
---|
2240 | |
---|
2241 | @pgindex mount |
---|
2242 | |
---|
2243 | @subheading SYNOPSYS: |
---|
2244 | |
---|
2245 | @example |
---|
2246 | mount [-t fstype] [-r] [-L] device path |
---|
2247 | @end example |
---|
2248 | |
---|
2249 | @subheading DESCRIPTION: |
---|
2250 | |
---|
2251 | The @code{mount} command will mount a block device to a mount point |
---|
2252 | using the specified file system. The files systems are: |
---|
2253 | |
---|
2254 | @itemize @bullet |
---|
2255 | @item msdos - MSDOS File System |
---|
2256 | @item tftp - TFTP Network File System |
---|
2257 | @item ftp - FTP Network File System |
---|
2258 | @item nfs - Network File System |
---|
2259 | @item rfs - RTEMS File System |
---|
2260 | @end itemize |
---|
2261 | |
---|
2262 | When the file system type is 'msdos' or 'rfs' the driver is a "block |
---|
2263 | device driver" node present in the file system. The driver is ignored |
---|
2264 | with the 'tftp' and 'ftp' file systems. For the 'nfs' file system the |
---|
2265 | driver is the 'host:/path' string that described NFS host and the |
---|
2266 | exported file system path. |
---|
2267 | |
---|
2268 | @subheading EXIT STATUS: |
---|
2269 | |
---|
2270 | This command returns 0 on success and non-zero if an error is encountered. |
---|
2271 | |
---|
2272 | @subheading NOTES: |
---|
2273 | |
---|
2274 | The mount point must exist. |
---|
2275 | |
---|
2276 | The services offered by each file-system vary. For example you cannot list the |
---|
2277 | directory of a TFTP file-system as this server is not provided in the TFTP |
---|
2278 | protocol. You need to check each file-system's documentation for the services |
---|
2279 | provided. |
---|
2280 | |
---|
2281 | @subheading EXAMPLES: |
---|
2282 | |
---|
2283 | Mount the Flash Disk driver to the '/fd' mount point: |
---|
2284 | |
---|
2285 | @example |
---|
2286 | SHLL [/] $ mount -t msdos /dev/flashdisk0 /fd |
---|
2287 | @end example |
---|
2288 | |
---|
2289 | Mount the NFS file system exported path 'bar' by host 'foo': |
---|
2290 | |
---|
2291 | @example |
---|
2292 | $ mount -t nfs foo:/bar /nfs |
---|
2293 | @end example |
---|
2294 | |
---|
2295 | Mount the TFTP file system on '/tftp': |
---|
2296 | |
---|
2297 | @example |
---|
2298 | $ mount -t tftp /tftp |
---|
2299 | @end example |
---|
2300 | |
---|
2301 | To access the TFTP files on server '10.10.10.10': |
---|
2302 | |
---|
2303 | @example |
---|
2304 | $ cat /tftp/10.10.10.10/test.txt |
---|
2305 | @end example |
---|
2306 | |
---|
2307 | @subheading CONFIGURATION: |
---|
2308 | |
---|
2309 | @findex CONFIGURE_SHELL_NO_COMMAND_MOUNT |
---|
2310 | @findex CONFIGURE_SHELL_COMMAND_MOUNT |
---|
2311 | |
---|
2312 | This command is included in the default shell command set. |
---|
2313 | When building a custom command set, define |
---|
2314 | @code{CONFIGURE_SHELL_COMMAND_MOUNT} to have this |
---|
2315 | command included. |
---|
2316 | |
---|
2317 | This command can be excluded from the shell command set by |
---|
2318 | defining @code{CONFIGURE_SHELL_NO_COMMAND_MOUNT} when all |
---|
2319 | shell commands have been configured. |
---|
2320 | |
---|
2321 | The mount command includes references to file-system code. If you do not wish |
---|
2322 | to include file-system that you do not use do not define the mount command |
---|
2323 | support for that file-system. The file-system mount command defines are: |
---|
2324 | |
---|
2325 | @itemize @bullet |
---|
2326 | @item msdos - CONFIGURE_SHELL_MOUNT_MSDOS |
---|
2327 | @item tftp - CONFIGURE_SHELL_MOUNT_TFTP |
---|
2328 | @item ftp - CONFIGURE_SHELL_MOUNT_FTP |
---|
2329 | @item nfs - CONFIGURE_SHELL_MOUNT_NFS |
---|
2330 | @item rfs - CONFIGURE_SHELL_MOUNT_RFS |
---|
2331 | @end itemize |
---|
2332 | |
---|
2333 | An example configuration is: |
---|
2334 | |
---|
2335 | @example |
---|
2336 | #define CONFIGURE_SHELL_MOUNT_MSDOS |
---|
2337 | #ifdef RTEMS_NETWORKING |
---|
2338 | #define CONFIGURE_SHELL_MOUNT_TFTP |
---|
2339 | #define CONFIGURE_SHELL_MOUNT_FTP |
---|
2340 | #define CONFIGURE_SHELL_MOUNT_NFS |
---|
2341 | #define CONFIGURE_SHELL_MOUNT_RFS |
---|
2342 | #endif |
---|
2343 | @end example |
---|
2344 | |
---|
2345 | @subheading PROGRAMMING INFORMATION: |
---|
2346 | |
---|
2347 | @findex rtems_shell_rtems_main_mount |
---|
2348 | |
---|
2349 | The @code{mount} is implemented by a C language function |
---|
2350 | which has the following prototype: |
---|
2351 | |
---|
2352 | @example |
---|
2353 | int rtems_shell_rtems_main_mount( |
---|
2354 | int argc, |
---|
2355 | char **argv |
---|
2356 | ); |
---|
2357 | @end example |
---|
2358 | |
---|
2359 | The configuration structure for the @code{mount} has the |
---|
2360 | following prototype: |
---|
2361 | |
---|
2362 | @example |
---|
2363 | extern rtems_shell_cmd_t rtems_shell_MOUNT_Command; |
---|
2364 | @end example |
---|
2365 | |
---|
2366 | @c |
---|
2367 | @c |
---|
2368 | @c |
---|
2369 | @page |
---|
2370 | @subsection mv - move files |
---|
2371 | |
---|
2372 | @pgindex mv |
---|
2373 | |
---|
2374 | @subheading SYNOPSYS: |
---|
2375 | |
---|
2376 | @example |
---|
2377 | mv [-fiv] source_file target_file |
---|
2378 | mv [-fiv] source_file... target_file |
---|
2379 | @end example |
---|
2380 | |
---|
2381 | @subheading DESCRIPTION: |
---|
2382 | |
---|
2383 | In its first form, the mv utility renames the file named by the source |
---|
2384 | operand to the destination path named by the target operand. This |
---|
2385 | form is assumed when the last operand does not name an already |
---|
2386 | existing directory. |
---|
2387 | |
---|
2388 | In its second form, mv moves each file named by a source operand to a |
---|
2389 | destination file in the existing directory named by the directory |
---|
2390 | operand. The destination path for each operand is the pathname |
---|
2391 | produced by the concatenation of the last operand, a slash, and the |
---|
2392 | final pathname component of the named file. |
---|
2393 | |
---|
2394 | The following options are available: |
---|
2395 | |
---|
2396 | @table @b |
---|
2397 | @item -f |
---|
2398 | Do not prompt for confirmation before overwriting the destination |
---|
2399 | path. |
---|
2400 | |
---|
2401 | @item -i |
---|
2402 | Causes mv to write a prompt to standard error before moving a file |
---|
2403 | that would overwrite an existing file. If the response from the |
---|
2404 | standard input begins with the character 'y', the move is attempted. |
---|
2405 | |
---|
2406 | @item -v |
---|
2407 | Cause mv to be verbose, showing files as they are processed. |
---|
2408 | |
---|
2409 | @end table |
---|
2410 | |
---|
2411 | The last of any -f or -i options is the one which affects mv's |
---|
2412 | behavior. |
---|
2413 | |
---|
2414 | It is an error for any of the source operands to specify a nonexistent |
---|
2415 | file or directory. |
---|
2416 | |
---|
2417 | It is an error for the source operand to specify a directory if the |
---|
2418 | target exists and is not a directory. |
---|
2419 | |
---|
2420 | If the destination path does not have a mode which permits writing, mv |
---|
2421 | prompts the user for confirmation as specified for the -i option. |
---|
2422 | |
---|
2423 | Should the @b{rename} call fail because source and target are on |
---|
2424 | different file systems, @code{mv} will remove the destination file, |
---|
2425 | copy the source file to the destination, and then remove the source. |
---|
2426 | The effect is roughly equivalent to: |
---|
2427 | |
---|
2428 | @example |
---|
2429 | rm -f destination_path && \ |
---|
2430 | cp -PRp source_file destination_path && \ |
---|
2431 | rm -rf source_file |
---|
2432 | @end example |
---|
2433 | |
---|
2434 | @subheading EXIT STATUS: |
---|
2435 | |
---|
2436 | The @code{mv} utility exits 0 on success, and >0 if an error occurs. |
---|
2437 | |
---|
2438 | @subheading NOTES: |
---|
2439 | |
---|
2440 | NONE |
---|
2441 | |
---|
2442 | @subheading EXAMPLES: |
---|
2443 | |
---|
2444 | @example |
---|
2445 | SHLL [/] mv /dev/console /dev/con1 |
---|
2446 | @end example |
---|
2447 | |
---|
2448 | @subheading CONFIGURATION: |
---|
2449 | |
---|
2450 | @findex CONFIGURE_SHELL_NO_COMMAND_MV |
---|
2451 | @findex CONFIGURE_SHELL_COMMAND_MV |
---|
2452 | |
---|
2453 | This command is included in the default shell command set. When |
---|
2454 | building a custom command set, define |
---|
2455 | @code{CONFIGURE_SHELL_COMMAND_MV} to have this command included. |
---|
2456 | |
---|
2457 | This command can be excluded from the shell command set by |
---|
2458 | defining @code{CONFIGURE_SHELL_NO_COMMAND_MV} when all |
---|
2459 | shell commands have been configured. |
---|
2460 | |
---|
2461 | @subheading PROGRAMMING INFORMATION: |
---|
2462 | |
---|
2463 | @findex rtems_shell_rtems_main_mv |
---|
2464 | |
---|
2465 | The @code{mv} command is implemented by a C language function which |
---|
2466 | has the following prototype: |
---|
2467 | |
---|
2468 | @example |
---|
2469 | int rtems_shell_rtems_main_mv( |
---|
2470 | int argc, |
---|
2471 | char **argv |
---|
2472 | ); |
---|
2473 | @end example |
---|
2474 | |
---|
2475 | The configuration structure for the @code{mv} has the |
---|
2476 | following prototype: |
---|
2477 | |
---|
2478 | @example |
---|
2479 | extern rtems_shell_cmd_t rtems_shell_MV_Command; |
---|
2480 | @end example |
---|
2481 | |
---|
2482 | @subheading ORIGIN: |
---|
2483 | |
---|
2484 | The implementation and portions of the documentation for this command |
---|
2485 | are from NetBSD 4.0. |
---|
2486 | |
---|
2487 | @c |
---|
2488 | @c |
---|
2489 | @c |
---|
2490 | @page |
---|
2491 | @subsection pwd - print work directory |
---|
2492 | |
---|
2493 | @pgindex pwd |
---|
2494 | |
---|
2495 | @subheading SYNOPSYS: |
---|
2496 | |
---|
2497 | @example |
---|
2498 | pwd |
---|
2499 | @end example |
---|
2500 | |
---|
2501 | @subheading DESCRIPTION: |
---|
2502 | |
---|
2503 | This command prints the fully qualified filename of the current |
---|
2504 | working directory. |
---|
2505 | |
---|
2506 | @subheading EXIT STATUS: |
---|
2507 | |
---|
2508 | This command returns 0 on success and non-zero if an error is encountered. |
---|
2509 | |
---|
2510 | @subheading NOTES: |
---|
2511 | |
---|
2512 | NONE |
---|
2513 | |
---|
2514 | @subheading EXAMPLES: |
---|
2515 | |
---|
2516 | The following is an example of how to use @code{pwd}: |
---|
2517 | |
---|
2518 | @example |
---|
2519 | SHLL [/] $ pwd |
---|
2520 | / |
---|
2521 | SHLL [/] $ cd dev |
---|
2522 | SHLL [/dev] $ pwd |
---|
2523 | /dev |
---|
2524 | @end example |
---|
2525 | |
---|
2526 | @subheading CONFIGURATION: |
---|
2527 | |
---|
2528 | @findex CONFIGURE_SHELL_NO_COMMAND_PWD |
---|
2529 | @findex CONFIGURE_SHELL_COMMAND_PWD |
---|
2530 | |
---|
2531 | This command is included in the default shell command set. |
---|
2532 | When building a custom command set, define |
---|
2533 | @code{CONFIGURE_SHELL_COMMAND_PWD} to have this |
---|
2534 | command included. |
---|
2535 | |
---|
2536 | This command can be excluded from the shell command set by |
---|
2537 | defining @code{CONFIGURE_SHELL_NO_COMMAND_PWD} when all |
---|
2538 | shell commands have been configured. |
---|
2539 | |
---|
2540 | @subheading PROGRAMMING INFORMATION: |
---|
2541 | |
---|
2542 | @findex rtems_shell_rtems_main_pwd |
---|
2543 | |
---|
2544 | The @code{pwd} is implemented by a C language function |
---|
2545 | which has the following prototype: |
---|
2546 | |
---|
2547 | @example |
---|
2548 | int rtems_shell_rtems_main_pwd( |
---|
2549 | int argc, |
---|
2550 | char **argv |
---|
2551 | ); |
---|
2552 | @end example |
---|
2553 | |
---|
2554 | The configuration structure for the @code{pwd} has the |
---|
2555 | following prototype: |
---|
2556 | |
---|
2557 | @example |
---|
2558 | extern rtems_shell_cmd_t rtems_shell_PWD_Command; |
---|
2559 | @end example |
---|
2560 | |
---|
2561 | @c |
---|
2562 | @c |
---|
2563 | @c |
---|
2564 | @page |
---|
2565 | @subsection rmdir - remove empty directories |
---|
2566 | |
---|
2567 | @pgindex rmdir |
---|
2568 | |
---|
2569 | @subheading SYNOPSYS: |
---|
2570 | |
---|
2571 | @example |
---|
2572 | rmdir [dir1 .. dirN] |
---|
2573 | @end example |
---|
2574 | |
---|
2575 | @subheading DESCRIPTION: |
---|
2576 | |
---|
2577 | This command removes the specified set of directories. If no |
---|
2578 | directories are provided on the command line, no actions are taken. |
---|
2579 | |
---|
2580 | @subheading EXIT STATUS: |
---|
2581 | |
---|
2582 | This command returns 0 on success and non-zero if an error is encountered. |
---|
2583 | |
---|
2584 | @subheading NOTES: |
---|
2585 | |
---|
2586 | This command is a implemented using the @code{rmdir(2)} system |
---|
2587 | call and all reasons that call may fail apply to this command. |
---|
2588 | |
---|
2589 | @subheading EXAMPLES: |
---|
2590 | |
---|
2591 | The following is an example of how to use @code{rmdir}: |
---|
2592 | |
---|
2593 | @example |
---|
2594 | SHLL [/] # mkdir joeldir |
---|
2595 | SHLL [/] # rmdir joeldir |
---|
2596 | SHLL [/] # ls joeldir |
---|
2597 | joeldir: No such file or directory. |
---|
2598 | @end example |
---|
2599 | |
---|
2600 | @subheading CONFIGURATION: |
---|
2601 | |
---|
2602 | @findex CONFIGURE_SHELL_NO_COMMAND_RMDIR |
---|
2603 | @findex CONFIGURE_SHELL_COMMAND_RMDIR |
---|
2604 | |
---|
2605 | This command is included in the default shell command set. |
---|
2606 | When building a custom command set, define |
---|
2607 | @code{CONFIGURE_SHELL_COMMAND_RMDIR} to have this |
---|
2608 | command included. |
---|
2609 | |
---|
2610 | This command can be excluded from the shell command set by |
---|
2611 | defining @code{CONFIGURE_SHELL_NO_COMMAND_RMDIR} when all |
---|
2612 | shell commands have been configured. |
---|
2613 | |
---|
2614 | @subheading PROGRAMMING INFORMATION: |
---|
2615 | |
---|
2616 | @findex rtems_shell_rtems_main_rmdir |
---|
2617 | |
---|
2618 | The @code{rmdir} is implemented by a C language function |
---|
2619 | which has the following prototype: |
---|
2620 | |
---|
2621 | @example |
---|
2622 | int rtems_shell_rtems_main_rmdir( |
---|
2623 | int argc, |
---|
2624 | char **argv |
---|
2625 | ); |
---|
2626 | @end example |
---|
2627 | |
---|
2628 | The configuration structure for the @code{rmdir} has the |
---|
2629 | following prototype: |
---|
2630 | |
---|
2631 | @example |
---|
2632 | extern rtems_shell_cmd_t rtems_shell_RMDIR_Command; |
---|
2633 | @end example |
---|
2634 | |
---|
2635 | @c |
---|
2636 | @c |
---|
2637 | @c |
---|
2638 | @page |
---|
2639 | @subsection rm - remove files |
---|
2640 | |
---|
2641 | @pgindex rm |
---|
2642 | |
---|
2643 | @subheading SYNOPSYS: |
---|
2644 | |
---|
2645 | @example |
---|
2646 | rm file1 [file2 ... fileN] |
---|
2647 | @end example |
---|
2648 | |
---|
2649 | @subheading DESCRIPTION: |
---|
2650 | |
---|
2651 | This command deletes a name from the filesystem. If the specified file name |
---|
2652 | was the last link to a file and there are no @code{open} file descriptor |
---|
2653 | references to that file, then it is deleted and the associated space in |
---|
2654 | the file system is made available for subsequent use. |
---|
2655 | |
---|
2656 | If the filename specified was the last link to a file but there |
---|
2657 | are open file descriptor references to it, then the file will |
---|
2658 | remain in existence until the last file descriptor referencing |
---|
2659 | it is closed. |
---|
2660 | |
---|
2661 | @subheading EXIT STATUS: |
---|
2662 | |
---|
2663 | This command returns 0 on success and non-zero if an error is encountered. |
---|
2664 | |
---|
2665 | @subheading NOTES: |
---|
2666 | |
---|
2667 | NONE |
---|
2668 | |
---|
2669 | @subheading EXAMPLES: |
---|
2670 | |
---|
2671 | The following is an example of how to use @code{rm}: |
---|
2672 | |
---|
2673 | @example |
---|
2674 | SHLL [/] # cp /etc/passwd tmpfile |
---|
2675 | SHLL [/] # cat tmpfile |
---|
2676 | root:*:0:0:root::/:/bin/sh |
---|
2677 | rtems:*:1:1:RTEMS Application::/:/bin/sh |
---|
2678 | tty:!:2:2:tty owner::/:/bin/false |
---|
2679 | SHLL [/] # rm tmpfile |
---|
2680 | SHLL [/] # cat tmpfile |
---|
2681 | cat: tmpfile: No such file or directory |
---|
2682 | @end example |
---|
2683 | |
---|
2684 | @subheading CONFIGURATION: |
---|
2685 | |
---|
2686 | @findex CONFIGURE_SHELL_NO_COMMAND_RM |
---|
2687 | @findex CONFIGURE_SHELL_COMMAND_RM |
---|
2688 | |
---|
2689 | This command is included in the default shell command set. |
---|
2690 | When building a custom command set, define |
---|
2691 | @code{CONFIGURE_SHELL_COMMAND_RM} to have this |
---|
2692 | command included. |
---|
2693 | |
---|
2694 | This command can be excluded from the shell command set by |
---|
2695 | defining @code{CONFIGURE_SHELL_NO_COMMAND_RM} when all |
---|
2696 | shell commands have been configured. |
---|
2697 | |
---|
2698 | @subheading PROGRAMMING INFORMATION: |
---|
2699 | |
---|
2700 | @findex rtems_shell_rtems_main_rm |
---|
2701 | |
---|
2702 | The @code{rm} is implemented by a C language function |
---|
2703 | which has the following prototype: |
---|
2704 | |
---|
2705 | @example |
---|
2706 | int rtems_shell_rtems_main_rm( |
---|
2707 | int argc, |
---|
2708 | char **argv |
---|
2709 | ); |
---|
2710 | @end example |
---|
2711 | |
---|
2712 | The configuration structure for the @code{rm} has the |
---|
2713 | following prototype: |
---|
2714 | |
---|
2715 | @example |
---|
2716 | extern rtems_shell_cmd_t rtems_shell_RM_Command; |
---|
2717 | @end example |
---|
2718 | |
---|
2719 | @c |
---|
2720 | @c |
---|
2721 | @c |
---|
2722 | @page |
---|
2723 | @subsection umask - set file mode creation mask |
---|
2724 | |
---|
2725 | @pgindex umask |
---|
2726 | |
---|
2727 | @subheading SYNOPSYS: |
---|
2728 | |
---|
2729 | @example |
---|
2730 | umask [new_umask] |
---|
2731 | @end example |
---|
2732 | |
---|
2733 | @subheading DESCRIPTION: |
---|
2734 | |
---|
2735 | This command sets the user file creation mask to @code{new_umask}. The |
---|
2736 | argument @code{new_umask} may be octal, hexadecimal, or decimal. |
---|
2737 | |
---|
2738 | @subheading EXIT STATUS: |
---|
2739 | |
---|
2740 | This command returns 0 on success and non-zero if an error is encountered. |
---|
2741 | |
---|
2742 | @subheading NOTES: |
---|
2743 | |
---|
2744 | This command does not currently support symbolic mode masks. |
---|
2745 | |
---|
2746 | @subheading EXAMPLES: |
---|
2747 | |
---|
2748 | The following is an example of how to use @code{umask}: |
---|
2749 | |
---|
2750 | @example |
---|
2751 | SHLL [/] $ umask |
---|
2752 | 022 |
---|
2753 | SHLL [/] $ umask 0666 |
---|
2754 | 0666 |
---|
2755 | SHLL [/] $ umask |
---|
2756 | 0666 |
---|
2757 | @end example |
---|
2758 | |
---|
2759 | @subheading CONFIGURATION: |
---|
2760 | |
---|
2761 | @findex CONFIGURE_SHELL_NO_COMMAND_UMASK |
---|
2762 | @findex CONFIGURE_SHELL_COMMAND_UMASK |
---|
2763 | |
---|
2764 | This command is included in the default shell command set. |
---|
2765 | When building a custom command set, define |
---|
2766 | @code{CONFIGURE_SHELL_COMMAND_UMASK} to have this |
---|
2767 | command included. |
---|
2768 | |
---|
2769 | This command can be excluded from the shell command set by |
---|
2770 | defining @code{CONFIGURE_SHELL_NO_COMMAND_UMASK} when all |
---|
2771 | shell commands have been configured. |
---|
2772 | |
---|
2773 | @subheading PROGRAMMING INFORMATION: |
---|
2774 | |
---|
2775 | @findex rtems_shell_rtems_main_umask |
---|
2776 | |
---|
2777 | The @code{umask} is implemented by a C language function |
---|
2778 | which has the following prototype: |
---|
2779 | |
---|
2780 | @example |
---|
2781 | int rtems_shell_rtems_main_umask( |
---|
2782 | int argc, |
---|
2783 | char **argv |
---|
2784 | ); |
---|
2785 | @end example |
---|
2786 | |
---|
2787 | The configuration structure for the @code{umask} has the |
---|
2788 | following prototype: |
---|
2789 | |
---|
2790 | @example |
---|
2791 | extern rtems_shell_cmd_t rtems_shell_UMASK_Command; |
---|
2792 | @end example |
---|
2793 | |
---|
2794 | @c |
---|
2795 | @c |
---|
2796 | @c |
---|
2797 | @page |
---|
2798 | @subsection unmount - unmount disk |
---|
2799 | |
---|
2800 | @pgindex unmount |
---|
2801 | |
---|
2802 | @subheading SYNOPSYS: |
---|
2803 | |
---|
2804 | @example |
---|
2805 | unmount path |
---|
2806 | @end example |
---|
2807 | |
---|
2808 | @subheading DESCRIPTION: |
---|
2809 | |
---|
2810 | This command unmounts the device at the specified @code{path}. |
---|
2811 | |
---|
2812 | @subheading EXIT STATUS: |
---|
2813 | |
---|
2814 | This command returns 0 on success and non-zero if an error is encountered. |
---|
2815 | |
---|
2816 | @subheading NOTES: |
---|
2817 | |
---|
2818 | TBD - Surely there must be some warnings to go here. |
---|
2819 | |
---|
2820 | @subheading EXAMPLES: |
---|
2821 | |
---|
2822 | The following is an example of how to use @code{unmount}: |
---|
2823 | |
---|
2824 | @example |
---|
2825 | EXAMPLE_TBD |
---|
2826 | @end example |
---|
2827 | |
---|
2828 | @subheading CONFIGURATION: |
---|
2829 | |
---|
2830 | @findex CONFIGURE_SHELL_NO_COMMAND_UNMOUNT |
---|
2831 | @findex CONFIGURE_SHELL_COMMAND_UNMOUNT |
---|
2832 | |
---|
2833 | This command is included in the default shell command set. |
---|
2834 | When building a custom command set, define |
---|
2835 | @code{CONFIGURE_SHELL_COMMAND_UNMOUNT} to have this |
---|
2836 | command included. |
---|
2837 | |
---|
2838 | This command can be excluded from the shell command set by |
---|
2839 | defining @code{CONFIGURE_SHELL_NO_COMMAND_UNMOUNT} when all |
---|
2840 | shell commands have been configured. |
---|
2841 | |
---|
2842 | @subheading PROGRAMMING INFORMATION: |
---|
2843 | |
---|
2844 | @findex rtems_shell_rtems_main_unmount |
---|
2845 | |
---|
2846 | The @code{unmount} is implemented by a C language function |
---|
2847 | which has the following prototype: |
---|
2848 | |
---|
2849 | @example |
---|
2850 | int rtems_shell_rtems_main_unmount( |
---|
2851 | int argc, |
---|
2852 | char **argv |
---|
2853 | ); |
---|
2854 | @end example |
---|
2855 | |
---|
2856 | The configuration structure for the @code{unmount} has the |
---|
2857 | following prototype: |
---|
2858 | |
---|
2859 | @example |
---|
2860 | extern rtems_shell_cmd_t rtems_shell_UNMOUNT_Command; |
---|
2861 | @end example |
---|