⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 options.c

📁 Rsync 3.0.5 source code
💻 C
📖 第 1 页 / 共 5 页
字号:
  rprintf(F,"     --max-delete=NUM        don't delete more than NUM files\n");  rprintf(F,"     --max-size=SIZE         don't transfer any file larger than SIZE\n");  rprintf(F,"     --min-size=SIZE         don't transfer any file smaller than SIZE\n");  rprintf(F,"     --partial               keep partially transferred files\n");  rprintf(F,"     --partial-dir=DIR       put a partially transferred file into DIR\n");  rprintf(F,"     --delay-updates         put all updated files into place at transfer's end\n");  rprintf(F," -m, --prune-empty-dirs      prune empty directory chains from the file-list\n");  rprintf(F,"     --numeric-ids           don't map uid/gid values by user/group name\n");  rprintf(F,"     --timeout=SECONDS       set I/O timeout in seconds\n");  rprintf(F,"     --contimeout=SECONDS    set daemon connection timeout in seconds\n");  rprintf(F," -I, --ignore-times          don't skip files that match in size and mod-time\n");  rprintf(F,"     --size-only             skip files that match in size\n");  rprintf(F,"     --modify-window=NUM     compare mod-times with reduced accuracy\n");  rprintf(F," -T, --temp-dir=DIR          create temporary files in directory DIR\n");  rprintf(F," -y, --fuzzy                 find similar file for basis if no dest file\n");  rprintf(F,"     --compare-dest=DIR      also compare destination files relative to DIR\n");  rprintf(F,"     --copy-dest=DIR         ... and include copies of unchanged files\n");  rprintf(F,"     --link-dest=DIR         hardlink to files in DIR when unchanged\n");  rprintf(F," -z, --compress              compress file data during the transfer\n");  rprintf(F,"     --compress-level=NUM    explicitly set compression level\n");  rprintf(F,"     --skip-compress=LIST    skip compressing files with a suffix in LIST\n");  rprintf(F," -C, --cvs-exclude           auto-ignore files the same way CVS does\n");  rprintf(F," -f, --filter=RULE           add a file-filtering RULE\n");  rprintf(F," -F                          same as --filter='dir-merge /.rsync-filter'\n");  rprintf(F,"                             repeated: --filter='- .rsync-filter'\n");  rprintf(F,"     --exclude=PATTERN       exclude files matching PATTERN\n");  rprintf(F,"     --exclude-from=FILE     read exclude patterns from FILE\n");  rprintf(F,"     --include=PATTERN       don't exclude files matching PATTERN\n");  rprintf(F,"     --include-from=FILE     read include patterns from FILE\n");  rprintf(F,"     --files-from=FILE       read list of source-file names from FILE\n");  rprintf(F," -0, --from0                 all *-from/filter files are delimited by 0s\n");  rprintf(F," -s, --protect-args          no space-splitting; only wildcard special-chars\n");  rprintf(F,"     --address=ADDRESS       bind address for outgoing socket to daemon\n");  rprintf(F,"     --port=PORT             specify double-colon alternate port number\n");  rprintf(F,"     --sockopts=OPTIONS      specify custom TCP options\n");  rprintf(F,"     --blocking-io           use blocking I/O for the remote shell\n");  rprintf(F,"     --stats                 give some file-transfer stats\n");  rprintf(F," -8, --8-bit-output          leave high-bit chars unescaped in output\n");  rprintf(F," -h, --human-readable        output numbers in a human-readable format\n");  rprintf(F,"     --progress              show progress during transfer\n");  rprintf(F," -P                          same as --partial --progress\n");  rprintf(F," -i, --itemize-changes       output a change-summary for all updates\n");  rprintf(F,"     --out-format=FORMAT     output updates using the specified FORMAT\n");  rprintf(F,"     --log-file=FILE         log what we're doing to the specified FILE\n");  rprintf(F,"     --log-file-format=FMT   log updates using the specified FMT\n");  rprintf(F,"     --password-file=FILE    read daemon-access password from FILE\n");  rprintf(F,"     --list-only             list the files instead of copying them\n");  rprintf(F,"     --bwlimit=KBPS          limit I/O bandwidth; KBytes per second\n");  rprintf(F,"     --write-batch=FILE      write a batched update to FILE\n");  rprintf(F,"     --only-write-batch=FILE like --write-batch but w/o updating destination\n");  rprintf(F,"     --read-batch=FILE       read a batched update from FILE\n");  rprintf(F,"     --protocol=NUM          force an older protocol version to be used\n");#ifdef ICONV_OPTION  rprintf(F,"     --iconv=CONVERT_SPEC    request charset conversion of filenames\n");#endif  rprintf(F," -4, --ipv4                  prefer IPv4\n");  rprintf(F," -6, --ipv6                  prefer IPv6\n");  rprintf(F,"     --version               print version number\n");  rprintf(F,"(-h) --help                  show this help (-h works with no other options)\n");  rprintf(F,"\n");  rprintf(F,"Use \"rsync --daemon --help\" to see the daemon-mode command-line options.\n");  rprintf(F,"Please see the rsync(1) and rsyncd.conf(5) man pages for full documentation.\n");  rprintf(F,"See http://rsync.samba.org/ for updates, bug reports, and answers\n");}enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,      OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_HELP,      OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,      OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,      OPT_NO_D, OPT_APPEND, OPT_NO_ICONV,      OPT_SERVER, OPT_REFUSED_BASE = 9000};static struct poptOption long_options[] = {  /* longName, shortName, argInfo, argPtr, value, descrip, argDesc */  {"help",             0,  POPT_ARG_NONE,   0, OPT_HELP, 0, 0 },  {"version",          0,  POPT_ARG_NONE,   0, OPT_VERSION, 0, 0},  {"verbose",         'v', POPT_ARG_NONE,   0, 'v', 0, 0 },  {"no-verbose",       0,  POPT_ARG_VAL,    &verbose, 0, 0, 0 },  {"no-v",             0,  POPT_ARG_VAL,    &verbose, 0, 0, 0 },  {"quiet",           'q', POPT_ARG_NONE,   0, 'q', 0, 0 },  {"motd",             0,  POPT_ARG_VAL,    &output_motd, 1, 0, 0 },  {"no-motd",          0,  POPT_ARG_VAL,    &output_motd, 0, 0, 0 },  {"stats",            0,  POPT_ARG_NONE,   &do_stats, 0, 0, 0 },  {"human-readable",  'h', POPT_ARG_NONE,   0, 'h', 0, 0},  {"no-human-readable",0,  POPT_ARG_VAL,    &human_readable, 0, 0, 0},  {"no-h",             0,  POPT_ARG_VAL,    &human_readable, 0, 0, 0},  {"dry-run",         'n', POPT_ARG_NONE,   &dry_run, 0, 0, 0 },  {"archive",         'a', POPT_ARG_NONE,   0, 'a', 0, 0 },  {"recursive",       'r', POPT_ARG_VAL,    &recurse, 2, 0, 0 },  {"no-recursive",     0,  POPT_ARG_VAL,    &recurse, 0, 0, 0 },  {"no-r",             0,  POPT_ARG_VAL,    &recurse, 0, 0, 0 },  {"inc-recursive",    0,  POPT_ARG_VAL,    &allow_inc_recurse, 1, 0, 0 },  {"no-inc-recursive", 0,  POPT_ARG_VAL,    &allow_inc_recurse, 0, 0, 0 },  {"i-r",              0,  POPT_ARG_VAL,    &allow_inc_recurse, 1, 0, 0 },  {"no-i-r",           0,  POPT_ARG_VAL,    &allow_inc_recurse, 0, 0, 0 },  {"dirs",            'd', POPT_ARG_VAL,    &xfer_dirs, 2, 0, 0 },  {"no-dirs",          0,  POPT_ARG_VAL,    &xfer_dirs, 0, 0, 0 },  {"no-d",             0,  POPT_ARG_VAL,    &xfer_dirs, 0, 0, 0 },  {"old-dirs",         0,  POPT_ARG_VAL,    &xfer_dirs, 4, 0, 0 },  {"old-d",            0,  POPT_ARG_VAL,    &xfer_dirs, 4, 0, 0 },  {"perms",           'p', POPT_ARG_VAL,    &preserve_perms, 1, 0, 0 },  {"no-perms",         0,  POPT_ARG_VAL,    &preserve_perms, 0, 0, 0 },  {"no-p",             0,  POPT_ARG_VAL,    &preserve_perms, 0, 0, 0 },  {"executability",   'E', POPT_ARG_NONE,   &preserve_executability, 0, 0, 0 },  {"acls",            'A', POPT_ARG_NONE,   0, 'A', 0, 0 },  {"no-acls",          0,  POPT_ARG_VAL,    &preserve_acls, 0, 0, 0 },  {"no-A",             0,  POPT_ARG_VAL,    &preserve_acls, 0, 0, 0 },  {"xattrs",          'X', POPT_ARG_NONE,   0, 'X', 0, 0 },  {"no-xattrs",        0,  POPT_ARG_VAL,    &preserve_xattrs, 0, 0, 0 },  {"no-X",             0,  POPT_ARG_VAL,    &preserve_xattrs, 0, 0, 0 },  {"times",           't', POPT_ARG_VAL,    &preserve_times, 2, 0, 0 },  {"no-times",         0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },  {"no-t",             0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },  {"omit-dir-times",  'O', POPT_ARG_VAL,    &omit_dir_times, 1, 0, 0 },  {"no-omit-dir-times",0,  POPT_ARG_VAL,    &omit_dir_times, 0, 0, 0 },  {"no-O",             0,  POPT_ARG_VAL,    &omit_dir_times, 0, 0, 0 },  {"modify-window",    0,  POPT_ARG_INT,    &modify_window, OPT_MODIFY_WINDOW, 0, 0 },  {"super",            0,  POPT_ARG_VAL,    &am_root, 2, 0, 0 },  {"no-super",         0,  POPT_ARG_VAL,    &am_root, 0, 0, 0 },  {"fake-super",       0,  POPT_ARG_VAL,    &am_root, -1, 0, 0 },  {"owner",           'o', POPT_ARG_VAL,    &preserve_uid, 1, 0, 0 },  {"no-owner",         0,  POPT_ARG_VAL,    &preserve_uid, 0, 0, 0 },  {"no-o",             0,  POPT_ARG_VAL,    &preserve_uid, 0, 0, 0 },  {"group",           'g', POPT_ARG_VAL,    &preserve_gid, 1, 0, 0 },  {"no-group",         0,  POPT_ARG_VAL,    &preserve_gid, 0, 0, 0 },  {"no-g",             0,  POPT_ARG_VAL,    &preserve_gid, 0, 0, 0 },  {0,                 'D', POPT_ARG_NONE,   0, 'D', 0, 0 },  {"no-D",             0,  POPT_ARG_NONE,   0, OPT_NO_D, 0, 0 },  {"devices",          0,  POPT_ARG_VAL,    &preserve_devices, 1, 0, 0 },  {"no-devices",       0,  POPT_ARG_VAL,    &preserve_devices, 0, 0, 0 },  {"specials",         0,  POPT_ARG_VAL,    &preserve_specials, 1, 0, 0 },  {"no-specials",      0,  POPT_ARG_VAL,    &preserve_specials, 0, 0, 0 },  {"links",           'l', POPT_ARG_VAL,    &preserve_links, 1, 0, 0 },  {"no-links",         0,  POPT_ARG_VAL,    &preserve_links, 0, 0, 0 },  {"no-l",             0,  POPT_ARG_VAL,    &preserve_links, 0, 0, 0 },  {"copy-links",      'L', POPT_ARG_NONE,   &copy_links, 0, 0, 0 },  {"copy-unsafe-links",0,  POPT_ARG_NONE,   &copy_unsafe_links, 0, 0, 0 },  {"safe-links",       0,  POPT_ARG_NONE,   &safe_symlinks, 0, 0, 0 },  {"copy-dirlinks",   'k', POPT_ARG_NONE,   &copy_dirlinks, 0, 0, 0 },  {"keep-dirlinks",   'K', POPT_ARG_NONE,   &keep_dirlinks, 0, 0, 0 },  {"hard-links",      'H', POPT_ARG_NONE,   0, 'H', 0, 0 },  {"no-hard-links",    0,  POPT_ARG_VAL,    &preserve_hard_links, 0, 0, 0 },  {"no-H",             0,  POPT_ARG_VAL,    &preserve_hard_links, 0, 0, 0 },  {"relative",        'R', POPT_ARG_VAL,    &relative_paths, 1, 0, 0 },  {"no-relative",      0,  POPT_ARG_VAL,    &relative_paths, 0, 0, 0 },  {"no-R",             0,  POPT_ARG_VAL,    &relative_paths, 0, 0, 0 },  {"implied-dirs",     0,  POPT_ARG_VAL,    &implied_dirs, 1, 0, 0 },  {"no-implied-dirs",  0,  POPT_ARG_VAL,    &implied_dirs, 0, 0, 0 },  {"i-d",              0,  POPT_ARG_VAL,    &implied_dirs, 1, 0, 0 },  {"no-i-d",           0,  POPT_ARG_VAL,    &implied_dirs, 0, 0, 0 },  {"chmod",            0,  POPT_ARG_STRING, 0, OPT_CHMOD, 0, 0 },  {"ignore-times",    'I', POPT_ARG_NONE,   &ignore_times, 0, 0, 0 },  {"size-only",        0,  POPT_ARG_NONE,   &size_only, 0, 0, 0 },  {"one-file-system", 'x', POPT_ARG_NONE,   0, 'x', 0, 0 },  {"no-one-file-system",'x',POPT_ARG_VAL,   &one_file_system, 0, 0, 0 },  {"no-x",            'x', POPT_ARG_VAL,    &one_file_system, 0, 0, 0 },  {"update",          'u', POPT_ARG_NONE,   &update_only, 0, 0, 0 },  {"existing",         0,  POPT_ARG_NONE,   &ignore_non_existing, 0, 0, 0 },  {"ignore-non-existing",0,POPT_ARG_NONE,   &ignore_non_existing, 0, 0, 0 },  {"ignore-existing",  0,  POPT_ARG_NONE,   &ignore_existing, 0, 0, 0 },  {"max-size",         0,  POPT_ARG_STRING, &max_size_arg, OPT_MAX_SIZE, 0, 0 },  {"min-size",         0,  POPT_ARG_STRING, &min_size_arg, OPT_MIN_SIZE, 0, 0 },  {"sparse",          'S', POPT_ARG_VAL,    &sparse_files, 1, 0, 0 },  {"no-sparse",        0,  POPT_ARG_VAL,    &sparse_files, 0, 0, 0 },  {"no-S",             0,  POPT_ARG_VAL,    &sparse_files, 0, 0, 0 },  {"inplace",          0,  POPT_ARG_VAL,    &inplace, 1, 0, 0 },  {"no-inplace",       0,  POPT_ARG_VAL,    &inplace, 0, 0, 0 },  {"append",           0,  POPT_ARG_NONE,   0, OPT_APPEND, 0, 0 },  {"append-verify",    0,  POPT_ARG_VAL,    &append_mode, 2, 0, 0 },  {"no-append",        0,  POPT_ARG_VAL,    &append_mode, 0, 0, 0 },  {"del",              0,  POPT_ARG_NONE,   &delete_during, 0, 0, 0 },  {"delete",           0,  POPT_ARG_NONE,   &delete_mode, 0, 0, 0 },  {"delete-before",    0,  POPT_ARG_NONE,   &delete_before, 0, 0, 0 },  {"delete-during",    0,  POPT_ARG_VAL,    &delete_during, 1, 0, 0 },  {"delete-delay",     0,  POPT_ARG_VAL,    &delete_during, 2, 0, 0 },  {"delete-after",     0,  POPT_ARG_NONE,   &delete_after, 0, 0, 0 },  {"delete-excluded",  0,  POPT_ARG_NONE,   &delete_excluded, 0, 0, 0 },  {"remove-sent-files",0,  POPT_ARG_VAL,    &remove_source_files, 2, 0, 0 }, /* deprecated */  {"remove-source-files",0,POPT_ARG_VAL,    &remove_source_files, 1, 0, 0 },  {"force",            0,  POPT_ARG_VAL,    &force_delete, 1, 0, 0 },  {"no-force",         0,  POPT_ARG_VAL,    &force_delete, 0, 0, 0 },  {"ignore-errors",    0,  POPT_ARG_VAL,    &ignore_errors, 1, 0, 0 },  {"no-ignore-errors", 0,  POPT_ARG_VAL,    &ignore_errors, 0, 0, 0 },  {"max-delete",       0,  POPT_ARG_INT,    &max_delete, 0, 0, 0 },  {0,                 'F', POPT_ARG_NONE,   0, 'F', 0, 0 },  {"filter",          'f', POPT_ARG_STRING, 0, OPT_FILTER, 0, 0 },  {"exclude",          0,  POPT_ARG_STRING, 0, OPT_EXCLUDE, 0, 0 },  {"include",          0,  POPT_ARG_STRING, 0, OPT_INCLUDE, 0, 0 },  {"exclude-from",     0,  POPT_ARG_STRING, 0, OPT_EXCLUDE_FROM, 0, 0 },  {"include-from",     0,  POPT_ARG_STRING, 0, OPT_INCLUDE_FROM, 0, 0 },  {"cvs-exclude",     'C', POPT_ARG_NONE,   &cvs_exclude, 0, 0, 0 },  {"whole-file",      'W', POPT_ARG_VAL,    &whole_file, 1, 0, 0 },  {"no-whole-file",    0,  POPT_ARG_VAL,    &whole_file, 0, 0, 0 },  {"no-W",             0,  POPT_ARG_VAL,    &whole_file, 0, 0, 0 },  {"checksum",        'c', POPT_ARG_VAL,    &always_checksum, 1, 0, 0 },  {"no-checksum",      0,  POPT_ARG_VAL,    &always_checksum, 0, 0, 0 },  {"no-c",             0,  POPT_ARG_VAL,    &always_checksum, 0, 0, 0 },  {"block-size",      'B', POPT_ARG_LONG,   &block_size, 0, 0, 0 },  {"compare-dest",     0,  POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },  {"copy-dest",        0,  POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },  {"link-dest",        0,  POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },  {"fuzzy",           'y', POPT_ARG_VAL,    &fuzzy_basis, 1, 0, 0 },  {"no-fuzzy",         0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },  {"no-y",             0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },  {"compress",        'z', POPT_ARG_NONE,   0, 'z', 0, 0 },  {"no-compress",      0,  POPT_ARG_VAL,    &do_compression, 0, 0, 0 },  {"no-z",             0,  POPT_ARG_VAL,    &do_compression, 0, 0, 0 },  {"skip-compress",    0,  POPT_ARG_STRING, &skip_compress, 0, 0, 0 },  {"compress-level",   0,  POPT_ARG_INT,    &def_compress_level, 'z', 0, 0 },  {0,                 'P', POPT_ARG_NONE,   0, 'P', 0, 0 },  {"progress",         0,  POPT_ARG_VAL,    &do_progress, 1, 0, 0 },  {"no-progress",      0,  POPT_ARG_VAL,    &do_progress, 0, 0, 0 },  {"partial",          0,  POPT_ARG_VAL,    &keep_partial, 1, 0, 0 },  {"no-partial",       0,  POPT_ARG_VAL,    &keep_partial, 0, 0, 0 },  {"partial-dir",      0,  POPT_ARG_STRING, &partial_dir, 0, 0, 0 },  {"delay-updates",    0,  POPT_ARG_VAL,    &delay_updates, 1, 0, 0 },  {"no-delay-updates", 0,  POPT_ARG_VAL,    &delay_updates, 0, 0, 0 },  {"prune-empty-dirs",'m', POPT_ARG_VAL,    &prune_empty_dirs, 1, 0, 0 },  {"no-prune-empty-dirs",0,POPT_ARG_VAL,    &prune_empty_dirs, 0, 0, 0 },  {"no-m",             0,  POPT_ARG_VAL,    &prune_empty_dirs, 0, 0, 0 },  {"log-file",         0,  POPT_ARG_STRING, &logfile_name, 0, 0, 0 },  {"log-file-format",  0,  POPT_ARG_STRING, &logfile_format, 0, 0, 0 },  {"out-format",       0,  POPT_ARG_STRING, &stdout_format, 0, 0, 0 },  {"log-format",       0,  POPT_ARG_STRING, &stdout_format, 0, 0, 0 }, /* DEPRECATED */  {"itemize-changes", 'i', POPT_ARG_NONE,   0, 'i', 0, 0 },  {"no-itemize-changes",0, POPT_ARG_VAL,    &itemize_changes, 0, 0, 0 },  {"no-i",             0,  POPT_ARG_VAL,    &itemize_changes, 0, 0, 0 },  {"bwlimit",          0,  POPT_ARG_INT,    &bwlimit, 0, 0, 0 },  {"no-bwlimit",       0,  POPT_ARG_VAL,    &bwlimit, 0, 0, 0 },  {"backup",          'b', POPT_ARG_VAL,    &make_backups, 1, 0, 0 },  {"no-backup",        0,  POPT_ARG_VAL,    &make_backups, 0, 0, 0 },  {"backup-dir",       0,  POPT_ARG_STRING, &backup_dir, 0, 0, 0 },  {"suffix",           0,  POPT_ARG_STRING, &backup_suffix, 0, 0, 0 },  {"list-only",        0,  POPT_ARG_VAL,    &list_only, 2, 0, 0 },  {"read-batch",       0,  POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },  {"write-batch",      0,  POPT_ARG_STRING, &batch_name, OPT_WRITE_BATCH, 0, 0 },  {"only-write-batch", 0,  POPT_ARG_STRING, &batch_name, OPT_ONLY_WRITE_BATCH, 0, 0 },  {"files-from",       0,  POPT_ARG_STRING, &files_from, 0, 0, 0 },  {"from0",           '0', POPT_ARG_VAL,    &eol_nulls, 1, 0, 0},  {"no-from0",         0,  POPT_ARG_VAL,    &eol_nulls, 0, 0, 0},  {"protect-args",    's', POPT_ARG_VAL,    &protect_args, 1, 0, 0},  {"no-protect-args",  0,  POPT_ARG_VAL,    &protect_args, 0, 0, 0},  {"no-s",             0,  POPT_ARG_VAL,    &protect_args, 0, 0, 0},  {"numeric-ids",      0,  POPT_ARG_VAL,    &numeric_ids, 1, 0, 0 },  {"no-numeric-ids",   0,  POPT_ARG_VAL,    &numeric_ids, 0, 0, 0 },  {"timeout",          0,  POPT_ARG_INT,    &io_timeout, 0, 0, 0 },  {"no-timeout",       0,  POPT_ARG_VAL,    &io_timeout, 0, 0, 0 },  {"contimeout",       0,  POPT_ARG_INT,    &connect_timeout, 0, 0, 0 },  {"no-contimeout",    0,  POPT_ARG_VAL,    &connect_timeout, 0, 0, 0 },  {"rsh",             'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },  {"rsync-path",       0,  POPT_ARG_STRING, &rsync_path, 0, 0, 0 },  {"temp-dir",        'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },#ifdef ICONV_OPTION  {"iconv",            0,  POPT_ARG_STRING, &iconv_opt, 0, 0, 0 },  {"no-iconv",         0,  POPT_ARG_NONE,   0, OPT_NO_ICONV, 0, 0 },#endif  {"ipv4",            '4', POPT_ARG_VAL,    &default_af_hint, AF_INET, 0, 0 },  {"ipv6",            '6', POPT_ARG_VAL,    &default_af_hint, AF_INET6, 0, 0 },  {"8-bit-output",    '8', POPT_ARG_VAL,    &allow_8bit_chars, 1, 0, 0 },  {"no-8-bit-output",  0,  POPT_ARG_VAL,    &allow_8bit_chars, 0, 0, 0 },  {"no-8",             0,  POPT_ARG_VAL,    &allow_8bit_chars, 0, 0, 0 },  {"qsort",            0,  POPT_ARG_NONE,   &use_qsort, 0, 0, 0 },  {"address",          0,  POPT_ARG_STRING, &bind_address, 0, 0, 0 },  {"port",             0,  POPT_ARG_INT,    &rsync_port, 0, 0, 0 },  {"sockopts",         0,  POPT_ARG_STRING, &sockopts, 0, 0, 0 },  {"password-file",    0,  POPT_ARG_STRING, &password_file, 0, 0, 0 },  {"blocking-io",      0,  POPT_ARG_VAL,    &blocking_io, 1, 0, 0 },  {"no-blocking-io",   0,  POPT_ARG_VAL,    &blocking_io, 0, 0, 0 },  {"protocol",         0,  POPT_ARG_INT,    &protocol_version, 0, 0, 0 },  {"checksum-seed",    0,  POPT_ARG_INT,    &checksum_seed, 0, 0, 0 },  {"server",           0,  POPT_ARG_NONE,   0, OPT_SERVER, 0, 0 },  {"sender",           0,  POPT_ARG_NONE,   0, OPT_SENDER, 0, 0 },  /* All the following options switch us into daemon-mode option-parsing. */  {"config",           0,  POPT_ARG_STRING, 0, OPT_DAEMON, 0, 0 },  {"daemon",           0,  POPT_ARG_NONE,   0, OPT_DAEMON, 0, 0 },  {"detach",           0,  POPT_ARG_NONE,   0, OPT_DAEMON, 0, 0 },  {"no-detach",        0,  POPT_ARG_NONE,   0, OPT_DAEMON, 0, 0 },  {0,0,0,0, 0, 0, 0}};static void daemon_usage(enum logcode F){  print_rsync_version(F);  rprintf(F,"\n");  rprintf(F,"Usage: rsync --daemon [OPTION]...\n");  rprintf(F,"     --address=ADDRESS       bind to the specified address\n");  rprintf(F,"     --bwlimit=KBPS          limit I/O bandwidth; KBytes per second\n");  rprintf(F,"     --config=FILE           specify alternate rsyncd.conf file\n");  rprintf(F,"     --no-detach             do not detach from the parent\n");  rprintf(F,"     --port=PORT             listen on alternate port number\n");  rprintf(F,"     --log-file=FILE         override the \"log file\" setting\n");  rprintf(F,"     --log-file-format=FMT   override the \"log format\" setting\n");  rprintf(F,"     --sockopts=OPTIONS      specify custom TCP options\n");  rprintf(F," -v, --verbose               increase verbosity\n");  rprintf(F," -4, --ipv4                  prefer IPv4\n");  rprintf(F," -6, --ipv6                  prefer IPv6\n");  rprintf(F,"     --help                  show this help screen\n");  rprintf(F,"\n");  rprintf(F,"If you were not trying to invoke rsync as a daemon, avoid using any of the\n");  rprintf(F,"daemon-specific rsync options.  See also the rsyncd.conf(5) man page.\n");}static struct poptOption long_daemon_options[] = {  /* longName, shortName, argInfo, argPtr, value, descrip, argDesc */  {"address",          0,  POPT_ARG_STRING, &bind_address, 0, 0, 0 },  {"bwlimit",          0,  POPT_ARG_INT,    &daemon_bwlimit, 0, 0, 0 },  {"config",           0,  POPT_ARG_STRING, &config_file, 0, 0, 0 },  {"daemon",           0,  POPT_ARG_NONE,   &daemon_opt, 0, 0, 0 },  {"ipv4",            '4', POPT_ARG_VAL,    &default_af_hint, AF_INET, 0, 0 },  {"ipv6",            '6', POPT_ARG_VAL,    &default_af_hint, AF_INET6, 0, 0 },  {"detach",           0,  POPT_ARG_VAL,    &no_detach, 0, 0, 0 },  {"no-detach",        0,  POPT_ARG_VAL,    &no_detach, 1, 0, 0 },  {"log-file",         0,  POPT_ARG_STRING, &logfile_name, 0, 0, 0 },  {"log-file-format",  0,  POPT_ARG_STRING, &logfile_format, 0, 0, 0 },  {"port",             0,  POPT_ARG_INT,    &rsync_port, 0, 0, 0 },  {"sockopts",         0,  POPT_ARG_STRING, &sockopts, 0, 0, 0 },  {"protocol",         0,  POPT_ARG_INT,    &protocol_version, 0, 0, 0 },  {"server",           0,  POPT_ARG_NONE,   &am_server, 0, 0, 0 },  {"temp-dir",        'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },  {"verbose",         'v', POPT_ARG_NONE,   0, 'v', 0, 0 },  {"no-verbose",       0,  POPT_ARG_VAL,    &verbose, 0, 0, 0 },  {"no-v",             0,  POPT_ARG_VAL,    &verbose, 0, 0, 0 },  {"help",            'h', POPT_ARG_NONE,   0, 'h', 0, 0 },  {0,0,0,0, 0, 0, 0}};static char err_buf[200];/** * Store the option error message, if any, so that we can log the * connection attempt (which requires parsing the options), and then * show the error later on. **/void option_error(void){	if (!err_buf[0]) {		strlcpy(err_buf, "Error parsing options: option may "			"be supported on client but not on server?\n",			sizeof err_buf);	}	rprintf(FERROR, RSYNC_NAME ": %s", err_buf);	msleep(20);}/** * Tweak the option table to disable all options that the rsyncd.conf * file has told us to refuse. **/static void set_refuse_options(char *bp){	struct poptOption *op;	char *cp, shortname[2];	int is_wild, found_match;	shortname[1] = '\0';	while (1) {		while (*bp == ' ') bp++;		if (!*bp)			break;		if ((cp = strchr(bp, ' ')) != NULL)			*cp= '\0';		is_wild = strpbrk(bp, "*?[") != NULL;		found_match = 0;		for (op = long_options; ; op++) {			*shortname = op->shortName;			if (!op->longName && !*shortname)				break;			if ((op->longName && wildmatch(bp, op->longName))			    || (*shortname && wildmatch(bp, shortname))) {				if (op->argInfo == POPT_ARG_VAL)					op->argInfo = POPT_ARG_NONE;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -