Changeset b299960 in rtems for doc


Ignore:
Timestamp:
09/14/14 23:10:45 (10 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.11, 5, master
Children:
fc9f8f5
Parents:
ebf9a05
git-author:
Chris Johns <chrisj@…> (09/14/14 23:10:45)
git-committer:
Chris Johns <chrisj@…> (09/16/14 05:19:58)
Message:

shell: Add an md5 hash command for files.

This command lets you get an MD5 hash for a file in an RTEMS file system.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/shell/file.t

    rebf9a05 rb299960  
    3737@item @code{cd} - alias for chdir
    3838@item @code{df} - display file system disk space usage
     39@item @code{md5} - display file system disk space usage
    3940
    4041@end itemize
     
    9293@findex CONFIGURE_SHELL_COMMAND_UMASK
    9394
    94 This command is included in the default shell command set. 
     95This command is included in the default shell command set.
    9596When building a custom command set, define
    9697@code{CONFIGURE_SHELL_COMMAND_UMASK} to have this
     
    247248drwxr-xr-x   1   root   root         536 Jan 01 00:00 dev/
    248249drwxr-xr-x   1   root   root        1072 Jan 01 00:00 etc/
    249 -rw-r--r--   1   root   root         102 Jan 01 00:00 joel 
     250-rw-r--r--   1   root   root         102 Jan 01 00:00 joel
    2502513 files 1710 bytes occupied
    251252@end example
     
    257258@example
    258259SHLL [/] # mkdir tmp
    259 SHLL [/] # ls tmp         
     260SHLL [/] # ls tmp
    2602610 files 0 bytes occupied
    261262SHLL [/] # cp /etc/passwd tmp
    262263SHLL [/] # ls /tmp
    263 -rw-r--r--   1   root   root         102 Jan 01 00:01 passwd 
     264-rw-r--r--   1   root   root         102 Jan 01 00:01 passwd
    2642651 files 102 bytes occupied
    265266SHLL [/] # cp /etc/passwd /etc/group /tmp
    266267SHLL [/] # ls /tmp
    267 -rw-r--r--   1   root   root         102 Jan 01 00:01 passwd 
    268 -rw-r--r--   1   root   root          42 Jan 01 00:01 group 
     268-rw-r--r--   1   root   root         102 Jan 01 00:01 passwd
     269-rw-r--r--   1   root   root          42 Jan 01 00:01 group
    2692702 files 144 bytes occupied
    270 SHLL [/] # 
     271SHLL [/] #
    271272@end example
    272273
     
    276277@findex CONFIGURE_SHELL_COMMAND_CP
    277278
    278 This command is included in the default shell command set. 
     279This command is included in the default shell command set.
    279280When building a custom command set, define
    280281@code{CONFIGURE_SHELL_COMMAND_CP} to have this
     
    449450
    450451This command prints the fully qualified filename of the current
    451 working directory. 
     452working directory.
    452453
    453454@subheading EXIT STATUS:
     
    476477@findex CONFIGURE_SHELL_COMMAND_PWD
    477478
    478 This command is included in the default shell command set. 
     479This command is included in the default shell command set.
    479480When building a custom command set, define
    480481@code{CONFIGURE_SHELL_COMMAND_PWD} to have this
     
    532533@subheading NOTES:
    533534
    534 This command currently does not display information on a set of 
     535This command currently does not display information on a set of
    535536files like the POSIX ls(1).  It only displays the contents of
    536537entire directories.
     
    5465472 files 1608 bytes occupied
    547548SHLL [/] $ ls etc
    548 -rw-r--r--   1   root   root         102 Jan 01 00:00 passwd 
    549 -rw-r--r--   1   root   root          42 Jan 01 00:00 group 
    550 -rw-r--r--   1   root   root          30 Jan 01 00:00 issue 
    551 -rw-r--r--   1   root   root          28 Jan 01 00:00 issue.net 
     549-rw-r--r--   1   root   root         102 Jan 01 00:00 passwd
     550-rw-r--r--   1   root   root          42 Jan 01 00:00 group
     551-rw-r--r--   1   root   root          30 Jan 01 00:00 issue
     552-rw-r--r--   1   root   root          28 Jan 01 00:00 issue.net
    5525534 files 202 bytes occupied
    553554SHLL [/] $ ls dev etc
    554 -rwxr-xr-x   1  rtems   root           0 Jan 01 00:00 console 
    555 -rwxr-xr-x   1   root   root           0 Jan 01 00:00 console_b 
     555-rwxr-xr-x   1  rtems   root           0 Jan 01 00:00 console
     556-rwxr-xr-x   1   root   root           0 Jan 01 00:00 console_b
    556557@end example
    557558
     
    561562@findex CONFIGURE_SHELL_COMMAND_LS
    562563
    563 This command is included in the default shell command set. 
     564This command is included in the default shell command set.
    564565When building a custom command set, define
    565566@code{CONFIGURE_SHELL_COMMAND_LS} to have this
     
    627628/
    628629SHLL [/] $ chdir etc
    629 SHLL [/etc] $ pwd 
     630SHLL [/etc] $ pwd
    630631/etc
    631632@end example
     
    636637@findex CONFIGURE_SHELL_COMMAND_CHDIR
    637638
    638 This command is included in the default shell command set. 
     639This command is included in the default shell command set.
    639640When building a custom command set, define
    640641@code{CONFIGURE_SHELL_COMMAND_CHDIR} to have this
     
    684685This command creates the set of directories in the order they
    685686are specified on the command line.  If an error is encountered
    686 making one of the directories, the command will continue to 
     687making one of the directories, the command will continue to
    687688attempt to create the remaining directories on the command line.
    688689
     
    713714SHLL [/] # cp etc/passwd joel
    714715SHLL [/] # ls joel
    715 -rw-r--r--   1   root   root         102 Jan 01 00:02 passwd 
     716-rw-r--r--   1   root   root         102 Jan 01 00:02 passwd
    7167171 files 102 bytes occupied
    717718@end example
     
    722723@findex CONFIGURE_SHELL_COMMAND_MKDIR
    723724
    724 This command is included in the default shell command set. 
     725This command is included in the default shell command set.
    725726When building a custom command set, define
    726727@code{CONFIGURE_SHELL_COMMAND_MKDIR} to have this
     
    768769@subheading DESCRIPTION:
    769770
    770 This command removes the specified set of directories.  If no 
     771This command removes the specified set of directories.  If no
    771772directories are provided on the command line, no actions are taken.
    772773
     
    796797@findex CONFIGURE_SHELL_COMMAND_RMDIR
    797798
    798 This command is included in the default shell command set. 
     799This command is included in the default shell command set.
    799800When building a custom command set, define
    800801@code{CONFIGURE_SHELL_COMMAND_RMDIR} to have this
     
    967968
    968969@example
    969 mknod [-rR] [-F fmt] [-g gid] [-m mode] [-u uid] name [c | b] 
     970mknod [-rR] [-F fmt] [-g gid] [-m mode] [-u uid] name [c | b]
    970971      [driver | major] minor
    971 mknod [-rR] [-F fmt] [-g gid] [-m mode] [-u uid] name [c | b] 
     972mknod [-rR] [-F fmt] [-g gid] [-m mode] [-u uid] name [c | b]
    972973      major unit subunit
    973974mknod [-rR] [-g gid] [-m mode] [-u uid] name [c | b] number
     
    11461147@findex CONFIGURE_SHELL_COMMAND_CHROOT
    11471148
    1148 This command is included in the default shell command set. 
     1149This command is included in the default shell command set.
    11491150When building a custom command set, define
    11501151@code{CONFIGURE_SHELL_COMMAND_CHROOT} to have this
     
    12151216SHLL [/] # cd etc
    12161217SHLL [/etc] # ls
    1217 -rw-r--r--   1   root   root         102 Jan 01 00:00 passwd 
    1218 -rw-r--r--   1   root   root          42 Jan 01 00:00 group 
    1219 -rw-r--r--   1   root   root          30 Jan 01 00:00 issue 
    1220 -rw-r--r--   1   root   root          28 Jan 01 00:00 issue.net 
     1218-rw-r--r--   1   root   root         102 Jan 01 00:00 passwd
     1219-rw-r--r--   1   root   root          42 Jan 01 00:00 group
     1220-rw-r--r--   1   root   root          30 Jan 01 00:00 issue
     1221-rw-r--r--   1   root   root          28 Jan 01 00:00 issue.net
    122112224 files 202 bytes occupied
    12221223SHLL [/etc] # chmod 0777 passwd
    1223 SHLL [/etc] # ls 
    1224 -rwxrwxrwx   1   root   root         102 Jan 01 00:00 passwd 
    1225 -rw-r--r--   1   root   root          42 Jan 01 00:00 group 
    1226 -rw-r--r--   1   root   root          30 Jan 01 00:00 issue 
    1227 -rw-r--r--   1   root   root          28 Jan 01 00:00 issue.net 
     1224SHLL [/etc] # ls
     1225-rwxrwxrwx   1   root   root         102 Jan 01 00:00 passwd
     1226-rw-r--r--   1   root   root          42 Jan 01 00:00 group
     1227-rw-r--r--   1   root   root          30 Jan 01 00:00 issue
     1228-rw-r--r--   1   root   root          28 Jan 01 00:00 issue.net
    122812294 files 202 bytes occupied
    12291230SHLL [/etc] # chmod 0322 passwd
    12301231SHLL [/etc] # ls
    1231 --wx-w--w-   1 nouser   root         102 Jan 01 00:00 passwd 
    1232 -rw-r--r--   1 nouser   root          42 Jan 01 00:00 group 
    1233 -rw-r--r--   1 nouser   root          30 Jan 01 00:00 issue 
    1234 -rw-r--r--   1 nouser   root          28 Jan 01 00:00 issue.net 
     1232--wx-w--w-   1 nouser   root         102 Jan 01 00:00 passwd
     1233-rw-r--r--   1 nouser   root          42 Jan 01 00:00 group
     1234-rw-r--r--   1 nouser   root          30 Jan 01 00:00 issue
     1235-rw-r--r--   1 nouser   root          28 Jan 01 00:00 issue.net
    123512364 files 202 bytes occupied
    12361237SHLL [/etc] # chmod 0644 passwd
    12371238SHLL [/etc] # ls
    1238 -rw-r--r--   1   root   root         102 Jan 01 00:00 passwd 
    1239 -rw-r--r--   1   root   root          42 Jan 01 00:00 group 
    1240 -rw-r--r--   1   root   root          30 Jan 01 00:00 issue 
    1241 -rw-r--r--   1   root   root          28 Jan 01 00:00 issue.net 
     1239-rw-r--r--   1   root   root         102 Jan 01 00:00 passwd
     1240-rw-r--r--   1   root   root          42 Jan 01 00:00 group
     1241-rw-r--r--   1   root   root          30 Jan 01 00:00 issue
     1242-rw-r--r--   1   root   root          28 Jan 01 00:00 issue.net
    124212434 files 202 bytes occupied
    12431244@end example
     
    12481249@findex CONFIGURE_SHELL_COMMAND_CHMOD
    12491250
    1250 This command is included in the default shell command set. 
     1251This command is included in the default shell command set.
    12511252When building a custom command set, define
    12521253@code{CONFIGURE_SHELL_COMMAND_CHMOD} to have this
     
    13201321@findex CONFIGURE_SHELL_COMMAND_CAT
    13211322
    1322 This command is included in the default shell command set. 
     1323This command is included in the default shell command set.
    13231324When building a custom command set, define
    13241325@code{CONFIGURE_SHELL_COMMAND_CAT} to have this
     
    13661367@subheading DESCRIPTION:
    13671368
    1368 This command deletes a name from the filesystem.  If the specified file name 
     1369This command deletes a name from the filesystem.  If the specified file name
    13691370was the last link to a file and there are no @code{open} file descriptor
    13701371references to that file, then it is deleted and the associated space in
     
    14041405@findex CONFIGURE_SHELL_COMMAND_RM
    14051406
    1406 This command is included in the default shell command set. 
     1407This command is included in the default shell command set.
    14071408When building a custom command set, define
    14081409@code{CONFIGURE_SHELL_COMMAND_RM} to have this
     
    15111512@findex CONFIGURE_SHELL_COMMAND_MOUNT
    15121513
    1513 This command is included in the default shell command set. 
     1514This command is included in the default shell command set.
    15141515When building a custom command set, define
    15151516@code{CONFIGURE_SHELL_COMMAND_MOUNT} to have this
     
    16041605@findex CONFIGURE_SHELL_COMMAND_UNMOUNT
    16051606
    1606 This command is included in the default shell command set. 
     1607This command is included in the default shell command set.
    16071608When building a custom command set, define
    16081609@code{CONFIGURE_SHELL_COMMAND_UNMOUNT} to have this
     
    16731674@findex CONFIGURE_SHELL_COMMAND_BLKSYNC
    16741675
    1675 This command is included in the default shell command set. 
     1676This command is included in the default shell command set.
    16761677When building a custom command set, define
    16771678@code{CONFIGURE_SHELL_COMMAND_BLKSYNC} to have this
     
    20702071version character (unlike the fprintf(3) default which prints the
    20712072entire string if the precision is unspecified).
    2072 @item 
     2073@item
    20732074The conversion characters ``h'', ``l'', ``n'', ``p'' and ``q'' are not
    20742075supported.
     
    22442245@findex CONFIGURE_SHELL_COMMAND_FDISK
    22452246
    2246 This command is included in the default shell command set. 
     2247This command is included in the default shell command set.
    22472248When building a custom command set, define
    22482249@code{CONFIGURE_SHELL_COMMAND_FDISK} to have this
     
    22692270@subheading DESCRIPTION:
    22702271
    2271 This command is an alias or alternate name for the @code{ls}. 
     2272This command is an alias or alternate name for the @code{ls}.
    22722273See @ref{File and Directory Commands ls - list files in the directory, ls}
    22732274for more information.
     
    229122922 files 1608 bytes occupied
    22922293SHLL [/] $ dir etc
    2293 -rw-r--r--   1   root   root         102 Jan 01 00:00 passwd 
    2294 -rw-r--r--   1   root   root          42 Jan 01 00:00 group 
    2295 -rw-r--r--   1   root   root          30 Jan 01 00:00 issue 
    2296 -rw-r--r--   1   root   root          28 Jan 01 00:00 issue.net 
     2294-rw-r--r--   1   root   root         102 Jan 01 00:00 passwd
     2295-rw-r--r--   1   root   root          42 Jan 01 00:00 group
     2296-rw-r--r--   1   root   root          30 Jan 01 00:00 issue
     2297-rw-r--r--   1   root   root          28 Jan 01 00:00 issue.net
    229722984 files 202 bytes occupied
    22982299@end example
     
    23032304@findex CONFIGURE_SHELL_COMMAND_DIR
    23042305
    2305 This command is included in the default shell command set. 
     2306This command is included in the default shell command set.
    23062307When building a custom command set, define
    23072308@code{CONFIGURE_SHELL_COMMAND_DIR} to have this
     
    24082409@findex CONFIGURE_SHELL_COMMAND_MKRFS
    24092410
    2410 This command is included in the default shell command set. 
     2411This command is included in the default shell command set.
    24112412When building a custom command set, define
    24122413@code{CONFIGURE_SHELL_COMMAND_MKRFS} to have this
     
    24492450
    24502451@example
    2451 debugrfs [-hl] path command [options] 
     2452debugrfs [-hl] path command [options]
    24522453@end example
    24532454
     
    24772478
    24782479@item data
    2479 Display the file system data and configuration. 
     2480Display the file system data and configuration.
    24802481
    24812482@item dir bno
     
    25202521@findex CONFIGURE_SHELL_COMMAND_DEBUGRFS
    25212522
    2522 This command is included in the default shell command set. 
     2523This command is included in the default shell command set.
    25232524When building a custom command set, define
    25242525@code{CONFIGURE_SHELL_COMMAND_DEBUGRFS} to have this
     
    25662567@subheading DESCRIPTION:
    25672568
    2568 This command is an alias or alternate name for the @code{chdir}. 
     2569This command is an alias or alternate name for the @code{chdir}.
    25692570See @ref{File and Directory Commands chdir - change the current directory, cd}
    25702571for more information.
     
    26022603@findex CONFIGURE_SHELL_COMMAND_CD
    26032604
    2604 This command is included in the default shell command set. 
     2605This command is included in the default shell command set.
    26052606When building a custom command set, define
    26062607@code{CONFIGURE_SHELL_COMMAND_CD} to have this
     
    26792680@findex CONFIGURE_SHELL_COMMAND_DF
    26802681
    2681 This command is included in the default shell command set. 
     2682This command is included in the default shell command set.
    26822683When building a custom command set, define
    26832684@code{CONFIGURE_SHELL_COMMAND_DF} to have this
     
    27092710@end example
    27102711
     2712@c
     2713@c
     2714@c
     2715@page
     2716@subsection md5 - compute the Md5 hash of a file or list of files
     2717
     2718@pgindex md5
     2719
     2720@subheading SYNOPSYS:
     2721
     2722@example
     2723md5 <files>
     2724@end example
     2725
     2726@subheading DESCRIPTION:
     2727
     2728This command prints the MD5 of a file. You can provide one or more
     2729files on the command line and a hash for each file is printed in a
     2730single line of output.
     2731
     2732@subheading EXIT STATUS:
     2733
     2734This command returns 0 on success and non-zero if an error is encountered.
     2735
     2736@subheading NOTES:
     2737
     2738NONE
     2739
     2740@subheading EXAMPLES:
     2741
     2742The following is an example of how to use @code{md5}:
     2743
     2744@example
     2745SHLL [/] $ md5 shell-init
     2746MD5 (shell-init) = 43b4d2e71b47db79eae679a2efeacf31
     2747@end example
     2748
     2749@subheading CONFIGURATION:
     2750
     2751@findex CONFIGURE_SHELL_NO_COMMAND_MD5
     2752@findex CONFIGURE_SHELL_COMMAND_MD5
     2753
     2754This command is included in the default shell command set.
     2755When building a custom command set, define
     2756@code{CONFIGURE_SHELL_COMMAND_MD5} to have this
     2757command included.
     2758
     2759This command can be excluded from the shell command set by
     2760defining @code{CONFIGURE_SHELL_NO_COMMAND_MD5} when all
     2761shell commands have been configured.
     2762
     2763@subheading PROGRAMMING INFORMATION:
     2764
     2765@findex rtems_shell_rtems_main_md5
     2766
     2767The @code{df} is implemented by a C language function
     2768which has the following prototype:
     2769
     2770@example
     2771int rtems_shell_main_md5(
     2772  int argc,
     2773  char **argv
     2774);
     2775@end example
     2776
     2777The configuration structure for the @code{md5} has the
     2778following prototype:
     2779
     2780@example
     2781extern rtems_shell_cmd_t rtems_shell_MD5_Command;
     2782@end example
Note: See TracChangeset for help on using the changeset viewer.