Партнерка на США и Канаду по недвижимости, выплаты в крипто
- 30% recurring commission
- Выплаты в USDT
- Вывод каждую неделю
- Комиссия до 5 лет за каждого referral
expand [-r] source [destination]
Table A.29 lists the options for the expand command.
DISPLAY COMMANDS
The display commands display the contents of files, the properties of files, lists of files, and Help files. They also organize displays into a sequence the user desires. This section will describe the procedures and commands available.
Displaying the Contents of Files
Windows Server 2003 primarily uses installed applications for file viewing. The Registry maintains a list of installed applications and attempts to match file extensions to appropriate software so that the file can be viewed in its native format. When you double-click a file name or icon in Explorer, the file opens within the application. If the file type is unknown, the Open With window is displayed, allowing you to select the application that should be used to open the file.
The WordPad applications that are part of the base Windows Server 2003 system allow the user to display and create text or ASCII files. These applications are accessed by selecting Start
Programs
Accessories
WordPad.
From the command line, two commands are available for displaying files: more and type. The more command displays long files one screen at a time; the type command just displays the entire contents of a file and is usually used for short files only.
CLS COMMAND
The cls command is used to clear the command prompt screen.
MORE COMMAND
The more command displays long text files from within the command prompt window one screen at a time. Its basic syntax is
more [options] [file(s)]
Options for the more command are listed in Table A.30.
The file(s) parameter is not necessary when data is passed to the more command from another command using the pipe symbol ( | ). If it is used, it can be in the format of one or more file names, including the drive designation and path if necessary.
If the /e switch is used, the commands in Table A.31 may be used whenever the "—More—" prompt displays.
TYPE COMMAND
The type command simply displays the contents of one or more files and is similar to the UNIX cat command. Its syntax is
type file(s)
The file(s) parameter can consist of just the file names entered with the drive designation and path name if necessary. Multiple files in the file(s) list are separated by spaces. When entering a file name, remember to enclose it in quotes if it contains spaces.
Table A.30. more Command Options | |
Option | Description |
/e | Enables the "extended" features that allow the user to control how the file is displayed by entering commands whenever the "—More—" prompt displays. The commands are identified Table A.31. |
/p | Expands any form-feed characters. |
/s | Consolidates multiple blank lines into one blank line. |
/tn | Substitutes n spaces for each tab. |
+n | Starts displaying the first file in the file(s) list at line n. |
Table A.31. more Commands | |
Command | Description |
Space bar | Displays the next page of text. |
ENTER key | Displays the next line of text. |
f | Displays the next file in the file(s) list. |
pn | Displays the next n lines. |
sn | Skips n lines. |
? | Displays the commands that are acceptable at the "–-More—"prompt. In other words, the Help function. |
= | Displays the line number. |
q | Quits. |
Displaying Attributes and Properties of Files and Folders
Windows Server 2003 provides graphical and command prompt methods of displaying the file and directory hierarchy of a system and its network. The graphical methods are available through the My Computer window, Explorer, and the My Network Places. My Network Places, accessible either from its desktop icon or through Explorer, allows the user to display network files and directories.
This section describes the file and folder views available through Windows Server 2003 Explorer as well as the dir command that you can type in at the command crompt.
DISPLAYING FILE PROPERTIES USING WINDOWS SERVER 2003 EXPLORER
In Windows Server 2003 Explorer, the left pane of the Primary window (Figure A.2) shows the top level of the hierarchy for the desktop. Here directories have file folder icons and are referred to as folders. To view the subdirectories, left-click the box that contains a plus sign. When the subdirectories are displayed, the plus sign becomes a minus sign. To display both the files and subdirectories of a particular folder, select the folder by clicking it with the mouse. The folder contents will appear in the right pane.
Figure A.2. The Windows Server 2003 Explorer Primary Window

