hosted

command module
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2024 License: BSD-2-Clause-Views Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Windows HOSTS file editor command

Go Report Card MIT License

Usage

Subcommands

hosted - edit Windows HOSTS file(0.1.0)

Sub commands:
  list, ls
  add          add an entry with args: {IP} {Host} [Comment]
  delete, del  delete an entry with  --ip 192.168.1.200 and/or --host oldserver
  enable, o    change comment -> normal entry if exists
  disable, x   change normal entry -> comment if exists

Options:
  --hosts PATH   (default: C:\Windows\System32\Drivers\etc\hosts)

Usage:
  RUN AS ADMINISTRATOR

  # ADD new server "server01" as 192.168.1.201
  hosted add --ip 192.168.1.201 --host server01 --comment "new server"
  hosted add 192.168.1.201 server01 new server

  # REMOVE a wrong entry
  hosted delete --ip 192.168.1.210

  # COMMENT-OUT (disable) oldserver
  hosted disable --host oldserver
  hosted x --host oldserver

  # COMMENT-IN (enable) oldserver back
  hosted enable --host oldserver
  hosted o --host oldserver

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址