Партнерка на США и Канаду по недвижимости, выплаты в крипто

  • 30% recurring commission
  • Выплаты в USDT
  • Вывод каждую неделю
  • Комиссия до 5 лет за каждого referral
Table A.21. timeout Command Options

Option

Qualifier

Description

/t

TimeoutInSeconds

Defines the decimal number of seconds (between -1 and 100000) to wait before continuing processing. The value -1 causes the computer to wait indefinitely for a keystroke.

/nobreak

Defines to ignore the key press.

 

Table A.22. tsecimp Command Options

Option

Qualifier

Description

-f

FileName

Required item that defines the name of the XML file that contains the assignment information that you want to import.

-v

Validates the structure of the XML file without importing the information into the Tsec. ini file.

-u

Checks whether each user is a member of the domain specified in the XML file. The computer on which you use this parameter must be connected to the network. This parameter might significantly slow performance if you are processing a large amount of user assignment information.

tsecimp - f FileName [{-v | - u}]

whoami Command

Whoami. exe determines the current logged-on user. The whoami command outputs domain or computer name, user name, group names, logon identifier, and privileges for the local computer. The syntax is

whoami [/upn | /fqdn | /logonid]

whoami [/user] [/groups] [/priv] [/fo format]

whoami /all [/fo format]

Table A.23. whoami Command Options

Option

Description

/upn

Outputs the user name in UPN format.

/fqdn

Outputs the user name in FQDN format.

/user

Outputs current user name.

/groups

Outputs group names.

/priv

Outputs privileges.

/logonid

Outputs logon ID.

/all

Outputs the active user name and groups and the security identifiers (SID) and privileges in the current access token.

BACKUP COMMANDS

Chapter 14 examined the recommended backup and restoration methods for Windows 2000 and Windows Server 2003. However, in mixed environments a command-line approach may also be warranted; in this approach, a user can back up data to tape, floppy, and hard disk. Windows NT commands such as backup and restore are no longer fully supported. The Ntrestore utility can be used either to launch the graphical backup tools or in a command-line mode.

НЕ нашли? Не то? Что вы ищете?

Using Ntbackup on the Command Line

The Ntbackup utility can be used from the command prompt or within a batch file to achieve the same results as with the graphical backup. It has several formats, but the primary syntax is

ntbackup backup path [options]

The backup parameter must be included except for the other variations of the syntax shown in Table A.24. The path parameter should contain the path or paths of the directories to be copied to the backup tape. Table A.24 identifies the options available for the command. They can be entered in any sequence.

To erase a tape, enter the following command:

ntbackup /nopoll

No other options are available with the /nopoll switch. This format requires user input and cannot be used in a batch file.

Table A.24. ntbackup Command Options

Option

Qualifier

Description

/b

Backs up the Registry from the local system.

/e

Includes exceptions only in the backup log. The default is to create a full and detailed backup log.

/hc:on

Turns on hardware compression. Not valid if the /a option is used.

/hc:off

Turns off hardware compression. Not valid if the /a option is used.

/l

"filename"

Creates a log file as file name. The path can be included as part of file name.

/r

Restricts access to the data on the backup tape to members of the Administrators group and the Backup Operators group. Must not be used with the /a option.

/t

type

Specifies the backup type, where type can be one of the following values: copy, daily, differential, incremental, normal.

/tape:n

Identifies the number of the tape drive to use, where n can be a value from 0 through 9. This option is necessary only if there is more than one tape drive on the system.

systemstate

Specifies that you want to back up the System State data. When you select this option, the backup type will be forced to normal or copy.

@bks file name

Specifies the name of the backup selection file (.bks file) to be used for this backup operation. The at (@) character must precede the name of the backup selection file. A backup selection file contains information on the files and folders you have selected for backup. You have to create the file using the GUI version of Backup.

/J {"job name"}

Specifies the job name to be used in the log file. The job name usually describes the files and folders you are backing up in the current backup job as well as the date and time you backed up the files.

/P {"pool name"}

Specifies the media pool from which you want to use media. This is usually a subpool. You cannot use the /A, /G, /F, or /T command-line options.

/G {"guid name"}

Overwrites or appends to this tape. Do not use this switch in conjunction with /P.

/T {"tape name"}

Overwrites or appends to this tape. Do not use this switch in conjunction with /P.

/N {"media name"}

Specifies the new tape name. You must not use /A with this switch.

/F {"file name"}

Logical disk path and file name used wirh /P /G /T.

/D {"set description"}

Specifies a label for each of the backup sets.

/DS {"server name"}

Backs up the directory service file for the specified Microsoft Exchange Server.

/IS {"server name"}

Backs up the Information Store file for the specified Microsoft Exchange Server.

/A

Performs an append operation. Either /G or /T must be also used. Do not use this switch in conjunction with /P.

/V:{yes|no}

