Usage and example of network command line (2)

xiaoxiao2021-03-06  14

Loading cmd.exe before running the command, AT does not automatically load the cmd.exe. If you do not run an executable file (.exe), you must use the method shown below to load CMD.exe: CMD / C DIR> C: /Test.out. View the scheduled command When you use AT without a command line option, the planned task will appear in a table similar to the following format: Status ID Day Time Command Line OK 1 Each F 4:30 PM Net Send Group Leads Status Due OK 2 EACH M 12:00 AM Chkstor> Check.File OK 3 Each F 11:59 PM Backup2.bat Contains Identification Number (ID) When using an identification number (ID) at command, a single task item The information is displayed in the format similar to: Task ID: 1 Status: OK Schedule: Each F Time of Day: 4: 30 PM Command: Net Send Group Leads Status Due When you plan to bring an AT command (especially with After the command line option is commanded, you want to check if the command syntax is correct by typing the AT without a command line option. If the information is displayed in the "Command Line" column, delete the command and retrore it. If it is not correct, you can bring less command line option when you retrore this command. View Results The already scheduled commands that have been scheduled are run as the background program. The result is not displayed on the computer. To redirect the output to a file, use the redirect symbol (>). If you redirect the output to a file, whether you use AT in the command line or in a batch file, you need to use an escape (^) before the redirect symbol. For example, to redirect the output to the output.text file, you want to type: AT 14:45 c: /test.bat ^> c: /output.txt Execute the current directory for the command to the SystemRoot folder. Change the system time After using the AT command to plan the command to run, if you change your computer's system time, the AT scheduler is synchronized with the modified system time by typing the AT that does not command line options. The stored command has been scheduled to store in the registry. This way, if you restart the Plan service, you will not lose the planned task. Connecting to the network drive For schedule jobs that need to access the network, do not use the reordered drive. The Plan Services may not access these redirected drives, or if there are other users log in when the scheduled task is running, these redirected drives may not appear. Therefore, for the planning job, use the UNC path. For example: AT 1:00 PM my_backup // server / share Please do not use the following syntax (where x:?) Connection is created by the user): AT 1:00 PM my_backup x: If a AT command using the drive letter is planned to connect The shared directory should contain an AT command to disconnect the drive when the drive is complete. If the connection to the drive cannot be disconnected, the assigned drive letter will not be available under the command prompt.

Example To display a list of scheduled commands on the Marketing server, type: at // marketing To learn more about the server Corp 3 identification number 3 command, type: at // corp 3 To plan at 8:00 am Run the network sharing command on the CORP server and redirect the list to the Corp.txt file of the Maintenance server (located in the Reports Sharing Directory), type: at // corp 08:00 cmd / c "Net Share Reports = D : / Marketing / Reports >> //maintenance/reports/corp.txt "Back up the Marketing server hard drive's hard drive back up to the tape drive at midnight after every five days, first create a batch program named Archive.cmd (it contains backup Command), then plan the running of the batch program, please type: at // marketing 00:00 / Every: 5, 10, 15, 20, 20, 30 Archive To cancel all the scheduled commands on the current server, Please clear the AT plan information as described below: At / delete If the command to run is not an executable (.exe) file, use the CMD / C to load CMD.exe: CMD / C Dir> c: /test.out.

RSH Runs the command on the remote computer running the RSH service. Windows XP and Windows 2000 do not provide RSH services. Windows 2000 Server Resource Kit provides RSH services called RSHSVC.exe. Use RSH display without parameters to display help. Syntax RSH [Host] [-l UserName] [-n] [command] Parameters Host Specifies the remote computer running Command. -L username Specifies the username used on remote computers. In the case of omitting, the name of the current login user is used. -N Redirects the input of the RSH to the NULL device. This prevents the display of the local computer command result. Command specifies the command to run. /? Display help at the command prompt. Note The standard operation RSH command copies the standard input to the remote command, copies the standard output of the remote Command to its standard output, and copy the standard error of the remote Command to its standard error. RSH usually terminates when the remote command is terminated. Use the redirect symbol to cause the redirection to occur on the remote computer, to take redirect symbols (for example, ">>") in quotation marks. If you do not use quotation marks, redirect will occur on the local computer. For example, the following command attached to the remote file "Localfile" in the local file "LocalFile": rsh OtherComputer Cat Remotefile >> LocalFile The following command Additional Remote file RemoteFile is attached to the remote file OtherRemotefile: RSH OtherComputer Cat Remotefile ">>" Remotefile Using RSH This domain's primary domain controller must be used to confirm that the username or RSH command failed when using a computer that has been logged in to a domain and running Windows XP Professional. .Rhosts file. Rhosts file usually licenses network access of UNIX systems. The.rhosts file lists the computer name and associated login name that can access the remote computer. When you run the RCP, REXEC, or RSH commands on the remote computer of the .rhosts file, you don't have to provide login and password information for remote computers. The .rhosts file is a text file that each behavior is an entry. The entry is composed of local computer names, local usernames, and all annotations related to this entry. Each entry is separated by a tab or space, and the note is taken with a symbol (#). For example: Host7 #this computer is in room 31a .rhosts file must be in the user's home directory of the remote computer. For more information on remote computers .Rhosts file specific execution, see the documentation for the remote system. This command is only available when an internet protocol (TCP / IP) protocol is installed as components of the network adapter property in the network connection. Example To perform a Telcon command on the remote computer VAX1 in the name admin1, type: rsh vax1 -l admin1 telcon

TFTP transmits files to run the ordinary file transfer protocol (TFTP) service or Daemon remote computer (especially running a Unix computer) or from a remote computer that runs ordinary file transfer protocol (TFTP) service or Daemon (especially running UNIX) Transfer files. Syntax TFTP [-i] [Host] [{GET | PUT}] [Source] [Destination] parameter -i specified binary image transfer mode (also known as octal mode). In binary image mode, the file is transmitted in one byte. Use this mode when transferred binary files. If the -i is omitted, the file will be transmitted in ASCII mode. This is the default transmission mode. This mode converts the tail (EOL) character to the appropriate format of the specified computer. Use this mode when sending a text file. If the file transfer is successful, the data transfer rate will be displayed. Host Specifies local or remote computers. PUT passes the Destination file on the local computer to the Source file on the remote computer. Because the TFTP protocol does not support user authentication, the user must log in to the remote computer, and the file must be written on the remote computer. GET transmits the Destination file on the remote computer to the Source file on the local computer. Source Specifies the files to be transferred. Destination Specifies the location of transferring files. If Destination is omitted, it will assume that it is the same name in the Source. /? Display help at the command prompt. Note Use the GET Parameters If you transfer file Fileton on your local computer to file fileOne on your remote computer, specify your PUT. If you transfer file FileTwo on a remote computer to file fileOne on a remote computer, specify GET. Windows XP or Windows 2000 does not provide general purpose TFTP servers. The TFTP server service provided by Windows 2000 provides remote boot feature for Windows XP and Windows 2000 client computers. This command is only available when an internet protocol (TCP / IP) protocol is installed as components of the network adapter property in the network connection. Example To transfer file users.txt from the local computer to users19.txt on remote computer VAX1, type: TFTP VAX1 PUT Users.txt users19.txt NBTSTAT Displays TCP / IP (NetBT) protocols for local computers and remote computers NetBIOS statistics, NetBIOS name table, and NetBIOS name cache. NBTSTAT can refresh the NetBIOS name cache and registering the Windows Internet Name Service (WINS) name. Use NBTSTAT display help with parameters. Syntax NBTSTAT [-A Remotename] [-A ipaddress] [-c] [-n] [-r] [-r] [-r] [-S] [-S] [interval] parameter -a remote network NetBIOS name table, where Remotename is a NetBIOS computer name for a remote computer. The NetBIOS Name Table is a list of NetBIOS names used by the application running on the computer. -A ipaddress Displays the NetBIOS name table of the remote computer, which is specified by the IP address of the remote computer (separated by a decimal point). -C Displays the NetBIOS name cache content, NetBIOS name table, and each address thereof. -N Displays the NetBIOS name table of the local computer.

The status in the registered indicates that the name is registered by the broadcast or WINS server. -R Displays the NetBIOS name resolution statistics. On the Windows XP computer configured to use WINS, this parameter will return the name number that has been parsed and registered by broadcast and WINS. -R Clear the contents of the NetBIOS name cache and reload from the LMHOSTS file with a #pre tag. -Rr Release and refresh the NetBIOS name of the local computer registered by WINS. -S Displays the NetBIOS client and server session and try to convert the target IP address to the name. -S Displays the NetBIOS Customer and Server Session, listed remote computers only via the IP address. Interval Re-displays the selected statistics, you can interrupt the number of seconds specified in Interval between each display. Press CTRL C to stop rescan statistics. If this parameter is omitted, NetStat will only display a current configuration information. /? Display help at the command prompt. Note NBTSTAT command line parameters are case sensitive. The following table lists the column headings generated by NBTSTAT. The title indicates the number of bytes that INPUT. The number of bytes sent in Output. IN / OUT This connection is from a computer (outgoing) or other computer to the local computer (incoming). The LIFT Name The time the cache item is saved before being cleared. Local Name Local NetBIOS name is associated with a connection. Remote Host is related to a remote computer related name or IP address. <03> Transforms the last byte of the hexadecimal NetBIOS name. Each NetBIOS name is 16 characters long. Since the last byte usually has special significance, because the same name (only the last byte) may appear several times on a computer. For example, <20> is a space in ASCII text. TYPE name type. The name can be a single name or a group name. Whether the NetBIOS service ("Registered") is running on the Status remote computer, or whether the same computer name has been registered ("conflict").

State NetBIOS connection status. The following table lists the possible NetBIOS connection status. Status Description The connection session has been established. The endpoint of associated connections has been created and associated with the IP address. INVASTATION The endpoint is available to the inner direction. The idle end point has been opened without receiving connections. The connection session is in the connection phase. At this stage, the mapping of the name to the IP address of the selected target is being parsed. Accepting an inbound session is currently being accepted and will be connected in a short term. Reconnect the session will try to reconnect (if the first connection failed). The outbound session is in the connection phase. This phase is creating a TCP connection. Inbound inbound sessions in the connection period. Disconnecting the session is disconnecting. The interrupts have been interrupted and the local computer has been disconnected and waited for the confirmation of the remote system. This command is only available when an internet protocol (TCP / IP) protocol is installed as components of the network adapter property in the network connection. Example To display the NetBIOS Name Table of the NetBIOS computer named CORP07, type: nbtstat -a corp07 To display the NetBIOS name table of remote computers assigned to 10.0.0.99, type: nbtstat -a 10.0.0.99 To display the NetBIOS name table of the local computer, type: nbtstat -n To display the content of the local computer NetBIOS name, type: nbtstat -c To clear the NetBIOS name cache and reload the item with tag #pre in the local LMHOSTS file, Type: NBTSTAT -R To release the NetBIOS name registered through the WINS server and re-register it, type: nbtstat -rr To display NetBIOS session statistics every 5 seconds, type: nbtstat -s 5

转载请注明原文地址:https://www.9cbs.com/read-50525.html

New Post(0)