{
    "mode": "man",
    "parameter": "ntpleapfetch",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/ntpleapfetch/8/json",
    "generated": "2026-10-04T19:50:32Z",
    "synopsis": "ntpleapfetch\n[-46] [-c command] [-e expiry] [-f config] [-F] [-h]\n[-i interval] [-l] [L] [-p {4|6}] [-P logfacility] [-q]\n[-r retries] [-s source-url] [-t path] [-v] [-z path]\n[-Z] [leapfile] [-V | --version] [filename]",
    "sections": {
        "NAME": {
            "content": "ntpleapfetch - leap-seconds file manager/updater\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "ntpleapfetch\n[-46] [-c command] [-e expiry] [-f config] [-F] [-h]\n[-i interval] [-l] [L] [-p {4|6}] [-P logfacility] [-q]\n[-r retries] [-s source-url] [-t path] [-v] [-z path]\n[-Z] [leapfile] [-V | --version] [filename]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "ntpleapfetch will validate the file currently on the local system and if necessary, update\nleap second definition file.\n\nOrdinarily, the file is found using the \"leapfile\" directive in ntp.conf(5). However, an\nalternate location can be specified on the command line.\n\nIf the file does not exist, is not valid, has expired, or is expiring soon, a new copy will\nbe downloaded. If the new copy validates, it is installed and NTP is (optionally) restarted.\n\nIf the current file is acceptable, no download or restart occurs.\n\n-c can also be used to invoke another script to perform administrative functions, e.g. to\ncopy the file to other local systems.\n\nThis can be run as a cron job. As the file is rarely updated, and leap seconds are announced\nat least one month in advance (usually longer), it need not be run more frequently than about\nonce every three weeks.\n\nFor cron-friendly behavior, define CRONJOB=1 in the crontab.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "-4\nUse only IPv4 addresses for DNS name resolution. This option must not appear in\ncombination with -6.\n\n-6\nUse only IPv6 addresses for DNS name resolution. This option must not appear in\ncombination with -4.\n",
            "subsections": [
                {
                    "name": "-c",
                    "content": "Command to restart ntpd after installing a new file. Without such a command, ntpd checks\nthe file daily.\n\n-e expiry\nRefresh the leapfile this long before it expires.\n\nSpecify how long before expiration the file is to be refreshed. Units are required, e.g.\n\"-e 60 days\". Note that larger values imply more frequent refreshes.\n\n-f config\nLocation of the ntp.conf file.\n\nSpecify location of ntp.conf, which defaults to /etc/ntp.conf. It is read to make sure\nthe \"leapfile\" directive is present and to determine the default path to the leapfile.\n",
                    "flag": "-c"
                },
                {
                    "name": "-F",
                    "content": "Force update even if current file is OK and not close to expiring.\n\n-i interval\nNumber of minutes between retries.\n",
                    "flag": "-F"
                },
                {
                    "name": "-h",
                    "content": "Display inline help.\n",
                    "flag": "-h"
                },
                {
                    "name": "-l",
                    "content": "Use syslog for output (Implied if CRONJOB is set).\n",
                    "flag": "-l"
                },
                {
                    "name": "-L",
                    "content": "Don’t use syslog for output\n\n-p {4|6}\nPrefer IPv4 or IPv6 (as specified) addresses, but use either.\n\n-P logfacility\nSpecify the syslog facility for logging.\n",
                    "flag": "-L"
                },
                {
                    "name": "-q",
                    "content": "Only report errors to stdout.\n\n-r retries\nNumber of retries.\n\n-s source-url\nThe URL of the master copy of the leapseconds file.\n\n-t path\nName of temporary file used in validation.\n",
                    "flag": "-q"
                },
                {
                    "name": "-v",
                    "content": "Verbose output.\n\n-z path\nSpecify path for utilities.\n",
                    "flag": "-v"
                },
                {
                    "name": "-Z",
                    "content": "Use system path only.\n",
                    "flag": "-Z"
                },
                {
                    "name": "-V, --version",
                    "content": "Print the version string and exit.\n\nleapfile\nAn alternate location to download the leapseconds file to.\n",
                    "flag": "-V",
                    "long": "--version"
                }
            ]
        },
        "EXIT STATUS": {
            "content": "One of the following exit values will be returned:\n\n0 (EXITSUCCESS)\nSuccessful program execution.\n\n1 (EXITFAILURE)\nThe operation failed or the command syntax was not valid.\n\n2\nInternal error - restart command failed.\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Timothe Litt\n\nNTPsec                                       2024-04-01                              NTPLEAPFETCH(8)",
            "subsections": []
        }
    },
    "summary": "ntpleapfetch - leap-seconds file manager/updater",
    "flags": [
        {
            "flag": "-c",
            "long": null,
            "arg": null,
            "description": "Command to restart ntpd after installing a new file. Without such a command, ntpd checks the file daily. -e expiry Refresh the leapfile this long before it expires. Specify how long before expiration the file is to be refreshed. Units are required, e.g. \"-e 60 days\". Note that larger values imply more frequent refreshes. -f config Location of the ntp.conf file. Specify location of ntp.conf, which defaults to /etc/ntp.conf. It is read to make sure the \"leapfile\" directive is present and to determine the default path to the leapfile."
        },
        {
            "flag": "-F",
            "long": null,
            "arg": null,
            "description": "Force update even if current file is OK and not close to expiring. -i interval Number of minutes between retries."
        },
        {
            "flag": "-h",
            "long": null,
            "arg": null,
            "description": "Display inline help."
        },
        {
            "flag": "-l",
            "long": null,
            "arg": null,
            "description": "Use syslog for output (Implied if CRONJOB is set)."
        },
        {
            "flag": "-L",
            "long": null,
            "arg": null,
            "description": "Don’t use syslog for output -p {4|6} Prefer IPv4 or IPv6 (as specified) addresses, but use either. -P logfacility Specify the syslog facility for logging."
        },
        {
            "flag": "-q",
            "long": null,
            "arg": null,
            "description": "Only report errors to stdout. -r retries Number of retries. -s source-url The URL of the master copy of the leapseconds file. -t path Name of temporary file used in validation."
        },
        {
            "flag": "-v",
            "long": null,
            "arg": null,
            "description": "Verbose output. -z path Specify path for utilities."
        },
        {
            "flag": "-Z",
            "long": null,
            "arg": null,
            "description": "Use system path only."
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "Print the version string and exit. leapfile An alternate location to download the leapseconds file to."
        }
    ],
    "examples": [],
    "see_also": []
}