neulab/tldr huggingface dataset:
-m|--max-protocol=MAXPROTOCOL The value of the parameter (a string) is the highest protocol level that will be supported by the client.
Note that specifying this parameter here will override the client max protocol parameter in the smb.conf file.
-n|--netbiosname=NETBIOSNAME This option allows you to override the NetBIOS name that Samba uses for itself. This is identical to setting the netbios name parameter in the smb.conf file. However, a command line setting will take precedence over settings in smb.conf.
--netbios-scope=SCOPE This specifies a NetBIOS scope that nmblookup will use to communicate with when generating NetBIOS names. For details on the use of NetBIOS scopes, see rfc1001.txt and rfc1002.txt. NetBIOS scopes are very rarely used, only set this parameter if you are the system administrator in charge of all the NetBIOS systems you communicate with.
-W|--workgroup=WORKGROUP Set the SMB domain of the username. This overrides the default domain which is the domain defined in smb.conf. If the domain specified is the same as the servers NetBIOS name, it causes the client to log on using the servers local SAM (as opposed to the Domain SAM).
Note that specifying this parameter here will override the workgroup parameter in the smb.conf file.
-r|--realm=REALM Set the realm for the domain.
Note that specifying this parameter here will override the realm parameter in the smb.conf file.
-U|--user=[DOMAIN\]USERNAME[%PASSWORD] Sets the SMB username or username and password.
If %PASSWORD is not specified, the user will be prompted. The client will first check the USER environment variable (which is also permitted to also contain the password seperated by a %), then the LOGNAME variable (which is not permitted to contain a password) and if either exists, the value is used. If these environmental variables are not found, the username found in a Kerberos Credentials cache may be used.
A third option is to use a credentials file which contains the plaintext of the username and password. This option is mainly provided for scripts where the admin does not wish to pass the credentials on the command line or via environment variables. If this method is used, make certain that the permissions on the file restrict access from unwanted users. See the -A for more details.
Be cautious about including passwords in scripts or passing user-supplied values onto the command line. For security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with kinit.
While Samba will attempt to scrub the password from the process title (as seen in ps), this is after startup and so is subject to a race.
-N|--no-pass If specified, this parameter suppresses the normal password prompt from the client to the user. This is useful when accessing a service that does not require a password.
Unless a password is specified on the command line or this parameter is specified, the client will request a password.
If a password is specified on the command line and this option is also defined the password on the command line will be silently ignored and no password will be used.
--password Specify the password on the commandline.
If --password is not specified, the tool will check the PASSWD environment variable, followed by PASSWD_FD which is expected to contain an open file descriptor (FD) number.
Finally it will check PASSWD_FILE (containing a file path to be opened). The file should only contain the password. Make certain that the permissions on the file restrict access from unwanted users!
--pw-nt-hash The supplied password is the NT hash.
-A|--authentication-file=filename This option allows you to specify a file from which to read the username and password used in the connection. The format of the file is:
username = <value> password = <value> domain   = <value>
Make certain that the permissions on the file restrict access from unwanted users!
-P|--machine-pass Use stored machine account password.
--simple-bind-dn=DN DN to use for a simple bind.
--use-kerberos=desired|required|off This parameter determines whether Samba client tools will try to authenticate using Kerberos. For Kerberos authentication you need to use dns names instead of IP addresses when connnecting to a service.
Note that specifying this parameter here will override the client use kerberos parameter in the smb.conf file.
--use-krb5-ccache=CCACHE Specifies the credential cache location for Kerberos authentication.
This will set --use-kerberos=required too.
--use-winbind-ccache Try to use the credential cache by winbind.
--client-protection=sign|encrypt|off Sets the connection protection the client tool should use.
Note that specifying this parameter here will override the client protection parameter in the smb.conf file.
In case you need more fine grained control you can use: --option=clientsmbencrypt=OPTION, --option=clientipcsigning=OPTION, --option=clientsigning=OPTION.
LSARPC lsaquery Query info policy
lookupsids Convert SIDs to names
lookupsids3 Convert SIDs to names
lookupsids_level Convert SIDs to names
lookupnames Convert names to SIDs
lookupnames4 Convert names to SIDs
lookupnames_level Convert names to SIDs
enumtrust Enumerate trusted domains
enumprivs Enumerate privileges
getdispname Get the privilege name
lsaenumsid Enumerate the LSA SIDS
lsacreateaccount Create a new lsa account
lsaenumprivsaccount Enumerate the privileges of an SID
lsaenumacctrights Enumerate the rights of an SID
lsaaddpriv Assign a privilege to a SID
lsadelpriv Revoke a privilege from a SID
lsaaddacctrights Add rights to an account
lsaremoveacctrights Remove rights from an account
lsalookupprivvalue Get a privilege value given its name
lsaquerysecobj Query LSA security object
lsaquerytrustdominfo Query LSA trusted domains info (given a SID)
lsaquerytrustdominfobyname Query LSA trusted domains info (given a name), only works for Windows > 2k
lsaquerytrustdominfobysid Query LSA trusted domains info (given a SID)
lsasettrustdominfo Set LSA trusted domain info
getusername Get username
createsecret Create Secret
deletesecret Delete Secret
querysecret Query Secret
setsecret Set Secret
retrieveprivatedata Retrieve Private Data
storeprivatedata Store Private Data
createtrustdom Create Trusted Domain
deletetrustdom Delete Trusted Domain
LSARPC-DS dsroledominfo Get Primary Domain Information
DFS dfsversion Query DFS support
dfsadd Add a DFS share
dfsremove Remove a DFS share
dfsgetinfo Query DFS share info
dfsenum Enumerate dfs shares
dfsenumex Enumerate dfs shares
SHUTDOWN shutdowninit syntax: shutdown [-m message]
shutdownabort syntax: shutdownabort
SRVSVC srvinfo Server query info
netshareenum Enumerate shares
netshareenumall Enumerate all shares
netsharegetinfo Get Share Info
netsharesetinfo Set Share Info
netsharesetdfsflags Set DFS flags
netfileenum Enumerate open files
netremotetod Fetch remote time of day
netnamevalidate Validate sharename
netfilegetsec Get File security
netsessdel Delete Session
netsessenum Enumerate Sessions
netdiskenum Enumerate Disks
netconnenum Enumerate Connections
netshareadd Add share
netsharedel Delete share
SAMR queryuser Query user info
querygroup Query group info
queryusergroups Query user groups
queryuseraliases Query user aliases
querygroupmem Query group membership
queryaliasmem Query alias membership
queryaliasinfo Query alias info
deletealias Delete an alias
querydispinfo Query display info
querydispinfo2 Query display info
querydispinfo3 Query display info
querydominfo Query domain info
enumdomusers Enumerate domain users
enumdomgroups Enumerate domain groups
enumalsgroups Enumerate alias groups
enumdomains Enumerate domains
createdomuser Create domain user
createdomgroup Create domain group
createdomalias Create domain alias
samlookupnames Look up names
samlookuprids Look up names
deletedomgroup Delete domain group
deletedomuser Delete domain user
samquerysecobj Query SAMR security object
getdompwinfo Retrieve domain password info
getusrdompwinfo Retrieve user domain password info
lookupdomain Lookup Domain Name
chgpasswd Change user password
chgpasswd2 Change user password
chgpasswd3 Change user password
getdispinfoidx Get Display Information Index
setuserinfo Set user info
setuserinfo2 Set user info2
SPOOLSS adddriver <arch> <config> [<version>] Execute an AddPrinterDriver() RPC to install the printer driver information on the server. Note that the driver files should already exist in the directory returned by getdriverdir. Possible values for arch are the same as those for the getdriverdir command. The config parameter is defined as follows:
Long Driver Name:\ Driver File Name:\ Data File Name:\ Config File Name:\ Help File Name:\ Language Monitor Name:\ Default Data Type:\ Comma Separated list of Files
Any empty fields should be enter as the string "NULL".
Samba does not need to support the concept of Print Monitors since these only apply to local printers whose driver can make use of a bi-directional link for communication. This field should be "NULL". On a remote NT print server, the Print Monitor for a driver must already be installed prior to adding the driver or else the RPC will fail.
The version parameter lets you specify the printer driver version number. If omitted, the default driver version for the specified architecture will be used. This option can be used to upload Windows 2000 (version 3) printer drivers.
addprinter <printername> <sharename> <drivername> <port> Add a printer on the remote server. This printer will be automatically shared. Be aware that the printer driver must already be installed on the server (see adddriver) and the portmust be a valid port name (see enumports.
deldriver <driver> Delete the specified printer driver for all architectures. This does not delete the actual driver files from the server, only the entry from the server's list of drivers.
deldriverex <driver> [architecture] [version] [flags] Delete the specified printer driver and optionally files associated with the driver. You can limit this action to a specific architecture and a specific version. If no architecture is given, all driver files of that driver will be deleted.  flags correspond to numeric DPD_* values, i.e. a value of 3 requests (DPD_DELETE_UNUSED_FILES | DPD_DELETE_SPECIFIC_VERSION).
enumdata Enumerate all printer setting data stored on the server. On Windows NT clients, these values are stored in the registry, while Samba servers store them in the printers TDB. This command corresponds to the MS Platform SDK GetPrinterData() function (* This command is currently unimplemented).
enumdataex Enumerate printer data for a key
enumkey Enumerate printer keys
enumjobs <printer> List the jobs and status of a given printer. This command corresponds to the MS Platform SDK EnumJobs() function
getjob Get print job
setjob Set print job
enumports [level] Executes an EnumPorts() call using the specified info level. Currently only info levels 1 and 2 are supported.
enumdrivers [level] Execute an EnumPrinterDrivers() call. This lists the various installed printer drivers for all architectures. Refer to the MS Platform SDK documentation for more details of the various flags and calling options. Currently supported info levels are 1, 2, and 3.
enumprinters [level] Execute an EnumPrinters() call. This lists the various installed and share printers. Refer to the MS Platform SDK documentation for more details of the various flags and calling options. Currently supported info levels are 1, 2 and 5.
getdata <printername> <valuename;> Retrieve the data for a given printer setting. See the enumdata command for more information. This command corresponds to the GetPrinterData() MS Platform SDK function.
getdataex Get printer driver data with keyname
getdriver <printername> Retrieve the printer driver information (such as driver file, config file, dependent files, etc...) for the given printer. This command corresponds to the GetPrinterDriver() MS Platform SDK function. Currently info level 1, 2, and 3 are supported.
getdriverdir <arch> Execute a GetPrinterDriverDirectory() RPC to retrieve the SMB share name and subdirectory for storing printer driver files for a given architecture. Possible values for arch are "Windows 4.0" (for Windows 95/98), "Windows NT x86", "Windows NT PowerPC", "Windows Alpha_AXP", and "Windows NT R4000".
getdriverpackagepath Get print driver package download directory
getprinter <printername> Retrieve the current printer information. This command corresponds to the GetPrinter() MS Platform SDK function.
openprinter <printername> Execute an OpenPrinterEx() and ClosePrinter() RPC against a given printer.
openprinter_ex <printername> Open printer handle
setdriver <printername> <drivername> Execute a SetPrinter() command to update the printer driver associated with an installed printer. The printer driver must already be correctly installed on the print server.
See also the enumprinters and enumdrivers commands for obtaining a list of of installed printers and drivers.
getprintprocdir Get print processor directory
addform Add form
setform Set form
getform Get form
deleteform Delete form
enumforms Enumerate form
setprinter Set printer comment
setprinterdata Set REG_SZ printer data
setprintername <printername> <newprintername> Set printer name
rffpcnex Rffpcnex test
printercmp Printer comparison test
enumprocs Enumerate Print Processors
enumprocdatatypes Enumerate Print Processor Data Types
enummonitors Enumerate Print Monitors
createprinteric Create Printer IC
playgdiscriptonprinteric Create Printer IC
getcoreprinterdrivers Get CorePrinterDriver
enumpermachineconnections Enumerate Per Machine Connections
addpermachineconnection Add Per Machine Connection
delpermachineconnection Delete Per Machine Connection
NETLOGON logonctrl2 Logon Control 2
getanydcname Get trusted DC name
getdcname Get trusted PDC name
dsr_getdcname Get trusted DC name
dsr_getdcnameex Get trusted DC name
dsr_getdcnameex2 Get trusted DC name
dsr_getsitename Get sitename
dsr_getforesttrustinfo Get Forest Trust Info
logonctrl Logon Control
samlogon Sam Logon
change_trust_pw Change Trust Account Password
gettrustrid Get trust rid
dsr_enumtrustdom Enumerate trusted domains
dsenumdomtrusts Enumerate all trusted domains in an AD forest
deregisterdnsrecords Deregister DNS records
netrenumtrusteddomains Enumerate trusted domains
netrenumtrusteddomainsex Enumerate trusted domains
getdcsitecoverage Get the Site-Coverage from a DC
capabilities Return Capabilities
logongetdomaininfo Return LogonGetDomainInfo
FSRVP fss_is_path_sup Check whether a share supports shadow-copy
fss_get_sup_version Get supported FSRVP version from server
fss_create_expose Request shadow-copy creation and exposure
fss_delete Request shadow-copy share deletion
fss_has_shadow_copy Check for an associated share shadow-copy
fss_get_mapping Get shadow-copy share mapping information
fss_recovery_complete Flag read-write snapshot as recovery complete,
CLUSAPI clusapi_open_cluster Open cluster
clusapi_get_cluster_name Get cluster name
clusapi_get_cluster_version Get cluster version
clusapi_get_quorum_resource Get quorum resource
clusapi_create_enum Create enum query
clusapi_create_enumex Create enumex query
clusapi_open_resource Open cluster resource
clusapi_online_resource Set cluster resource online
clusapi_offline_resource Set cluster resource offline
clusapi_get_resource_state Get cluster resource state
clusapi_get_cluster_version2 Get cluster version2
clusapi_pause_node Pause cluster node
clusapi_resume_node Resume cluster node
DRSUAPI dscracknames Crack Name
dsgetdcinfo Get Domain Controller Info
dsgetncchanges Get NC Changes
dswriteaccountspn Write Account SPN
ECHO echoaddone Add one to a number
echodata Echo data
sinkdata Sink data
sourcedata Source data
EPMAPPER epmmap Map a binding
epmlookup Lookup bindings
EVENTLOG eventlog_readlog Read Eventlog
eventlog_numrecord Get number of records
eventlog_oldestrecord Get oldest record
eventlog_reportevent Report event
eventlog_reporteventsource Report event and source
eventlog_registerevsource Register event source
eventlog_backuplog Backup Eventlog File
eventlog_loginfo Get Eventlog Information
IRemoteWinspool winspool_AsyncOpenPrinter Open printer handle
winspool_AsyncCorePrinterDriverInstalled Query Core Printer Driver Installed
NTSVCS ntsvcs_getversion Query NTSVCS version
ntsvcs_validatedevinst Query NTSVCS device instance
ntsvcs_hwprofflags Query NTSVCS HW prof flags
ntsvcs_hwprofinfo Query NTSVCS HW prof info
ntsvcs_getdevregprop Query NTSVCS device registry property
ntsvcs_getdevlistsize Query NTSVCS device list size
ntsvcs_getdevlist Query NTSVCS device list
MDSSVC fetch_properties Fetch connection properties
fetch_attributes Fetch attributes for a CNID
WINREG winreg_enumkey Enumerate Keys
querymultiplevalues Query multiple values
querymultiplevalues2 Query multiple values
WITNESS GetInterfaceList List the interfaces to which witness client connections can be made
Register Register for resource state change notifications of a NetName and IPAddress
UnRegister Unregister for notifications from the server
AsyncNotify Request notification of registered resource changes from the server
RegisterEx Register for resource state change notifications of a NetName, ShareName and multiple IPAddresses
WKSSVC wkssvc_wkstagetinfo Query WKSSVC Workstation Information
wkssvc_getjoininformation Query WKSSVC Join Information
wkssvc_messagebuffersend Send WKSSVC message
wkssvc_enumeratecomputernames Enumerate WKSSVC computer names
wkssvc_enumerateusers Enumerate WKSSVC users
GENERAL OPTIONS help Get help on commands
? Get help on commands
debuglevel Set debug level
debug Set debug level
list List available commands on pipe
exit Exit program
quit Exit program
sign Force RPC pipe connections to be signed
seal Force RPC pipe connections to be sealed
packet Force RPC pipe connections with packet authentication level
schannel Force RPC pipe connections to be sealed with 'schannel'. Force RPC pipe connections to be sealed with 'schannel'. Assumes valid machine account to this domain controller.
schannelsign Force RPC pipe connections to be signed (not sealed) with 'schannel'. Assumes valid machine account to this domain controller.
timeout Set timeout (in milliseconds) for RPC operations
transport Choose ncacn transport for RPC operations
none Force RPC pipe connections to have no special properties
rpcclient is designed as a developer testing tool and may not be robust in certain areas (such as command line parsing). It has been known to generate a core dump upon failures when invalid parameters where passed to the interpreter.
From Luke Leighton's original rpcclient man page:
WARNING!  The MSRPC over SMB code has been developed from examining Network traces. No documentation is available from the original creators (Microsoft) on how MSRPC over SMB works, or how the individual MSRPC services work. Microsoft's implementation of these services has been demonstrated (and reported) to be... a bit flaky in places.
The development of Samba's implementation is also a bit rough, and as more of the services are understood, it can even result in versions of smbd(8) and rpcclient(1) that are incompatible for some commands or services. Additionally, the developers are sending reports to Microsoft, and problems found or reported to Microsoft are fixed in Service Packs, which may result in incompatibilities.
This man page is part of version 4.15.2 of the Samba suite.
The original rpcclient man page was written by Matthew Geddes, Luke Kenneth Casson Leighton, and rewritten by Gerald Carter. The conversion to DocBook for Samba 2.2 was done by Gerald Carter. The conversion to DocBook XML 4.2 for Samba 3.0 was done by Alexander Bokovoy.
USERDEL(8)                 System Management Commands                 USERDEL(8)
userdel - delete a user account and related files
userdel [options] LOGIN
The userdel command modifies the system account files, deleting all entries that refer to the user name LOGIN. The named user must exist.
The options which apply to the userdel command are:
-f, --force This option forces the removal of the user account, even if the user is still logged in. It also forces userdel to remove the user's home directory and mail spool, even if another user uses the same home directory or if the mail spool is not owned by the specified user. If USERGROUPS_ENAB is defined to yes in /etc/login.defs and if a group exists with the same name as the deleted user, then this group will be removed, even if it is still the primary group of another user.
Note: This option is dangerous and may leave your system in an inconsistent state.
-r, --remove Files in the user's home directory will be removed along with the home directory itself and the user's mail spool. Files located in other file systems will have to be searched for and deleted manually.
The mail spool is defined by the MAIL_DIR variable in the login.defs file.
-Z, --selinux-user Remove any SELinux user mapping for the user's login.
USERDEL_CMD (string) If defined, this command is run when removing a user. It should remove any at/cron/print jobs etc. owned by the user to be removed (passed as the first argument).
The return code of the script is not taken into account.
Here is an example script, which removes the user's cron, at and print jobs:
# Check for the required argument. if [ $# != 1 ]; then echo "Usage: $0 username" exit 1 fi
# Remove cron jobs. crontab -r -u $1
# Remove at jobs. # Note that it will remove any jobs owned by the same UID, # even if it was shared by a different username. AT_SPOOL_DIR=/var/spool/cron/atjobs find $AT_SPOOL_DIR -name "[^.]*" -type f -user $1 -delete \;
# Remove print jobs. lprm $1
# All done. exit 0
USERGROUPS_ENAB (boolean) Enable setting of the umask group bits to be the same as owner bits (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is the same as gid, and username is the same as the primary group name.
If set to yes, userdel will remove the user's group if it contains no more members, and useradd will create by default a group with the name of the user.
The userdel command exits with the following values:
1 can't update password file
6 specified user doesn't exist
8 user currently logged in
10 can't update group file
12 can't remove home directory
userdel will not allow you to remove an account if there are running processes which belong to this account. In that case, you may have to kill those processes or lock the user's password or account and remove the account later. The -f option can force the deletion of this account.
You should manually check all file systems to ensure that no files remain owned by this user.
You may not remove any NIS attributes on a NIS client. This must be performed on the NIS server.
If USERGROUPS_ENAB is defined to yes in /etc/login.defs, userdel will delete the group with the same name as the user. To avoid inconsistencies in the passwd and group databases, userdel will check that this group is not used as a primary group for another user, and will just warn without deleting the group otherwise. The -f option can force the deletion of this group.
chfn(1), chsh(1), passwd(1), login.defs(5), gpasswd(8), groupadd(8), groupdel(8), groupmod(8), subgid(5), subuid(5), useradd(8), usermod(8).
SHUTDOWN(2)                 Linux Programmer's Manual                SHUTDOWN(2)
shutdown - shut down part of a full-duplex connection
#include <sys/socket.h>
int shutdown(int sockfd, int how);
The shutdown() call causes all or part of a full-duplex connection on the socket associated with sockfd to be shut down.  If how is SHUT_RD, further receptions will be disallowed.  If how is SHUT_WR, further transmissions will be disallowed.  If how is SHUT_RDWR, further receptions and transmissions will be disallowed.
On success, zero is returned.  On error, -1 is returned, and errno is set to indicate the error.
EBADF  sockfd is not a valid file descriptor.
EINVAL An invalid value was specified in how (but see BUGS).
ENOTCONN The specified socket is not connected.
ENOTSOCK The file descriptor sockfd does not refer to a socket.
POSIX.1-2001, POSIX.1-2008, 4.4BSD (shutdown() first appeared in 4.2BSD).
The constants SHUT_RD, SHUT_WR, SHUT_RDWR have the value 0, 1, 2, respectively, and are defined in <sys/socket.h> since glibc-2.1.91.
Checks for the validity of how are done in domain-specific code, and before Linux 3.7 not all domains performed these checks.  Most notably, UNIX domain sockets simply ignored invalid values.  This problem was fixed for UNIX domain sockets in Linux 3.7.
close(2), connect(2), socket(2), socket(7)
GO-LIST(1)                   General Commands Manual                  GO-LIST(1)
go-list - list packages or modules
go list [-f format] [-json] [-m] [list flags] [build flags] [packages]
List lists the packages named by the import paths, one per line. The most commonly-used flags are -f and -json, which control the form of the output printed for each package. Other list flags, documented below, control more specific details.
The default output shows the package import path:
bytes encoding/json github.com/gorilla/mux golang.org/x/net/html
-f     The -f flag specifies an alternate format for the list, using the syntax of package template.  The default output is equivalent to -f '{{.ImportPath}}'.  The struct being passed to the template is:
type Package struct { Dir           string   // directory containing package sources ImportPath    string   // import path of package in dir ImportComment string   // path in import comment on package statement Name          string   // package name Doc           string   // package documentation string Target        string   // install path Shlib         string   // the shared library that contains this package (only set when -linkshared) Goroot        bool     // is this package in the Go root? Standard      bool     // is this package part of the standard Go library? Stale         bool     // would 'go install' do anything for this package? StaleReason   string   // explanation for Stale==true Root          string   // Go root or Go path dir containing this package ConflictDir   string   // this directory shadows Dir in $GOPATH BinaryOnly    bool     // binary-only package (no longer supported) ForTest       string   // package is only for use in named test Export        string   // file containing export data (when using -export) BuildID       string   // build ID of the compiled package (when using -export) Module        *Module  // info about package's containing module, if any (can be nil) Match         []string // command-line patterns matching this package DepOnly       bool     // package is only a dependency, not explicitly listed
// Source files GoFiles         []string   // .go source files (excluding CgoFiles, TestGoFiles, XTestGoFiles) CgoFiles        []string   // .go source files that import "C" CompiledGoFiles []string   // .go files presented to compiler (when using -compiled) IgnoredGoFiles  []string   // .go source files ignored due to build constraints IgnoredOtherFiles []string // non-.go source files ignored due to build constraints CFiles          []string   // .c source files CXXFiles        []string   // .cc, .cxx and .cpp source files MFiles          []string   // .m source files HFiles          []string   // .h, .hh, .hpp and .hxx source files FFiles          []string   // .f, .F, .for and .f90 Fortran source files SFiles          []string   // .s source files SwigFiles       []string   // .swig files SwigCXXFiles    []string   // .swigcxx files SysoFiles       []string   // .syso object files to add to archive TestGoFiles     []string   // _test.go files in package XTestGoFiles    []string   // _test.go files outside package
// Embedded files EmbedPatterns      []string // //go:embed patterns EmbedFiles         []string // files matched by EmbedPatterns TestEmbedPatterns  []string // //go:embed patterns in TestGoFiles TestEmbedFiles     []string // files matched by TestEmbedPatterns XTestEmbedPatterns []string // //go:embed patterns in XTestGoFiles XTestEmbedFiles    []string // files matched by XTestEmbedPatterns
// Cgo directives CgoCFLAGS    []string // cgo: flags for C compiler CgoCPPFLAGS  []string // cgo: flags for C preprocessor CgoCXXFLAGS  []string // cgo: flags for C++ compiler CgoFFLAGS    []string // cgo: flags for Fortran compiler CgoLDFLAGS   []string // cgo: flags for linker CgoPkgConfig []string // cgo: pkg-config names
// Dependency information Imports      []string          // import paths used by this package ImportMap    map[string]string // map from source import to ImportPath (identity entries omitted) Deps         []string          // all (recursively) imported dependencies TestImports  []string          // imports from TestGoFiles XTestImports []string          // imports from XTestGoFiles
// Error information Incomplete bool            // this package or a dependency has an error Error      *PackageError   // error loading package DepsErrors []*PackageError // errors loading dependencies }
Packages stored in vendor directories report an ImportPath that includes the path to the vendor directory (for example, "d/vendor/p" instead of "p"), so that the ImportPath uniquely identifies a given copy of a package.  The Imports, Deps, TestImports, and XTestImports lists also contain these expanded import paths. See golang.org/s/go15vendor for more about vendoring.
The error information, if any, is
type PackageError struct { ImportStack   []string // shortest path from package named on command line to this one Pos           string   // position of error (if present, file:line:col) Err           string   // the error itself }
The module information is a Module struct, defined in the discussion of list -m below.
The template function "join" calls strings.Join.
The template function "context" returns the build context, defined as:
type Context struct { GOARCH        string   // target architecture GOOS          string   // target operating system GOROOT        string   // Go root GOPATH        string   // Go path CgoEnabled    bool     // whether cgo can be used UseAllFiles   bool     // use files regardless of +build lines, file names Compiler      string   // compiler to assume when computing target paths BuildTags     []string // build constraints to match in +build lines ToolTags      []string // toolchain-specific build constraints ReleaseTags   []string // releases the current release is compatible with InstallSuffix string   // suffix to use in the name of the install dir }
For more information about the meaning of these fields see the documentation for the go/build package's Context type.
-json  The -json flag causes the package data to be printed in JSON format instead of using the template format.
-compiled The -compiled flag causes list to set CompiledGoFiles to the Go source files presented to the compiler. Typically this means that it repeats the files listed in GoFiles and then also adds the Go code generated by processing CgoFiles and SwigFiles. The Imports list contains the union of all imports from both GoFiles and CompiledGoFiles.
-deps  The -deps flag causes list to iterate over not just the named packages but also all their dependencies. It visits them in a depth-first post-order traversal, so that a package is listed only after all its dependencies.  Packages not explicitly listed on the command line will have the DepOnly field set to true.
-e     The -e flag changes the handling of erroneous packages, those that cannot be found or are malformed.  By default, the list command prints an error to standard error for each erroneous package and omits the packages from consideration during the usual printing. With the -e flag, the list command never prints errors to standard error and instead processes the erroneous packages with the usual printing.  Erroneous packages will have a non-empty ImportPath and a non-nil Error field; other information may or may not be missing (zeroed).
-export The -export flag causes list to set the Export field to the name of a file containing up-to-date export information for the given package.
-find  The -find flag causes list to identify the named packages but not resolve their dependencies: the Imports and Deps lists will be empty.
-test  The -test flag causes list to report not only the named packages but also their test binaries (for packages with tests), to convey to source code analysis tools exactly how test binaries are constructed.  The reported import path for a test binary is the import path of the package followed by a ".test" suffix, as in "math/rand.test".  When building a test, it is sometimes necessary to rebuild certain dependencies specially for that test (most commonly the tested package itself). The reported import path of a package recompiled for a particular test binary is followed by a space and the name of the test binary in brackets, as in "math/rand [math/rand.test]" or "regexp [sort.test]". The ForTest field is also set to the name of the package being tested ("math/rand" or "sort" in the previous examples).
The Dir, Target, Shlib, Root, ConflictDir, and Export file paths are all absolute paths.
By default, the lists GoFiles, CgoFiles, and so on hold names of files in Dir (that is, paths relative to Dir, not absolute paths).  The generated files added when using the -compiled and -test flags are absolute paths referring to cached copies of generated Go source files.  Although they are Go source files, the paths may not end in ".go".
-m     The -m flag causes list to list modules instead of packages.
When listing modules, the -f flag still specifies a format template applied to a Go struct, but now a Module struct:
type Module struct { Path      string       // module path Version   string       // module version Versions  []string     // available module versions (with -versions) Replace   *Module      // replaced by this module Time      *time.Time   // time version was created Update    *Module      // available update, if any (with -u) Main      bool         // is this the main module? Indirect  bool         // is this module only an indirect dependency of main module? Dir       string       // directory holding files for this module, if any GoMod     string       // path to go.mod file used when loading this module, if any GoVersion string       // go version used in module Error     *ModuleError // error loading module }
type ModuleError struct { Err string // the error itself }
The file GoMod refers to may be outside the module directory if the module is in the module cache or if the -modfile flag is used.
The default output is to print the module path and then information about the version and replacement if any.  For example, 'go list -m all' might print:
my/main/module golang.org/x/text v0.3.0 => /tmp/text rsc.io/pdf v0.1.1
The Module struct has a String method that formats this line of output, so that the default format is equivalent to -f '{{.String}}'.
Note that when a module has been replaced, its Replace field describes the replacement module, and its Dir field is set to the replacement's source code, if present. (That is, if Replace is non-nil, then Dir is set to Replace.Dir, with no access to the replaced source code.)
-u     The -u flag adds information about available upgrades.  When the latest version of a given module is newer than the current one, list -u sets the Module's Update field to information about the newer module. list -u will also set the module's Retracted field if the current version is retracted.  The Module's String method indicates an available upgrade by formatting the newer version in brackets after the current version.  If a version is retracted, the string "(retracted)" will follow it.  For example, 'go list -m -u all' might print:
my/main/module golang.org/x/text v0.3.0 [v0.4.0] => /tmp/text rsc.io/pdf v0.1.1 (retracted) [v0.1.2]
(For tools, 'go list -m -u -json all' may be more convenient to parse.)
-versions The -versions flag causes list to set the Module's Versions field to a list of all known versions of that module, ordered according to semantic versioning, earliest to latest. The flag also changes the default output format to display the module path followed by the space-separated version list.
-retracted The -retracted flag causes list to report information about retracted module versions. When -retracted is used with -f or -json, the Retracted field will be set to a string explaining why the version was retracted.  The string is taken from comments on the retract directive in the module's go.mod file. When -retracted is used with -versions, retracted versions are listed together with unretracted versions. The -retracted flag may be used with or without -m.
The arguments to list -m are interpreted as a list of modules, not packages.  The main module is the module containing the current directory.  The active modules are the main module and its dependencies. With no arguments, list -m shows the main module.  With arguments, list -m shows the modules specified by the arguments.  Any of the active modules can be specified by its module path.  The special pattern "all" specifies all the active modules, first the main module and then dependencies sorted by module path.  A pattern containing "..." specifies the active modules whose module paths match the pattern.  A query of the form path@version specifies the result of that query, which is not limited to active modules.  See 'go help modules' for more about module queries.
The template function "module" takes a single string argument that must be a module path or query and returns the specified module as a Module struct. If an error occurs, the result will be a Module struct with a non-nil Error field.
For more about build flags, see go-build(1) or 'go help build'.
For more about specifying packages, see go-packages(7) or 'go help packages'.
For more about modules, see https://golang.org/ref/mod.
This manual page was written by Michael Stapelberg <stapelberg@debian.org> and is maintained by the Debian Go Compiler Team <team+go-compiler@tracker.debian.org> based on the output of 'go help list' for the Debian project (and may be used by others).
ping(8)                                                                  ping(8)
ping, ping6 - send ICMP ECHO_REQUEST to network hosts
ping [-aAbBdDfhLnOqrRUvV] [-c count] [-F flowlabel] [-i interval] [-I interface] [-l preload] [-m mark] [-M pmtudisc_option] [-N nodeinfo_option] [-w deadline] [-W timeout] [-p pattern] [-Q tos] [-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp option] [hop]... {destination}
ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to elicit an ICMP ECHO_RESPONSE from a host or gateway.  ECHO_REQUEST datagrams (``pings'') have an IP and ICMP header, followed by a struct timeval and then an arbitrary number of ``pad'' bytes used to fill out the packet.
ping6 is IPv6 version of ping, and can also send Node Information Queries (RFC4620).  Intermediate hops may not be allowed, because IPv6 source routing was deprecated (RFC5095).
-a     Audible ping.
-A     Adaptive ping. Interpacket interval adapts to round-trip time, so that effectively not more than one (or more, if preload is set) unanswered probe is present in the network. Minimal interval is 200msec for not super-user.  On networks with low rtt this mode is essentially equivalent to flood mode.
-b     Allow pinging a broadcast address.
-B     Do not allow ping to change source address of probes.  The address is bound to one selected when ping starts.
Stop after sending count ECHO_REQUEST packets. With deadline [ping(8)] option, ping waits for count ECHO_REPLY packets, until the timeout expires.
-d     Set the SO_DEBUG option on the socket being used.  Essentially, this socket option is not used by Linux kernel.
-D     Print timestamp (unix time + microseconds as in gettimeofday) before each line.
-f     Flood ping. For every ECHO_REQUEST sent a period ``.'' is printed, while for ever ECHO_REPLY received a backspace is printed.  This provides a rapid display of how many packets are being dropped. If interval is not given, it sets interval to zero and outputs packets as fast as they come back or one hundred times per second, whichever is more.  Only the super-user may use this option with zero interval.
-F flow label ping6 only.  Allocate and set 20 bit flow label (in hex) on echo request packets.  If value is zero, kernel allocates random flow label.
-h     Show help.
-i interval Wait interval seconds between sending each packet.  The default is to wait for one second between each packet normally, or not to wait in flood mode. Only super-user may set interval to values less 0.2 seconds.
-I interface interface is either an address, or an interface name.  If interface is an address, it sets source address to specified interface address.  If interface in an interface name, it sets source interface to specified interface.  For ping6, when doing ping to a link-local scope address, link specification (by the '%'-notation in destination, or by this option) is required.
-l preload If preload is specified, ping sends that many packets not waiting for reply.  Only the super-user may select preload more than 3.
-L     Suppress loopback of multicast packets. This flag only applies if the ping destination is a multicast address.
-m mark use mark to tag the packets going out. This is useful for variety of reasons within the kernel such as using policy routing to select specific outbound processing.
-M pmtudisc_opt Select Path MTU Discovery strategy.  pmtudisc_option may be either do (prohibit fragmentation, even local one), want (do PMTU discovery, fragment locally when packet size is large), or dont (do not set DF flag).
-N nodeinfo_option ping6 only.  Send ICMPv6 Node Information Queries (RFC4620), instead of Echo Request.
help   Show help for NI support.
name   Queries for Node Names.
ipv6   Queries for IPv6 Addresses. There are several IPv6 specific flags.
ipv6-global Request IPv6 global-scope addresses.
ipv6-sitelocal Request IPv6 site-local addresses.
ipv6-linklocal Request IPv6 link-local addresses.
ipv6-all Request IPv6 addresses on other interfaces.
ipv4   Queries for IPv4 Addresses. There is one IPv4 specific flag.
ipv4-all Request IPv4 addresses on other interfaces.
subject-ipv6=ipv6addr IPv6 subject address.
subject-ipv4=ipv4addr IPv4 subject address.
subject-name=nodename Subject name. If it contains more than one dot, fully- qualified domain name is assumed.
subject-fqdn=nodename Subject name. Fully-qualified domain name is always assumed.
-n     Numeric output only.  No attempt will be made to lookup symbolic names for host addresses.
-O     Report outstanding ICMP ECHO reply before sending next packet. This is useful together with the timestamp -D to log output to a diagnostic file and search for missing answers.
-p pattern You may specify up to 16 ``pad'' bytes to fill out the packet you send.  This is useful for diagnosing data-dependent problems in a network.  For example, -p ff will cause the sent packet to be filled with all ones.
-q     Quiet output.  Nothing is displayed except the summary lines at startup time and when finished.
-Q tos Set Quality of Service -related bits in ICMP datagrams.  tos can be decimal (ping only) or hex number.
In RFC2474, these fields are interpreted as 8-bit Differentiated Services (DS), consisting of: bits 0-1 (2 lowest bits) of separate data, and bits 2-7 (highest 6 bits) of Differentiated Services Codepoint (DSCP). In RFC2481 and RFC3168, bits 0-1 are used for ECN.
Historically (RFC1349, obsoleted by RFC2474), these were interpreted as: bit 0 (lowest bit) for reserved (currently being redefined as congestion control), 1-4 for Type of Service and bits 5-7 (highest bits) for Precedence.
-r     Bypass the normal routing tables and send directly to a host on an attached interface.  If the host is not on a directly-attached network, an error is returned.  This option can be used to ping a local host through an interface that has no route through it provided the option -I is also used.
-R     ping only.  Record route.  Includes the RECORD_ROUTE option in the ECHO_REQUEST packet and displays the route buffer on returned packets.  Note that the IP header is only large enough for nine such routes.  Many hosts ignore or discard this option.
-s packetsize Specifies the number of data bytes to be sent.  The default is 56, which translates into 64 ICMP data bytes when combined with the 8 bytes of ICMP header data.
-S sndbuf Set socket sndbuf. If not specified, it is selected to buffer not more than one packet.
-t ttl ping only.  Set the IP Time to Live.
-T timestamp option Set special IP timestamp options.  timestamp option may be either tsonly (only timestamps), tsandaddr (timestamps and addresses) or tsprespec host1 [host2 [host3 [host4]]] (timestamp prespecified hops).
-U     Print full user-to-user latency (the old behaviour). Normally ping prints network round trip time, which can be different f.e. due to DNS failures.
-v     Verbose output.
-V     Show version and exit.
Specify a timeout, in seconds, before ping exits regardless of how many packets have been sent or received. In this case ping does not stop after count [ping(8)] packet are sent, it waits either for deadline [ping(8)] expire or until count [ping(8)] probes are answered or for some error notification from network.
-W timeout Time to wait for a response, in seconds. The option affects only timeout in absence of any responses, otherwise ping waits for two RTTs.
When using ping for fault isolation, it should first be run on the local host, to verify that the local network interface is up and running. Then, hosts and gateways further and further away should be ``pinged''. Round- trip times and packet loss statistics are computed.  If duplicate packets are received, they are not included in the packet loss calculation, although the round trip time of these packets is used in calculating the minimum/average/maximum round-trip time numbers.  When the specified number of packets have been sent (and received) or if the program is terminated with a SIGINT, a brief summary is displayed. Shorter current statistics can be obtained without termination of process with signal SIGQUIT.
If ping does not receive any reply packets at all it will exit with code 1. If a packet count [ping(8)] and deadline [ping(8)] are both specified, and fewer than count [ping(8)] packets are received by the time the deadline [ping(8)] has arrived, it will also exit with code 1.  On other error it exits with code 2. Otherwise it exits with code 0. This makes it possible to use the exit code to see if a host is alive or not.
This program is intended for use in network testing, measurement and management.  Because of the load it can impose on the network, it is unwise to use ping during normal operations or from automated scripts.
An IP header without options is 20 bytes.  An ICMP ECHO_REQUEST packet contains an additional 8 bytes worth of ICMP header followed by an arbitrary amount of data.  When a packetsize is given, this indicated the size of this extra piece of data (the default is 56). Thus the amount of data received inside of an IP packet of type ICMP ECHO_REPLY will always be 8 bytes more than the requested data space (the ICMP header).
If the data space is at least of size of struct timeval ping uses the beginning bytes of this space to include a timestamp which it uses in the computation of round trip times.  If the data space is shorter, no round trip times are given.
ping will report duplicate and damaged packets.  Duplicate packets should never occur, and seem to be caused by inappropriate link-level retransmissions.  Duplicates may occur in many situations and are rarely (if ever) a good sign, although the presence of low levels of duplicates may not always be cause for alarm.
Damaged packets are obviously serious cause for alarm and often indicate broken hardware somewhere in the ping packet's path (in the network or in the hosts).
The (inter)network layer should never treat packets differently depending on the data contained in the data portion.  Unfortunately, data-dependent problems have been known to sneak into networks and remain undetected for long periods of time.  In many cases the particular pattern that will have problems is something that doesn't have sufficient ``transitions'', such as all ones or all zeros, or a pattern right at the edge, such as almost all zeros.  It isn't necessarily enough to specify a data pattern of all zeros (for example) on the command line because the pattern that is of interest is at the data link level, and the relationship between what you type and what the controllers transmit can be complicated.