file_opts.h 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Table of command-line options
  3. *
  4. * The first column specifies the short name, if any, or 0 if none.
  5. * The second column specifies the long name.
  6. * The third column specifies whether it takes a parameter.
  7. * The fourth colums specifies whether is is marked as "default"
  8. * if POSIXLY_CORRECT is defined: 1,
  9. * if POSIXLY_CORRECT is not defined: 2.
  10. * The fifth column is the documentation.
  11. *
  12. * N.B. The long options' order must correspond to the code in file.c,
  13. * and OPTSTRING must be kept up-to-date with the short options.
  14. * Pay particular attention to the numbers of long-only options in the
  15. * switch statement!
  16. */
  17. OPT_LONGONLY("help", 0, 0, " display this help and exit\n", OPT_HELP)
  18. OPT('v', "version", 0, 0, " output version information and exit\n")
  19. OPT('m', "magic-file", 1, 0, " LIST use LIST as a colon-separated list of magic\n"
  20. " number files\n")
  21. OPT('z', "uncompress", 0, 0, " try to look inside compressed files\n")
  22. OPT('Z', "uncompress-noreport", 0, 0, " only print the contents of compressed files\n")
  23. OPT('b', "brief", 0, 0, " do not prepend filenames to output lines\n")
  24. OPT('c', "checking-printout", 0, 0, " print the parsed form of the magic file, use in\n"
  25. " conjunction with -m to debug a new magic file\n"
  26. " before installing it\n")
  27. OPT('e', "exclude", 1, 0, " TEST exclude TEST from the list of test to be\n"
  28. " performed for file. Valid tests are:\n"
  29. " %o\n")
  30. OPT('f', "files-from", 1, 0, " FILE read the filenames to be examined from FILE\n")
  31. OPT('F', "separator", 1, 0, " STRING use string as separator instead of `:'\n")
  32. OPT('i', "mime", 0, 0, " output MIME type strings (--mime-type and\n"
  33. " --mime-encoding)\n")
  34. OPT_LONGONLY("apple", 0, 0, " output the Apple CREATOR/TYPE\n", OPT_APPLE)
  35. OPT_LONGONLY("extension", 0, 0, " output a slash-separated list of extensions\n", OPT_EXTENSIONS)
  36. OPT_LONGONLY("mime-type", 0, 0, " output the MIME type\n", OPT_MIME_TYPE)
  37. OPT_LONGONLY("mime-encoding", 0, 0, " output the MIME encoding\n", OPT_MIME_ENCODING)
  38. OPT('k', "keep-going", 0, 0, " don't stop at the first match\n")
  39. OPT('l', "list", 0, 0, " list magic strength\n")
  40. #ifdef S_IFLNK
  41. OPT('L', "dereference", 0, 1, " follow symlinks")
  42. OPT('h', "no-dereference", 0, 2, " don't follow symlinks")
  43. #endif
  44. OPT('n', "no-buffer", 0, 0, " do not buffer output\n")
  45. OPT('N', "no-pad", 0, 0, " do not pad output\n")
  46. OPT('0', "print0", 0, 0, " terminate filenames with ASCII NUL\n")
  47. #if defined(HAVE_UTIME) || defined(HAVE_UTIMES)
  48. OPT('p', "preserve-date", 0, 0, " preserve access times on files\n")
  49. #endif
  50. OPT('P', "parameter", 1, 0, " set file engine parameter limits\n"
  51. " indir 15 recursion limit for indirection\n"
  52. " name 30 use limit for name/use magic\n"
  53. " elf_notes 256 max ELF notes processed\n"
  54. " elf_phnum 128 max ELF prog sections processed\n"
  55. " elf_shnum 32768 max ELF sections processed\n")
  56. OPT('r', "raw", 0, 0, " don't translate unprintable chars to \\ooo\n")
  57. OPT('s', "special-files", 0, 0, " treat special (block/char devices) files as\n"
  58. " ordinary ones\n")
  59. OPT('S', "no-sandbox", 0, 0, " disable system call sandboxing\n")
  60. OPT('C', "compile", 0, 0, " compile file specified by -m\n")
  61. OPT('d', "debug", 0, 0, " print debugging messages\n")