Menu

command line usage

genzj

Command Line Usage

usage:

pyhostspatch.py [-h] [-n] [-b BACKUP] [--restore RESTORE] [-d]
                       [-c {on,off}] [-#]
                       [HOST_DIFF_FILE]

positional arguments:

  HOST_DIFF_FILE        Diff file to be adopted to hosts file.

optional arguments:

  -h, --help   show this help message and exit
  -n, --dry      Run and write to stdout, will not touch the hosts
                        file.
  -b BACKUP, --backup BACKUP
                        Specify name of backup file. By default hosts file
                        will be backup to backup_yymmdd_HHMMSS in the same
                        folder of this program.
  --restore RESTORE
                        Restore from a specified backup file. Before
                        overwriting current hosts file, another backup, name
                        of which can be also assigned by --backup argument,
                        will be saved.
  -d, --debug
                        Log debug information.
  -c {on,off}, --confirm {on,off}
                        Ask user to confirm critical operations. Activated by
                        default.
  -#, --comment
                        Comment (add a # at the beginning of line) instead of
                        removing when delete lines. Since backup files will be
                        kept before writing hosts file, and too many comments
                        lines is really unfriendly for further manually
                        maintenance, you really do not have to do this.

Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.