Verifies the data after the backup is complete.

/R:{yes|no}

Restricts access to this tape to the Owner group or the administrator.

/L:{f|s|n}

Specifies the type of log file: f=full, s=summary, n= no log file is created.

/M {backup type}

Specifies the backup type as normal, copy, daily, incremental, or differential.

/RS:{yes|no}

Backs up the migrated data files located in Remote Storage. When you back up the %systemroot% folder, Backup automatically backs up the Removable Storage database as well.

/HC:{on|off}

If available on the tape drive, uses hardware compression.

/SNAP:{on|off}

Specifies whether the backup should use a volume shadow copy.

/M {backup type}

Specifies the backup type as normal, copy, daily, incremental or differential.

/?

Outputs help at the command prompt.

To eject a tape, the following syntax may be used:

ntbackup eject /tape:n

The /tape:n option is necessary only if there is more than one tape drive installed on the system. The variable n can be a value from 0 through 9 and designates which tape drive should eject the tape.

EXAMPLE OF NTBACKUP COMMAND

Enter the following command to back up and verify the C drive, including the local Registry. This restricts access to the Administrators and Backup Operators groups with a fully detailed log of the backup in the file C:\winnt\backup. log.

ntbackup backup c: /b/r/l "c:\winnt\backup. log"

BATCH COMMANDS

Batch commands or programs are also commonly known as batch files. They are essentially simplified scripts that support the execution routine or repetitive tasks. A batch program is written as a text file with one or more command lines that are executed sequentially from top to bottom. They are identified by either a. bat or. cmd extension to their file names.

All Windows Server 2003 commands and many applications can be executed from a batch file. To provide greater flexibility, a number of conditional parameters, shown in Table A.25, can be set.

Table A.25. Batch File Conditional Commands

Option

Description

call

Permits the execution of another batch program without terminating the parent program.

echo

Turns the display of command action on or off as the batch file is executed. Can also be used to output a message to the screen—for example, "One moment please, while searching..."

endlocal

Ends the setlocal command described below.

for

Executes a specific command for every file in a set of files. Can also be run directly from the command prompt.

goto

Directs Windows Server 2003 to process the line in the batch file that is specified.

if

Processes a command when the specified condition is true; ignored when the condition is not met. The conditions of NOT and ELSE can also be used in combination as part of this option.

pause

Temporarily suspends the batch file until the user takes an action such as pressing a key to confirm an action.

rem

Short for remarks that can be added to the batch file for referencing. These are programming notes that are not executed.

setlocal

Permits the establishment of new localization variables. The localization is retained until the endlocal option resets the environment.

Shift | (pipe)

Modifies the position of parameters in a batch program and permits thestringing together of multiple commands on one line.

Outputs command results to the directed point.

()

Groups commands.

||

Executes either the first or next command.

&&

Executes the first command and, if successful, executes the next one.

COMPARISON COMMANDS

In a Windows environment, a user can compare two files visually by displaying each in a separate window. While graphically based file comparisons can be executed with applications that are installed on Windows 2000 or Windows Server 2003, two utilities available within the base system are executed from the command line. Two commands that compare files are fc and comp.

fc Command

The fc command enables a user to compare two files and display the differences, where both are in either an ASCII or a binary format. The syntax is

fc [options] file1 file2

The file, here shown as file1 and file2, can be just a file name, a path with a file name, or a drive, path, and file name in the format drive:path\filename. In addition, they can contain the wildcard characters * and?. If you use a wildcard character in file1, the fc command will compare each file found to file2. In other words, it compares many to one. If you use a wildcard character in file2, the command will compare file1 to a file with a corresponding name in file2's location. Examples using the wildcard characters are given in Table A.26.

FC COMMAND EXAMPLES

To compare two binary files with the names Test. exe and Test1.exe, the command can be entered as

fc /b test. exe test1.exe

or

fc test. exe test1.exe

Table A.26. fc Command Options

Option

Description

/a

Used only for ASCII comparisons and provides the output display in abbreviated form. Only the first and last lines of each set of differences are displayed.

/b

Does a comparison of binary files. This option is automatically the default for files whose names have one of these extensions: .exe, .com, .sys, .obj, .lib, .bin. The files are compared by byte, and differences are output in the format xxxxxxxx: yy zz, where xxxxxxxx is the address of the bytes being compared in hexadecimal; yy is the contents of the byte from file1; and zz is the contents of the byte from file2.

/c

Ignores the distinctions between uppercase and lowercase.

/l

Compares ASCII files. This is considered the default for all files except those mentioned in the /b option above. The comparison is executed line by line and the differences are output in the following format: the name of file1, then the lines of file1 that differ from file2, the first line of file1 that occurs in both files, the name of file2, the lines of file2 that differ from file1, the first line of file2 that occurs in both files. After a difference is found, the command tries to resynchronize the two files.

/lbn