To view detailed information about each file in the Contents of pane, select View
Details from the menu bar. This detailed information includes the name of the file, its size in bytes, its type, the date it was last modified, and the attributes associated with it, which can be Archive (A), Read-Only (R), Hidden (H), System (S), or Compressed (C) (Compressed will display only on NTFS file systems).
Note that by default certain file types are omitted (or hidden) from the Explorer hierarchical display, such as system (.Ssys) and application extension (.dll). To automatically show all files or to view a list of the hidden file types, select Tools
Folder Options
View. Then select Show all files.
Files in the Contents of pane can be sorted for viewing by name, type, size, or date. To change this display sequence, select View
Arrange Icons from the menu bar and choose the desired sort order.
There are two ways to view the properties and attributes of a particular folder. After selecting a file or folder in the Contents of pane, do the following:
1. Right-click or select File from the menu bar.
2. Select Properties.
3. In the Properties window, select the General tab.
Figure A.3 displays the General tab for a file using the FAT file system. If the NTFS file system were used, an Advanced Attributes option would also be displayed.
Figure A.3. File Properties

DIR COMMAND
The dir command is available from the command prompt and gives the user the ability to display file and directory properties and attributes via the command line. Its default output display includes the volume label and serial number of the disk, a list of the contents of the current or selected directory, the number of files listed, the total size of the files listed, and the amount of disk space remaining. The listing for each file or directory includes its size in bytes as well as the date and time it was last modified. The file extension, if any, is displayed following the file name.
An example of a portion of the dir command output is shown in Figure A.4. Its syntax is
dir [file(s)] [options]
Figure A.4. Directory Listing