Sets the size of the internal line buffer to n. The default size is 100 lines. If the number of consecutive differences is greater than n, the command terminates.

/n

Displays the line numbers; used only for ASCII files.

/t

Does not treat tabs as spaces. The default is to treat tabs as spaces.

/w

Treats consecutive tabs/spaces as one space. Does not compare tabs/spaces at the beginning and end of a line.

/nnnn

Considers the file to be resynchronized when nnnn number of consecutive lines match; otherwise, matching lines are displayed as differences. The default value for nnnn is 2.

Both formats are acceptable because a file with an. exe extension is assumed to be binary by default.

To compare the files autoexec. bat, autoold. bat, and autoex3.bat to the file newauto. bat, enter the following:

fc auto*.bat newauto. bat

Suppose that a system administrator needs to compare some test result. tst files in the C:/test directory with files of the same name in test directory named bob on the D: drive. He enters

fc c:/test/*.tst d:/bob/test/*.tst

comp Command

Another comparison command available through the command line is comp, which compares the content of files by byte. Output consists of error messages of the format

Compare error at OFFSET xxxxxxxx = yy = zz

where xxxxxxxx is the memory address of the differing bytes, yy is the content of the bytes in file1, and zz is the content of the bytes in file2. The addresses and contents are in hexadecimal format unless an option is specified to display them in decimal or character format.

The syntax of the comp command is

comp [file1] [file2] [options]

The elements file1 and file2 in this line can be the names of two files, including as necessary the drive designation and the directory path. The wildcard characters * and? can be used to compare multiple files. Options are listed in Table A.27.

Table p Options

Option

Description

/a

Displays the differences between the files in character format.

/d

Displays the differences between the files in decimal format instead of hexadecimal.

/l

Displays the line number of the differences instead of the number of the byte offset.

/n=num

Compares the first num lines of both files, particularly when two files are different sizes.

/c

Ignores uppercase and lowercase distinctions.

EXAMPLE OF COMP COMMAND

To compare the first 15 lines of the files newtest. log and oldtest. log, displaying the line numbers where the differences occur, enter the following:

comp newtest. log oldtest. log /n=15 /l

WINDIFF

Windows Server 2003 Support Tools provides a graphical tool that compares two files, as shown in Figure A.1.

Figure A.1. Windows 2000 and Windows Server 2003 Resource Kit WinDiff

graphics/afig01.gif

COMPRESSION COMMANDS

Each file in the Windows Server 2003 NTFS file system contains a compression attribute that indicates either that the file should be stored as compressed or is already pression is recommended for large files that are used infrequently. When this attribute is selected, files are automatically compressed when they are saved and decompressed when accessed for use. (Remember that this compression technology is not available with the FAT file system.)

The compression attribute can be set from within the My Computer windows or through Windows Server 2003 Explorer. From Explorer, select the file you wish to view or set the compression attribute. Next, select from the menu bar File Properties. In the Properties window, select the General tab if it is not already displayed. On the General tab, select Advanced. In the Attributes box, check the Compress Contents to Save Space box to compress or decompress a file.

As an alternative to the menu bar, you can right-click the file and, from the menu that appears, select Properties.

compact Command

The compact command allows the user to set or display the compression attribute on NTFS files from the command line. Its syntax is

compact [options] [filename]

The file name parameter can actually be the name of a file or a directory. In a directory, the compression attribute indicates that any new files added to it will automatically have their compression attributes set and they will be compressed. This does not change the compression attribute for files that already exist in the directory. For them, wildcard characters can be used as part of the file parameter.

If no options are used or no file names are entered, the compression attribute for the current directory is displayed. See options list in Table A.28.

To set the compression attribute on the directory \ellen\oldfiles as well as any of its subdirectories, enter the following:

compact /c /s c:\ellen\oldfiles

To remove the compression attribute from the directory d:\bob\contracts, enter

compact /u d:\bob\contracts

Remember, the above command will only remove the attribute from the directory and will not affect any of the files and subdirectories currently in the directory \bob\contracts.

Table pact Options

Option

Qualifier

Description

/c

Compresses the named file(s).

/u

Decompresses the named file(s).

/s

:directory

Compresses or decompresses all subdirectories for the identified directory. The :directory qualifier is optional. The default is the current directory.

/i

Ignores any errors that occur.

/a

Displays hidden or system files. These will be omitted by default.

/f

Forces file name to be compressed or decompressed. The main use for this option occurs when a file was only partially compressed or decompressed and the system administrator needs to complete the task.

 

Table A.29. expand Command Options

Option

Qualifier

Description

-d

Displays a list of files in the source volume.

-f:

filename

Specifies a file.

-r

Renames the expanded file.

expand Command

The expand command is used to decompress one or more files as well as to retrieve files from a distribution disk. Its syntax is

Из за большого объема этот материал размещен на нескольких страницах:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19