Neither file(s) nor options is required. Without these parameters, the dir command will simply display the default information for the current directory. The file(s) parameter can be one or more file names or directories. Its format can be just the file or directory name or the drive designation and path as well, using the standard syntax drive:path\filename; the wildcard characters * and? may also be used (unlike early versions of DOS that require *.*). Separate multiple file names with spaces, commas, or semicolons.
Windows Server 2003 allows a user to create his own default results for the dir command through the dircmd environment variable. To set the default switches to be automatically executed whenever dir is entered at the command line, enter the following:
set dircmd=options
This action will bring up options available via any of the switches identified in Table A.32, which are considered the default until they are reset or is restarted. To override the default for a single command, enter a minus sign before the switch. For example, if the user enters the command set dircmd=/n and wants to see the shorter, wide listing for a directory that contains a large number of files, he enters dir /-n/w. Refer to the set command for more information regarding setting, overriding, and clearing environment variables.
Table A.32. dir Command Options | ||
Option | Qualifier | Description |
/a | :attributes | Displays only those files that match the attributes listed. The default (which is without the /a switch) displays all files except those with the Hidden or System attribute set. The attributes qualifier is optional; when not used, the dir /a command will display all files, even hidden and system. The colon ( : ) is optional as well. Multiple attributes may be entered in any order as long as there are no spaces between them, but only files that match all of the attributes will be displayed. A minus sign in front of the attribute will display all files that do not match that attribute. Acceptable values are a (files that have the Archive or Backup attribute set), - a (files that do not have the Archive attribute set), d (directories only), - d (files only, no directories), h (hidden files), - h (files that are not hidden), r (read-only files), - r (files that are not read-only), s (system files), - s (nonsystem files). |
/b | Prohibits display of any heading or summary information. Do not use in conjunction with the /w option. | |
/d | Displays the files/directories in columns, sorting by columns. | |
/l | Displays any unsorted files/directories in lowercase letters. | |
/n | Displays the following information for each file/directory: date and time last modified, whether the file is a directory, the size of the file, the name of the file or directory. This is the default format for the dir command. If the user wants the file names to display on the left, enter this option as /-n. | |
/o | :order | Displays the files sorted in the order given. The default (without the /o switch) is to display the files/directories in the order stored. Using the /o switch without any order specified will display the directories sorted alphabetically, then the files sorted alphabetically. The colon ( : ) is optional. Values for order may be entered in any order and combination as long as there are no spaces between them, but the sort order will be defined by the order of the values, such that the first order value will be the primary sort key, the next one the secondary sort key, and so on. Acceptable values are d (sort in ascending order by date and time, oldest first), - d (sort in descending order by date and time, newest first), e (sort alphabetically by file extension), - e (sort in reverse alphabetical order by file extension), g (display with directories grouped before files), - g (display with directories grouped after files), n (sort alphabetically by file or directory name), - n (sort in reverse alphabetical order by name), s (sort in ascending order by size, smallest first), - s (sort in descending order by size, largest first). |
/q | Pauses after each full screen of data. | |
/p | Displays only one screen at a time. Any key can be pressed to display the next screen. | |
/s | Displays all occurrences of the file name given in the specified directory as well as its subdirectories. Obviously, this option requires the file(s) parameter. | |
/t | :time | Displays the selected time for each file, where time can be c for the creation time, a for the time the file was last accessed, or w for the time the file was last written. When used in conjunction with the /od or /o-d, it identifies the time field that is used for sorting. |
/w | Displays the directory contents in wide format, which contains up to five columns of file/directory names. | |
/x | Displays the MS-DOS names for the files before the Windows Server 2003 names. Remember that the Server allows longer file names than the MS-DOS 8/3 character limit. The format of the display is similar to that of the /n option. | |
/4 | Displays four-digit years. |
dir Command Examples
For recursive listings, enter the following while in the root directory:
dir /s/n/o/p
This command produces a long alphabetical listing of all files, directories, and subdirectories, pausing at the end of each full screen of information. The directories display first, then the files.
To display files in the current directory that have both the Hidden and System attributes, enter the following:
dir /ahs
or
dir /a:hs
To simply display all files with a. doc extension in the current directory and its subdirectories, enter the following:
dir *.doc /s
Table A.33. echo Command Options | |
Option | Description |
On | Turns on the echo feature. In other words, displays (or echos) each command as it is executed. |
Off | Turns off the echo feature. Typing echo off on the command line removes the prompt from the screen. |
Message | Displays the message on the screen. This command is usually used in batch files following an echo off command. |
. (period) | Displays a blank line. The syntax for this option is echo. with no space between the word echo and the period. |
ECHO COMMAND
The echo command is used primarily in batch files to either enable or disable the command echoing feature or to display a message to the screen. Its syntax is
echo [options]
Using echo without options will display whether the echo feature is turned on or off. See Table A.33 for options.
Displaying Help
Windows Server 2003 provides both graphical and command-line methods of displaying Help documentation to the user. The graphical version is accessed from the Start menu by choosing Start
Help as shown in Figure A.5.
Figure A.5. Help Display

HELP COMMAND
Through the command line, the help command can be used to display Help information about Windows commands except net commands. The syntax is
help [command]
The parameter command is the name of the command for which you wish information. Omitting the command creates a display of each available command along with a brief description.
As an alternative to typing help and then the command name, the user can use the /? switch after the command. For example, dir /? and help dir will both produce the same Help information.
NET HELP COMMAND
The net help command provides Help information for the Windows Server 2003 net commands. It has two acceptable formats:
net help [command]
and
net command {/help | /?}
The command parameter can contain one of three values:
· A net command, such as net account, net start, net user, and so on.
· The word services, which provides a list of network services the user executing the command can start.
· The word syntax, which provides information on interpreting the syntax used within the net Help documentation.
NET HELPMSG COMMAND
The net helpmsg command provides the user with more information regarding a net error message. The syntax is
net helpmsg number
The number parameter is the number of the net error error messages are displayed in the following way:
NET ####: Message
where #### is the number included in the net helpmsg command.
FILE-MANAGEMENT COMMANDS
The file-management commands and procedures allow a user to create, remove, copy, move, and rename files and directories. These tasks may be completed using graphical methods in Windows Server 2003 Explorer or My Computer windows. My Network Places windows will permit some of these actions for resources shared across the network, provided that the user has the permission to execute them. Explorer is the application we use for most examples.
Displaying Path Names
While in Windows Server 2003 Explorer, a user can view the full path name of her current location by selecting View from the menu bar and then selecting Options
View. In the View tab, select the option Display the full path in the title bar, which is the default setting.
If you want to determine the current directory while at the command prompt, type cd and press ENTER.
Creating and Removing Folders
Windows Server 2003 provides command-line and graphical procedures for creating and removing directories or folders. This section discusses both.
CREATING FOLDERS
New folders can be created through Windows Server 2003 Explorer and My Computer windows using the same procedure. To create a folder (or directory) from Windows Explorer, follow this procedure:
1. Select the folder that will contain the new directory.
2. Select File from the menu bar.
3. Select New.
4. Select Folder.
5. In the Contents of pane, the New Folder icon will appear at the bottom of the file list. Enter the name of the new folder.
MKDIR COMMAND
The mkdir command enables the user to create a directory from the command line. Another name for it is md, and its syntax is
mkdir directory-name
or
md directory-name
The directory-name parameter is the name of the folder (or directory) you wish to create. The drive designation may be included here as well as a path should you wish to create a subdirectory. Suppose, for example, that the current directory is the root directory on the C: drive and you want to create the folder budget in the year2002 directory on the D: drive. To do this without moving from the current location, enter
mkdir d:\year2002\budget
REMOVING FOLDERS
Windows Server 2003 provides several ways to remove folders through Explorer or My Computer. Removing a folder places it in the Recycle Bin where it can still be accessed. Only when the Recycle Bin is cleared are folders permanently removed from the system.
The simplest way to remove a folder is to select it and then click Delete. A confirmation message similar to the following will display: "Are you sure you want to remove the folder and move all its contents to the Recycle Bin?" to which you must respond by clicking Yes or No.
Another way to remove a folder using Windows Server 2003 Explorer is:
1. Select the folder.
2. Select File from the menu bar.
3. Click Delete.
Step 2 is not necessary if you select the folder by right-clicking it. Doing so displays a menu that also contains the Delete option.
As an alternative, you can select the folder and then, while holding down the left mouse button, drag the folder to the Recycle Bin icon and release the button. If you want the folder to be permanently removed from the system, hold down the SHIFT key while dragging the folder to the Recycle Bin.
rmdir Command
The rmdir command, also known as rd, deletes the given directory (or folder). The syntax is
rmdir directory-name [/s]
or
rd directory-name [/s]
The directory-name parameter is the name of the directory or folder you wish to delete. It can contain both the drive designation and the path name if necessary.
The /s switch is optional and enables any files and subdirectories in the folder to be deleted as well. If it is not used, the directory must be empty before it can be removed.
Moving between Folders
Moving between folders in Windows Server 2003 is as simple as selecting a different folder with the mouse, which you can do in Explorer either in the All Folders or the Contents of pane. Within My Computer windows, just click the icon that represents the folder or the folder name.
CHDIR COMMAND
The chdir command, also known as cd, enables the user to display the name of the current directory as well as to change to a different directory. The syntax is
chdir [/d] [[drive:]directory-name]
or
cd [/d] [[drive:]directory-name]
The parameters /d and drive:directory-name are optional. If neither is entered, the chdir command will display the name of the current directory, including the drive designation.
The /d switch changes the current drive designation. The drive:directory-name parameter identifies the new drive and directory. The drive designation is entered only when necessary. Using a double period (..) in place of the directory name will change the directory from the current one to its parent.
Creating and Removing Files
This section provides procedures and commands for creating and removing files within Windows Server 2003.
CREATING FILES
Files are usually created in Windows Server 2003 via an installed application such as Notepad or WordPad. From within Windows Server 2003 Explorer and the My Computer windows, selecting File
New will provide a list of the file types you can create based on the applications installed on your system. In addition, the MS-DOS editor, edlin, is accessible from the command prompt.
REMOVING FILES
The procedure for removing files is the same as that for removing folders. The simplest method is to select it and then click Delete. To do so using Windows Server 2003 Explorer:
1. Select the file.
2. Select File from the menu bar.
3. Click Delete.
Step 2 is not necessary if you select the file using the right mouse button. Right-clicking will display a menu that also contains the Delete option.
As an alternative, you can select the file and drag it to the Recycle Bin icon. If you want the file permanently removed from the system, hold the SHIFT key down while dragging it to the Recycle Bin or simultaneously press the SHIFT and DELETE keys.
To select multiple files for deletion, hold down the CRTL key while selecting the files with the mouse and then drag them to the Recycle Bin.
DEL AND ERASE COMMANDS
The del command deletes or erases files from the system. Another name for this command is erase, and its syntax is
del file(s) [options]
or
erase file(s) [options]
Table A.34. del Command Options | ||
Option | Qualifier | Description |
/a | :attributes | Deletes files that match the given attributes: r for Read-Only, h for Hidden, s for System, a for Archive. A minus (–) sign may be used in front of any of the above options to identify files that do not match the given attribute. |
/f | Forces Read-Only files to be deleted. | |
/p | Requires the user to confirm whether a file should or should not be deleted by displaying the following prompt: file, Delete (Y/N)? Y will delete the file, N will not. (To abort the delete command altogether, enter a CTRL+C.) | |
/q | Does not prompt for confirmation. This is the default option. | |
/s | Deletes the files listed not only from the current directory but also from the subdirectories. |
The file(s) parameter identifies the files to be removed from the system and can contain the drive designation and the directory path in the format drive:path\file. More than one file can be deleted using one del command by separating the multiple file names with spaces, commas, or semicolons.
The wildcard characters * and? can be used when specifying files to be deleted. It is important that these be used with care to reduce the risk of deleting critical files. See Table A.34 for options.
Copying and Moving Files
The copy procedure creates a duplicate of the original file in another location so that more than one copy exists. The move procedure places the original file in another location without making a duplicate of it.
Windows Server 2003 provides both graphical and command-line methods for copying and moving files. The graphical method using the Explorer application provides the user multiple ways to copy and move, such as menus and drag and drop. In addition, it enables a user to copy and move files within and between disks, or across the network.
The following sections discuss both the graphical and command-line procedures for these tasks.
COPYING FILES
To copy a file using the drag-and-drop method in Windows Server 2003 Explorer:
1. Display the file in the Contents of pane.
2. Make sure that the destination directory is visible in the All Folders pane. (Or start another copy of Explorer and display the destination directory in the Contents of pane.)
3. Select the file you wish to copy.
4. Hold down the CTRL key and drag the file to its destination.
For multiple files, in step 3, hold down the CTRL key while selecting.
To use the menu bar in Explorer to copy files:
1. Select the files.
2. Select Edit
Copy or press CTRL+C.
3. Select the destination directory.
4. Select Edit
Paste or press CTRL+V.
Selecting the files with the right mouse button also displays a menu that contains the copy command.
Copying an executable file (one that has a .exe extension) may create a shortcut—that is, a link to the executable that gives the user an alternative way of executing the program. Shortcuts are often dragged and dropped to the main screen so that the user can bypass the menus.
COPY COMMAND
The copy command copies the source file or files to the indicated destination. It can also be used to combine the contents of files. The syntax is
copy [/a|/b] source-file [/a|/b] dest-file [/a|/b] [options]
The sourcefile is the name of the file to be copied. It can be just the file name, it can include the drive designation and the directory path as necessary, or it can be an actual device.
The dest-file is the name of the destination file but can be extended to include the drive designation and the directory path, or it can be a device name such as COM1 or LPT1. If this parameter is omitted, a file with the same name, creation date, and time is created in the current directory and on the current drive. If a file with that name already exists, an error is displayed.
|
Из за большого объема этот материал размещен на нескольких страницах:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |


